get_post_thumbnail_id(), ); $thumbnail_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'post_image_size' ); if ( empty( $thumbnail_html ) ) { return; } echo wp_kses_post( $thumbnail_html ); } /** * Get post title. * * Returns the post title HTML wrap. * * @since 1.5.2 * @access public */ public function render_title() { echo esc_attr( the_title() ) . ''; } /** * Get post excerpt length. * * Returns the length of Timeline post excerpt. * * @since 1.7.0 * @access public */ public function uael_timeline_excerpt_length() { $settings = self::$settings; return $settings['excerpt_length']; } /** * Get post excerpt end text. * * Returns the string to append to Timeline post excerpt. * * @param string $more returns string. * @since 1.7.0 * @access public */ public function uael_timeline_excerpt_more( $more ) { return ' ...'; } /** * Get post excerpt. * * Returns the post excerpt HTML wrap. * * @since 1.5.2 * @param array $settings object. * @access public */ public function render_excerpt( $settings ) { $excerpt_length = $settings['excerpt_length']; if ( 0 === $excerpt_length ) { return; } add_filter( 'excerpt_length', array( $this, 'uael_timeline_excerpt_length' ), 20 ); add_filter( 'excerpt_more', array( $this, 'uael_timeline_excerpt_more' ), 20 ); the_excerpt(); remove_filter( 'excerpt_length', array( $this, 'uael_excerpt_length_filter' ), 20 ); remove_filter( 'excerpt_more', array( $this, 'uael_excerpt_more_filter' ), 20 ); } /** * Get post published date. * * Returns the post published date HTML wrap. * * @since 1.5.2 * @param array $settings object. * @access public */ public function render_date( $settings ) { echo wp_kses_post( apply_filters( 'uael_timeline_the_date_format', get_the_date(), get_option( 'date_format' ), '', '' ) ); } /** * Get Pagination. * * Returns the Pagination HTML. * * @since 1.5.2 * @param array $settings object. * @param array $query object. * @param array $query_obj object. * @access public */ public function render_pagination( $settings, $query, $query_obj ) { if ( 'no' === $settings['timeline_infinite'] ) { return; } // Get current page number. $paged = $query_obj->get_paged(); $total_pages = $query->max_num_pages; // Users can change the limit of no. of pages in infinite load using this filter // default is 5. $total_pages = apply_filters( 'uael_timeline_infinite_limit', $total_pages = 5 ); // Return pagination html. if ( $total_pages > 1 ) { $current_page = $paged; if ( ! $current_page ) { $current_page = 1; } $links = paginate_links( array( 'current' => $current_page, 'total' => $total_pages, 'type' => 'array', ) ); $class = ( 'yes' === $settings['timeline_infinite'] ) ? 'style=display:none;' : ''; $id = 'uael-timeline-' . self::$node_id; ?>
render_date( $settings ) ) ); ?>
render_date( $settings ) ) ); ?>