[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/ -> MP_WP_Emojis_off.class.php (source)

   1  <?php
   2  
   3  class MP_WP_Emojis_off
   4  {
   5  	function __construct() 
   6      {
   7          remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
   8          remove_action( 'admin_print_styles', 'print_emoji_styles' );
   9  
  10          remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
  11          remove_action( 'embed_head', 'print_emoji_detection_script' );
  12  
  13          remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
  14  
  15          remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
  16          remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
  17          remove_action( 'wp_print_styles', 'print_emoji_styles' );
  18  
  19          add_filter( 'tiny_mce_plugins', array( __CLASS__, 'tiny_mce_plugins' ) );
  20          add_filter( 'wp_resource_hints', array( __CLASS__, 'wp_resource_hints' ), 10, 2 );
  21      }
  22  
  23  	public static function tiny_mce_plugins( $plugins ) 
  24      {
  25          if ( is_array( $plugins ) ) return array_diff( $plugins, array( 'wpemoji' ) );
  26          return $plugins;
  27      }
  28  
  29  	public static function wp_resource_hints( $urls, $relation_type )
  30      {
  31          if ( 'dns-prefetch' == $relation_type ) 
  32          {
  33              $emoji_svg_url_bit = 'https://s.w.org/images/core/emoji/';
  34              foreach ( $urls as $key => $url ) if ( strpos( $url, $emoji_svg_url_bit ) !== false ) unset( $urls[$key] );
  35          }
  36          return $urls;
  37      }
  38  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1