Advertisement
phpface

Untitled

May 3rd, 2018
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. if( ! function_exists( 'videotube_filter_the_read_more_js' ) ){
  2.     /**
  3.      *
  4.      * Filter the read more JS
  5.      *
  6.      * @param array $args
  7.      * @return array
  8.      */
  9.     function videotube_filter_the_read_more_js( $args ) {
  10.        
  11.         $args['moreLink'] = sprintf(
  12.             '<a class="read-more-js" href="#">%s <i class="fa fa-angle-double-down" aria-hidden="true"></i></a>',
  13.             esc_html__( 'Read more', 'mars' )
  14.         );
  15.        
  16.         $args['lessLink'] = sprintf(
  17.             '<a class="read-less-js" href="#">%s <i class="fa fa-angle-double-up" aria-hidden="true"></i></a>',
  18.             esc_html__( 'Read less', 'mars' )
  19.         );
  20.        
  21.         return $args;
  22.     }
  23.     add_filter( 'read_more_js' , 'videotube_filter_the_read_more_js', 10, 1 );
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement