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
// Add a hook. function custom_as_retention_period( ) { return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’, 10 );Continue reading
// Add a hook. function custom_as_retention_period( ) { return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’, 10 );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
add_filter( ‘tasty_recipes_min_rating_without_comment’, function() { return 6; // Require comments for 4 and 5 star ratings too. } );Continue reading
jQuery(“.elementor-search-form__submit”).click(function(){ var search_keyword = jQuery(“input[class=’elementor-search-form__input’]”).attr(‘value’); } // Make the request to the ChatGPT 3.5 Turbo model (replace with your own implementation) jQuery.ajax({ url: ’80nq7y2YnI1hikzzB52KT3BlbkFJ916qLHptkxZcRoUShGGA’, type: ‘POST’, data: { search_query: search_keyword }, success: function(response) { // Handle the response from the…Continue reading
$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘F jS, Y’ );…Continue reading