EduardET

blog module meta code

Feb 6th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.36 KB | None | 0 0
  1. if ( 'on' === $show_author || 'on' === $show_date || 'on' === $show_categories || 'on' === $show_comments ) {
  2.                         printf( '<p class="post-meta">%1$s %2$s %3$s %4$s %5$s %6$s %7$s</p>',
  3.                             (
  4.                                 'on' === $show_author
  5.                                     ? et_get_safe_localization( sprintf( __( 'by %s', 'et_builder' ), '<span class="author vcard">' .  et_pb_get_the_author_posts_link() . '</span>' ) )
  6.                                     : ''
  7.                             ),
  8.                             (
  9.                                 ( 'on' === $show_author && 'on' === $show_date )
  10.                                     ? ' | '
  11.                                     : ''
  12.                             ),
  13.                             (
  14.                                 'on' === $show_date
  15.                                     ? et_get_safe_localization( sprintf( __( '%s', 'et_builder' ), '<span class="published">' . esc_html( get_the_date( $meta_date ) ) . '</span>' ) )
  16.                                     : ''
  17.                             ),
  18.                             (
  19.                                 (( 'on' === $show_author || 'on' === $show_date ) && 'on' === $show_categories)
  20.                                     ? ' | '
  21.                                     : ''
  22.                             ),
  23.                             (
  24.                                 'on' === $show_categories
  25.                                     ? get_the_category_list(', ')
  26.                                     : ''
  27.                             ),
  28.                             (
  29.                                 (( 'on' === $show_author || 'on' === $show_date || 'on' === $show_categories ) && 'on' === $show_comments)
  30.                                     ? ' | '
  31.                                     : ''
  32.                             ),
  33.                             (
  34.                                 'on' === $show_comments
  35.                                     ? sprintf( esc_html( _nx( '%s Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder' ) ), number_format_i18n( get_comments_number() ) )
  36.                                     : ''
  37.                             )
  38.                         );
  39.                     }
Advertisement
Add Comment
Please, Sign In to add comment