Allow ico Files Upload
/*——————————————— TYPE MIME ICO par HP MC&C ———————————————-*/ function allow_ico_mime_types( $mimes ){ $mimes[‘ico’] = ‘image/x-icon’; return $mimes; } add_filter( ‘upload_mimes’, ‘allow_ico_mime_types’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/*——————————————— TYPE MIME ICO par HP MC&C ———————————————-*/ function allow_ico_mime_types( $mimes ){ $mimes[‘ico’] = ‘image/x-icon’; return $mimes; } add_filter( ‘upload_mimes’, ‘allow_ico_mime_types’ );Continue reading
function mepr_remove_state_field() { global $post; $mepr_options = MeprOptions::fetch(); $is_product_page = ( false !== ( $prd = MeprProduct::is_product_page($post) ) ); if( $mepr_options->global_styles || $is_product_page ) { ?>Continue reading
// Disable standard ratings UI add_filter( ‘tasty_recipes_enable_ratings’, ‘__return_false’ ); /** * Filter template variables to render WP-PostRatings UI * within the recipe card. * * @param array $template_vars Variables to be passed to the template. * @param object $recipe …Continue reading
/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_Recipes\Shortcodes::filter_the_content_late(…Continue reading
/** * Ensures the “Jump to Recipe” button is added to the content really late. */ add_action( ‘init’, function() { if ( method_exists( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’,…Continue reading
.tasty-recipes-quick-links a { border: 1px solid #000; background-color: #000; color: #fff; margin: 0 5px 5px; } /* Hover */ .tasty-recipes-quick-links a:hover { border: 1px solid #ccc; background-color: #ccc; color: #fff; } /* Hide the dots between buttons */ .tasty-recipes-quick-links a…Continue reading
add_filter( ‘tasty_recipes_min_rating_without_comment’, function() { return 6; // Require comments for 4 and 5 star ratings too. } );Continue reading
/** * TOC After First Heading */ function cwp_toc_after_first_heading( $output, $block ) { if ( ‘core/heading’ !== $block[‘blockName’] ) { return $output; } global $wp_query; if ( ! $wp_query->in_the_loop ) { return $output; } // Only run once. remove_filter( ‘render_block’,…Continue reading
/** * RSS feed, add MailChimp email query string */ function cwp_rss_mailchimp_email( $url ) { return add_query_arg( ‘adt_ei’, ‘*|EMAIL|*’, $url ); } add_filter( ‘the_permalink_rss’, ‘cwp_rss_mailchimp_email’ );Continue reading
/** * RSS feed, add ConvertKit email query string (Part 1) */ function cwp_rss_convertkit_email( $url ) { return add_query_arg( ‘adt_ei’, ‘subscriber.email_address’, $url ); } add_filter( ‘the_permalink_rss’, ‘cwp_rss_convertkit_email’ ); /** * Modify ConvertKit email string (Part 2) * esc_url will remove…Continue reading