예제 #1
0
파일: ezphp.php 프로젝트: alvarpoon/aeg
 public static function init()
 {
     #load_plugin_textdomain('ezphp'); // Not necessary at this time.
     if (EZPHP_INCLUDED_POST_TYPES) {
         // Specific Post Types?
         ezphp::$included_post_types = preg_split('/[\\s;,]+/', EZPHP_INCLUDED_POST_TYPES, NULL, PREG_SPLIT_NO_EMPTY);
     }
     ezphp::$included_post_types = apply_filters('ezphp_included_post_types', ezphp::$included_post_types);
     if (EZPHP_EXCLUDED_POST_TYPES) {
         // Specific Post Types?
         ezphp::$excluded_post_types = preg_split('/[\\s;,]+/', EZPHP_EXCLUDED_POST_TYPES, NULL, PREG_SPLIT_NO_EMPTY);
     }
     ezphp::$excluded_post_types = apply_filters('ezphp_excluded_post_types', ezphp::$excluded_post_types);
     add_filter('the_content', 'ezphp::filter', 1);
     add_filter('get_the_excerpt', 'ezphp::filter', 1);
     add_filter('widget_text', 'ezphp::evaluate', 1);
 }
예제 #2
0
 public static function init()
 {
     if (EZPHP_INCLUDED_POST_TYPES) {
         // Specific Post Types?
         ezphp::$included_post_types = preg_split('/[\\s;,]+/', EZPHP_INCLUDED_POST_TYPES, NULL, PREG_SPLIT_NO_EMPTY);
     }
     ezphp::$included_post_types = apply_filters('ezphp_included_post_types', ezphp::$included_post_types);
     if (EZPHP_EXCLUDED_POST_TYPES) {
         // Specific Post Types?
         ezphp::$excluded_post_types = preg_split('/[\\s;,]+/', EZPHP_EXCLUDED_POST_TYPES, NULL, PREG_SPLIT_NO_EMPTY);
     }
     ezphp::$excluded_post_types = apply_filters('ezphp_excluded_post_types', ezphp::$excluded_post_types);
     if (EZPHP_STRIP_MD_INDENTS) {
         ezphp::$strip_md_indents = TRUE;
     }
     ezphp::$strip_md_indents = apply_filters('ezphp_strip_md_indents', ezphp::$strip_md_indents);
     add_filter('the_content', 'ezphp::filter', 1);
     add_filter('get_the_excerpt', 'ezphp::filter', 1);
     add_filter('widget_text', 'ezphp::maybe_eval', 1);
 }