Remove Media Generation for PDF invoices
function disable_pdf_previews() { $fallbacksizes = array(); return $fallbacksizes; } add_filter(‘fallback_intermediate_image_sizes’, ‘disable_pdf_previews’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function disable_pdf_previews() { $fallbacksizes = array(); return $fallbacksizes; } add_filter(‘fallback_intermediate_image_sizes’, ‘disable_pdf_previews’);Continue reading
function my_hide_shipping_when_free_is_available( $rates ) { $free = array(); foreach ( $rates as $rate_id => $rate ) { if ( ‘free_shipping’ === $rate->method_id ) { $free[ $rate_id ] = $rate; break; } } return ! empty( $free ) ? $free :…Continue reading
add_filter( ‘woocommerce_breadcrumb_defaults’, ‘jk_change_breadcrumb_home_text’ ); function jk_change_breadcrumb_home_text( $defaults ) { // Change the breadcrumb home text from ‘Home’ to ‘Schrammek’ $defaults[‘home’] = ‘Dr. Schrammek’; return $defaults; }Continue reading
add_filter( ‘block_editor_settings_all’, function( $editor_settings ) { $css = wp_get_custom_css_post()->post_content; $editor_settings[‘styles’][] = array( ‘css’ => $css ); return $editor_settings; } );Continue reading
define( ‘ALLOW_UNFILTERED_UPLOADS’, true );Continue reading
//Adds Custom Column To Users List Table function custom_add_user_id_column($columns) { $columns[‘user_id’] = ‘User ID’; return $columns; } add_filter(‘manage_users_columns’, ‘custom_add_user_id_column’); //Adds Content To The Custom Added Column function custom_show_user_id_column_content($value, $column_name, $user_id) { $user = get_userdata($user_id); if (‘user_id’ == $column_name) { return…Continue reading
/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
add_filter(“get_user_option_admin_color”, “update_user_option_admin_color”, 5); function update_user_option_admin_color($color_scheme) { $color_scheme = “modern”; // Options are: // fresh // light // blue // coffee // ectoplasm // midnight // modern // ocean // sunrise return $color_scheme; }Continue reading