Example #1
0
 public static function is_post_page($use_post = false)
 {
     if (self::$is_post_ret !== null) {
         return self::$is_post_ret;
     } elseif (is_singular() || $use_post !== false) {
         return self::$is_post_ret = true;
     } elseif (is_admin()) {
         $screen_id = self::get_screen_id();
         // exclude post/page/media editing lists
         if (strpos($screen_id, 'edit-') !== false || $screen_id === 'upload') {
             return self::$is_post_ret = false;
         } elseif (self::get_req_val('post_ID', 'POST') !== '' || self::get_req_val('post', 'GET') !== '') {
             return self::$is_post_ret = true;
         }
     }
     return self::$is_post_ret = false;
 }