set_404(); status_header(404); nocache_headers(); } /** * Returns user page content * * @return void */ public static function page_content() { echo '
'; echo do_shortcode(get_the_author_meta('abp_author_page_content')); echo '
'; } /** * Return author box html content * * @return void|string */ public static function author_box() { $_hide_page_author_box = get_option('abp_sf_hide_page_author_box'); if ($_hide_page_author_box) return ''; include_once ABP_Template_Loader::load('author-page-author-box.php'); } /** * Return recent post html content * * @return void|string */ public static function recent_posts() { $_show_author_recent_post = get_option('abp_sf_hide_author_recent_post'); if ($_show_author_recent_post) return ''; global $authordata; $count = get_option('abp_sf_author_recent_post_count'); self::$recent_posts = new WP_Query( array( 'posts_per_page' => !empty($count) ? $count : 3, 'author' => $authordata->ID, 'post_type' => 'post', 'post_status' => 'publish' )); if (!self::$recent_posts->have_posts()) return ''; include_once ABP_Template_Loader::load('author-page-recent-posts.php'); } /** * Applied at hook before_profile_page_content * * @return void */ public static function before_profile_page_content() { $class = ''; $hide_sidebar = get_option('abp_sf_hide_sidebar'); if (!$hide_sidebar) $class = 'class="abp-author-left-content-box"'; echo '
'; } /** * Applied at hook after_profile_page_content * * @return void */ public static function after_profile_page_content() { echo '
'; $hide_sidebar = get_option('abp_sf_hide_sidebar'); if (!$hide_sidebar) get_sidebar(); } } ABP_Author_Page::init();