This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Woocommerce - Árukereső Trusted Shop integrálása | |
** az alábbi kódrészletbe csak be kell illeszteni az | |
** árukeresőtől kapott webapi kódot majd az egészet át | |
** kell másolni a sablon functions.php fájljába. */ | |
add_action( 'woocommerce_thankyou', 'arukereso_trusted_shop' ); | |
function arukereso_trusted_shop( $order_id ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check_for_shortcode($posts) { | |
if ( empty($posts) ) | |
return $posts; | |
// false because we have to search through the posts first | |
$found = false; | |
// search through each post | |
foreach ($posts as $post) { | |
// check the post content for the short code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if no title then add widget content wrapper to before widget | |
add_filter( 'dynamic_sidebar_params', 'check_sidebar_params' ); | |
function check_sidebar_params( $params ) { | |
global $wp_registered_widgets; | |
$settings_getter = $wp_registered_widgets[ $params[0]['widget_id'] ]['callback'][0]; | |
$settings = $settings_getter->get_settings(); | |
$settings = $settings[ $params[1]['number'] ]; | |
if ( $params[0][ 'after_widget' ] == '</div></div>' && isset( $settings[ 'title' ] ) && empty( $settings[ 'title' ] ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on (release){ | |
getURL(_level0.clickTAG, "_blank"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on(release){ | |
getURL(_root.clickTAG, "_blank"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_thankyou', 'my_custom_tracking' ); | |
function my_custom_tracking( $order_id ) { | |
// Lets grab the order | |
$order = new WC_Order( $order_id ); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $first = true; ?> | |
<?php /*Post query*/ ?> | |
<?php if ( $first ) : ?> | |
<?php if ( has_post_thumbnail() ) { ?> | |
<figure class="post-thumb aligncenter"> | |
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Link ehhez %s', 'akg' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail( 'topstories-thumb' ) ?></a> | |
</figure> | |
<?php } ?> | |
<?php $first = false; ?> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This snippet removes the action that inserts thumbnails to products in teh loop | |
* and re-adds the function customized with our wrapper in it. | |
* It applies to all archives with products. | |
* | |
* @original plugin: WooCommerce | |
* @author of snippet: Brian Krogsard | |
*/ | |
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu { | |
function start_lvl( &$output, $depth ) { | |
//In a child UL, add the 'dropdown-menu' class | |
$indent = str_repeat( "\t", $depth ); | |
$output .= "\n$indent<ul class=\"dropdown-menu\">\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-----------------------------------------------------------------------------------*/ | |
/* Rename the Uploaded Media File to Post Title | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter( 'sanitize_file_name', 'cb_sanitize_file_name' ); | |
/** | |
* @internal Missing short description | |
* | |
* @link wp-includes|formatting.php | |
* @todo causing errors at media-new.php |