MemberPress: Disable MemberPress Protection On Posts with Specific Tags

add_filter(‘mepr-pre-run-rule-content’, ‘mepr_override_content_protection’, 11, 3); function mepr_override_content_protection($protect, $post, $uri) { // Unprotect posts with the “free” tag and if you want to add more than one tag just add (, ‘tag’) if (has_tag(array(‘free’), $post)) { $protect = false; // Disable protection…Continue reading

Envira – Enable Archives for the Standalone galleries and albums

/* Envira – Standalone Feature – Enable Archives * * @link https://enviragallery.com/docs/how-to-enable-archives-for-standalone-feature/ */ function envira_standalone_enable_archives( $post_args ) { $post_args[‘has_archive’] = true; $post_args[‘supports’] = array( ‘title’, ‘thumbnail’ ); return $post_args; } //Enables archive for the standalone albums add_filter(‘envira_albums_post_type_args’, ‘envira_standalone_enable_archives’); //Enables archive…Continue reading

Floating Social Media Icons (copy)

// Define social media links $facebook_link = ‘https://facebook.com/yourprofile’; $twitter_link = ‘https://twitter.com/yourprofile’; $instagram_link = ‘https://instagram.com/yourprofile’; $linkedin_link = ‘https://linkedin.com/in/yourprofile’; echo ‘ .floating-social-icons { position: fixed; top: 50%; left: 0; transform: translateY(-50%); z-index: 1000; } .floating-social-icons a { display: block; margin: 5px 0;…Continue reading

Sample Email Template Tag (copy)

/** * Register a custom email tag for the file name. * * @return void */ function prefix_add_file_name_email_tag() { edd_add_email_tag( ‘file_name’, // Tag ‘Displays the file name of the purchased download file.’, // Description ‘prefix_render_file_name_email_tag’, // Callback function ‘File Name’,…Continue reading

Envira Socials – Disable Pinterest Pin It Button

/* 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

Global scripts | run everywhere | prod-dev

// 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

/** * 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

Onemoguci mail provjeru – WP Forms

/** * 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