add_action( ‘init’, function() { // Remove Tasty Links from Tasty Recipes description, notes, ingredients, and instructions. remove_filter( ‘tasty_recipes_the_content’, array( ‘Tasty_LinksIntegrationsTasty_Recipes’, ‘filter_tasty_recipes_content’ ) ); });Continue reading
add_filter( ‘tasty_recipes_print_view_buttons’, ‘wpt_hide_nutrition_button’ ); function wpt_hide_nutrition_button( $buttons ) { unset( $buttons[‘nutrition’] ); return $buttons; }Continue reading
add_filter( ‘two_factor_enabled_providers_for_user’, function( $providers ) { if ( empty( $providers ) && class_exists( ‘Two_Factor_Email’ ) ) { $providers[] = ‘Two_Factor_Email’; } return $providers; } );Continue reading
// Check if the current user already has a “student” post $args = array( ‘author’ => get_current_user_id(), ‘post_type’ => ‘student’, ‘posts_per_page’ => -1, // Retrieve all posts ‘order’ => ‘DESC’, // Order by most recent post first ); $student_posts =…Continue reading
add_filter( ‘upload_mimes’, function ( $mimes ) { // By default, only administrator users are allowed to add ICO files. // To enable more user types edit or comment the lines below but beware of // the security risks if you…Continue reading
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://310.live/wp-content/uploads/2022/11/cropped-office-building.png’; $logo_width = 84; $logo_height = 84; printf( ‘.login h1 a {background-image:url(%1$s) !important; margin:0…Continue reading
add_action( ‘admin_enqueue_scripts’, ‘aioseo_editor_pin_styles’ ); function aioseo_editor_pin_styles() { $custom_css = ‘@media (min-width: 782px){.interface-complementary-area-header .components-button.has-icon { display: flex !important; }}’; wp_add_inline_style( ‘wp-edit-post’, $custom_css ); }Continue reading
/* Make Product Non Purchasable for Wholesale Customer Iif Product Stock is Less Than X Amount */ add_filter( ‘woocommerce_is_purchasable’, ‘wwpp_limit_purchase_based_on_stock’, 10, 2 ); function wwpp_limit_purchase_based_on_stock( $is_purchasable, $product ) { //Get Product Stock Quantity $product_quantity = $product->get_stock_quantity(); //Get current user’s wholesale…Continue reading
/** * Hide Price & Add to Cart for Non Logged in Users for Specific Products */ function is_non_purchasable_products_for_visitors( $product ) { $not_purchasable_products = array( 23, 22 ); // Replace with Products ID you want to set as non purchasable…Continue reading