/** * Create User Smart Tags from the WordPress profile. * * @link https://wpforms.com/developers/how-to-create-more-user-smart-tags/ */ function wpf_dev_register_user_profile_smart_tags ( $tags ) { // Key is the tag, item is the tag name. $tags[ ‘wp_nickname’ ] = ‘WP Profile Nickname’; $tags[ ‘wp_username’…Continue reading
/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_RecipesShortcodes::filter_the_content_late(…Continue reading
add_action( ‘template_redirect’, function() { if (is_404()) { wp_safe_redirect(home_url()); exit(); } } );Continue reading
function formidable_shortcode_list_view($atts) { global $wpdb; // Shortcode attributes $atts = shortcode_atts(array( ‘field_id’ => ”, ), $atts, ‘formidable_list_view’); if (empty($atts[‘field_id’])) { return ‘Field ID is required.’; } // Get all entries $entries = $wpdb->get_results( $wpdb->prepare( “SELECT meta_value FROM {$wpdb->prefix}frm_item_metas WHERE field_id…Continue reading
add_filter( ‘woocommerce_reset_variations_link’, ‘__return_empty_string’, 9999 );Continue reading
add_filter(‘cr_consent_checkbox’, function($output) { $output = str_replace(‘class=”cr-customer-consent”‘, ‘class=”cr-customer-consent” style=”display:none;”‘, $output); $output = str_replace(‘id=”cr_customer_consent”‘, ‘id=”cr_customer_consent” checked=”checked”‘, $output); return $output; });Continue reading
function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading
function mepr_show_nav_menu() { if(!class_exists( ‘MeprAccountCtrl’ ) ) { return; } $mepr_options = MeprOptions::fetch(); $_REQUEST[ ‘action’ ] = ‘mepr-fake’; $old_uri = $_SERVER[ ‘REQUEST_URI’ ]; $parsed = parse_url( $mepr_options->account_page_url() ); $_SERVER[ ‘REQUEST_URI’ ] = $parsed[ ‘path’ ]; // The [mepr-account-nav-menu] shortcode will…Continue reading
add_action( ‘admin_init’, function() { if ( isset( $_GET[‘export_members_extended’] ) ) { $all = MeprUser::list_table( /* $order_by */ ‘user_login’, /* $order */ ‘ASC’, /* $paged */ ”, /* $search */ ”, /* $search_field */ ‘any’, /* $perpage */ ”, /* $params…Continue reading