Disable Emojis (copy) (copy)

/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading

Disable Emojis (copy)

/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading

Simple Company Creation Trigger with Table Check

/** * Simple Company Creation Trigger with Table Check * * Description: Creates table if not exists and triggers Flowmattic only when table is created * Location: Run Everywhere */ // Hook into Groundhogg company creation add_action( ‘groundhogg/company/post_create’, function( $company_id,…Continue reading

Limit Revisions

/** * Limit WordPress revisions to 5 for all post types. */ add_filter(‘wp_revisions_to_keep’, function ($num, $post) { return 5; }, 10, 2);Continue reading

Flowmattic Company Creation Trigger

/** * WPCode Snippet: Flowmattic Company Creation Trigger * * Description: Triggers Flowmattic workflow when a new company is created in Groundhogg * Location: Run Everywhere * * This snippet hooks into Groundhogg company creation and sends all company data…Continue reading

Randomize posts order

function dd_random_posts($query, $args) { if (isset($args[‘module_id’]) && $args[‘module_id’] === ‘random-posts’) { $query->query_vars[‘orderby’] = ‘rand’; $query->query_vars[‘order’] = ‘ASC’; $query = new WP_Query( $query->query_vars ); } return $query; } add_filter(‘et_builder_blog_query’, ‘dd_random_posts’, 10, 2);Continue reading