/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
// Return a 404 page for author pages if accessed directly. add_action( ‘template_redirect’, function () { if ( is_author() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } ); // Remove the author links. add_filter( ‘author_link’, ‘__return_empty_string’, 1000…Continue reading
// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
/* * * MY-ACCOUNT MODIFICATIONS * */ // Remove downloads from menu add_filter ( ‘woocommerce_account_menu_items’, ‘silva_remove_my_account_links’ ); function silva_remove_my_account_links( $menu_links ){ unset( $menu_links[‘downloads’] ); // Disable Downloads return $menu_links; }Continue reading
// Clean up HTML from blog posts function add_custom_cleanup_checkbox() { add_meta_box( ‘custom_cleanup_id’, // ID of the meta box ‘Custom Cleanup’, // Title of the meta box ‘custom_cleanup_checkbox_callback’, // Callback function ‘post’, // Post type ‘side’, // Context ‘high’ // Priority…Continue reading
/* * REGISTRATION SURCHARGES * * Add a custom surcharge to your cart / checkout * change the $percentage to set the surcharge to a value to suit * * Loop through the cart items by category * Add $1…Continue reading
https://youtube.com/@R0CKHEMAR?si=1cHo63EBjMpUjblmContinue reading