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 | |
// Do not include the opening php tag if it is already included in your file. | |
function your_prefix_count_actions( $tag ) { | |
global $wp_filter; | |
if ( !isset( $wp_filter[$tag] ) ) | |
return 0; |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
// Replace WooCommerce pagination with Beans pagination.. | |
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); | |
add_action( 'woocommerce_after_shop_loop', 'beans_posts_pagination' ); |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
// Add Google Analytics tracking code to your website's head. Replace UA-0000000-0 with your own Analytics ID. | |
add_action( 'wp_head', 'beans_child_google_analytics' ); | |
function beans_child_google_analytics() { | |
?><script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_action( 'beans_uikit_enqueue_scripts', 'beans_child_enqueue_uikit_assets' ); | |
function beans_child_enqueue_uikit_assets() { | |
// Add the UIkit autocomplete component. | |
beans_uikit_enqueue_components( 'autocomplete', 'add-ons' ); |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_action( 'wp', 'beans_child_setup_document' ); | |
function beans_child_setup_document() { | |
beans_remove_attribute( 'beans_fixed_wrap', 'class', 'uk-container uk-container-center' ); | |
} |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_filter( 'beans_edit_post_image_args', '__return_false' ); | |
add_filter( 'beans_edit_post_image_small_args', '__return_false' ); |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_filter( 'beans_layout', 'beans_child_layout' ); | |
function beans_child_layout( $layout ) { | |
// Return full width layout of front page. | |
if ( is_front_page() ) | |
return 'c'; |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_action( 'beans_post_body', 'beans_child_default_post_image', 5 ); | |
function beans_child_default_post_image() { | |
// Stop here if the post has an image set. | |
if ( has_post_thumbnail() ) | |
return; |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_filter( 'the_content', 'beans_child_modify_post_content' ); | |
function beans_child_modify_post_content( $content ) { | |
// Return the excerpt() if it exists and if it is the home/fron page. | |
if ( has_excerpt() && ( is_home() || is_front_page() ) ) | |
return '<p>' . get_the_excerpt() . '</p><p>' . beans_post_more_link() . '</p>'; |
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 | |
// Do not include the opening php tag if it is already included in your file. | |
add_action( 'beans_post_body_prepend_markup', 'beans_child_reponsive_image_sample' ); | |
function beans_child_reponsive_image_sample() { | |
$src = 'http://images.apple.com/euro/ipad-mini-4/a/screens_alt/images/overview/hero_large.png'; | |
$small = beans_edit_image( $src, array( | |
'resize' => array( 465, false ), |
OlderNewer