%1$s
%1$s
' . __( 'Pages:', 'inspirelite' ), 'after' => '
', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' ', 'nextpagelink' => __( 'Next page', 'inspirelite'), 'previouspagelink' => __( 'Previous page', 'inspirelite' ), 'pagelink' => '%', 'echo' => absint( '1' ) ); wp_link_pages( $defaults ); } public static function inspirelite_content_meta_e(){ echo self:: inspirelite_content_meta(); } public static function inspirelite_content_meta(){ global $post, $wp_query; return sprintf( ' ', ( ! is_single() ) ? self:: inspirelite_content_posted_by() : '', self::inspirelite_content_date_formate(), self:: inspirelite_content_comment(), self:: inspirelite_content_edit_post() ); } public static function inspirelite_blog_post_category_e(){ echo self:: inspirelite_blog_post_category(); } public static function inspirelite_blog_post_category(){ global $post, $wp_query; $categories = get_the_category( get_the_ID() ); $separator = ', '; $output = ''; if ( ! empty( $categories ) ) { foreach( $categories as $category ) { $output .= '' . esc_html( $category->name ) . '' . $separator; } } return sprintf( '%1$s', // 1 trim( $output, $separator ), // 2 esc_html__( 'In', 'inspirelite' ) ); } public static function inspirelite_content_edit_post(){ global $post, $wp_query; return sprintf( '%2$s', // 1 esc_url( get_edit_post_link( get_the_ID() ) ), // 2 esc_html__( 'Edit', 'inspirelite' ) ); } /** * Post Comment Meta * @return [type] [description] */ public static function inspirelite_content_comment_e(){ echo self:: inspirelite_content_comment(); } public static function inspirelite_content_comment(){ global $post, $wp_query; if ( comments_open() ){ return sprintf(' ', // 1 get_comments_link(), // 2 ( get_comments_number() == 1 ? ( get_comments_number() ) : ( get_comments_number() ) ), // 3 esc_html__( 'Comment', 'inspirelite' ) ); } return; } /** * Date Formate */ public static function inspirelite_content_date_formate_e(){ echo self:: inspirelite_content_date_formate(); } public static function inspirelite_content_date_formate(){ global $post, $wp_query; $_date_schema = sprintf( '', // 1 get_the_date(), // 2 get_the_modified_date( get_option( 'date_format' ), get_the_ID() ) ); return sprintf( ' %2$s', // 1 get_the_time( get_option('date_format') ), // 2 $_date_schema ); } /** * Post By */ public static function inspirelite_content_posted_by_e(){ echo self:: inspirelite_content_posted_by(); } public static function inspirelite_content_posted_by(){ global $post, $wp_query; return sprintf( ' %2$s ', // 1 get_author_posts_url( get_the_author_meta('ID') ), // 2 ucwords( get_the_author() ), // 3 esc_html__('BY', 'inspirelite' ) ); } public static function inspirelite_is_sticky_post(){ global $post, $wp_query; print ( is_sticky() ) ? '' : ''; } public static function get_image_meta( $_post_id, $_meta ){ if( empty( $_post_id ) ) return; global $post, $wp_query; if( $_meta == 'width' ){ return absint( wp_get_attachment_metadata( get_post_thumbnail_id( $_post_id ), true )[ 'width' ] ); } if( $_meta == 'height' ){ return absint( wp_get_attachment_metadata( get_post_thumbnail_id( $_post_id ), true )[ 'height' ] ); } if( $_meta == 'alt' ){ return get_post_meta( get_post_thumbnail_id( $_post_id ), '_wp_attachment_image_alt', true ); } } public static function inspirelite_post_formate(){ global $post, $wp_query; $data = ''; $post_format = get_post_format(); if ($post_format === false) { $post_format = 'image'; } switch ($post_format) { case 'standard': $data = ''; break; case 'image': if ( has_post_thumbnail( get_the_ID() ) ) { $data .= '