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 specified page slug or ID if ( is_page( array( ‘slug1’, ‘slug2’, 123, 456 ) ) ) { $protect = false; // Disable protection for the specified…Continue reading
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 specified page slug or ID if ( is_page( ‘your-page’ ) || is_page( 123 ) ) { $protect = false; // Disable protection for the specified page…Continue reading
add_filter(‘mepr-pre-run-rule-content’, ‘mepr_override_content_protection’, 11, 3); function mepr_override_content_protection($protect, $post, $uri) { // Unprotect posts that belong to a specific custom post type (mpcs-lesson), with the “free” tag if (‘mpcs-lesson’ === get_post_type($post->ID) && has_tag(‘free’, $post)) { $protect = false; // Disable protection for…Continue reading
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 – 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
/** * 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
function minify_html($buffer) { // Remove comments $buffer = preg_replace(‘//’, ”, $buffer); // Remove whitespace $buffer = preg_replace(‘/^\s+|\s+$/m’, ”, $buffer); // Trim lines $buffer = preg_replace(‘/\s+/’, ‘ ‘, $buffer); // Replace multiple spaces with single space // More aggressive minification (use…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 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