Disable Legacy CSS
add_filter( ‘show_recent_comments_widget_style’, ‘__return_false’ ); add_filter( ‘use_default_gallery_style’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘show_recent_comments_widget_style’, ‘__return_false’ ); add_filter( ‘use_default_gallery_style’, ‘__return_false’ );Continue reading
CIU Textbook Library High Education Library Add a New Book Title: Author: Year: Books List ID Title Author Year No books foundContinue reading
add_filter( ‘woocommerce_enable_auto_update_db’, ‘__return_true’ );Continue reading
add_filter(‘acf/settings/remove_wp_meta_box’, ‘__return_false’);Continue reading
add_action( ‘charitable_default_campaign_fields’, ‘test_charitable_default_campaign_fields’, 10, 1 ); function test_charitable_default_campaign_fields( $form_fields ) { // make the short description hidden, don’t remove as this make cause problems with legacy code. if ( isset( $form_fields[‘description’][‘campaign_form’] ) ) { $form_fields[‘description’][‘campaign_form’][‘type’] = ‘hidden’; } // change…Continue reading
/** * Force loading the Free Downloads assets on the frontend. */ function eddwp_free_downloads_scripts() { EDD\FreeDownloads\Assets\Frontend::enqueue( true ); } remove_action( ‘wp_enqueue_scripts’, ‘edd_free_downloads_scripts’ ); add_action( ‘wp_enqueue_scripts’, ‘eddwp_free_downloads_scripts’ );Continue reading
// This code snippet sends email notifications to the vendor when their vendor profile is approved, or denied. It ensures users are notified about the status of their vendor profiles. add_action(‘transition_post_status’, ‘send_user_notification_for_approved_profile’, 10, 3); add_action(‘transition_post_status’, ‘send_user_notification_for_denied_profile’, 10, 3); function send_user_notification_for_approved_profile($new_status,…Continue reading
function mepr_change_role_canceled_subscription( $event ) { $subscription = $event->get_data(); if( 123 != ( int ) $subscription->product_id ) { return; } $user = $subscription->user(); $wp_user = get_user_by( ‘id’, $user->ID ); if( !$wp_user ) { return; } // Remove role $wp_user->remove_role( ‘subscriber’ );…Continue reading