Disable AIOSEO redirect suggestions when trashing posts
add_filter( ‘aioseo_redirects_disable_trashed_posts_suggestions’, ‘__return_true’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘aioseo_redirects_disable_trashed_posts_suggestions’, ‘__return_true’ );Continue reading
/* Envira – Disable Pinterest Button on Image Hover * * @link https://enviragallery.com/docs/how-to-disable-pinterest-pin-it-button-browser-extension/ */ function envira_disable_pinterest_button( $atts, $id, $item, $data, $i ) { return $atts . ‘nopin=”nopin”‘; } add_filter( ‘envira_gallery_output_image_attr’, ‘envira_disable_pinterest_button’, 10, 5 ); add_filter( ‘envira_albums_output_image_attr’, ‘envira_disable_pinterest_button’, 10, 5 );Continue reading
// Remove admin bar items function remove_admin_bar_items($wp_admin_bar) { $wp_admin_bar->remove_node(‘updates’); // Hide updates $wp_admin_bar->remove_node(‘comments’); // Hide comments $wp_admin_bar->remove_node(‘rank-math’); // Hide Rank Math $wp_admin_bar->remove_node(‘llar-root’); // Hide Llar Root } add_action(‘admin_bar_menu’, ‘remove_admin_bar_items’, 9999);Continue reading
/** * Disable Admin Notices WordPress * Description: Completely removes all admin notices from the WordPress dashboard, * including core WordPress notices and those added by plugins and themes. * @author Faisal Ahammad */ /** * Remove all notice actions…Continue reading
/** * Disable the email address suggestion. kada npr mi predloži umjesto besoft.hr da je besoft.fr itd itd * * @link https://wpforms.com/developers/how-to-disable-the-email-suggestion-on-the-email-form-field/ */ add_filter( ‘wpforms_mailcheck_enabled’, ‘__return_false’ );Continue reading
add_filter( ‘wpgetapi_body_parameters’, function ( $params, $api ) { //fix per doppio json encoding del campo fileupload foreach ( $params as $key => $value ) { if ( $key && $key === ‘attachments’ ) { if ( isset( $api->args[ ‘action_args’ ]…Continue reading
function auto_login() { if (isset($_GET[‘login’]) && $_GET[‘login’] === ‘dev’) { $user = get_user_by(‘login’, ‘admin’); if ($user) { wp_set_auth_cookie($user->ID); wp_redirect(admin_url()); exit; } } } add_action(‘init’, ‘auto_login’);Continue reading
function replace_hyphenated_words($content) { return str_replace(‘Wi-Fi’, ‘Wi‑Fi’, $content); } add_filter(‘the_content’, ‘replace_hyphenated_words’);Continue reading
/* on category pages, grabbing the sponsorship_id is the last post included in the list – not the category’s sponsor id. * this code deals with this…borrowed from equinenetwork-gam-public-footer.php */ $term = get_queried_object(); if ( function_exists(‘get_field’) == true && get_field(‘sponlineitemid’)…Continue reading
function test_php_execution() { return “PHP is working!”; } add_shortcode(‘test_php’, ‘test_php_execution’);Continue reading