示例#1
0
 public static function filter($content_excerpt)
 {
     $post = get_post();
     // Current post.
     if ($post && $post->post_type && ezphp::$included_post_types) {
         if (!in_array($post->post_type, ezphp::$included_post_types, TRUE)) {
             return $content_excerpt;
         }
     }
     // Exclude.
     if ($post && $post->post_type && ezphp::$excluded_post_types) {
         if (in_array($post->post_type, ezphp::$excluded_post_types, TRUE)) {
             return $content_excerpt;
         }
     }
     // Exclude.
     if ($post && apply_filters('ezphp_exclude_post', FALSE, $post)) {
         return $content_excerpt;
     }
     // Exclude.
     return ezphp::maybe_eval($content_excerpt);
 }