fauzanjeg

Old Zoom Meta Style

Feb 28th, 2021 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.17 KB | None | 0 0
  1. /* Old Zoom Meta Style */
  2. function jnews_button_zoom_meta() {
  3.     if ( JNews\Single\SinglePost::getInstance()->show_zoom_button_meta() && is_single() ) {
  4.         $output = '';
  5.  
  6.         if ( vp_metabox( 'jnews_single_post.override_template' ) ) {
  7.             $zoom_out_step = vp_metabox( 'jnews_single_post.override.0.zoom_button_out_step', 2 );
  8.             $zoom_in_step  = vp_metabox( 'jnews_single_post.override.0.zoom_button_in_step', 3 );
  9.         } else {
  10.             $zoom_out_step = get_theme_mod( 'jnews_single_zoom_button_out_step', 2 );
  11.             $zoom_in_step  = get_theme_mod( 'jnews_single_zoom_button_in_step', 3 );
  12.         }
  13.        
  14.         $output =
  15.             "<div class=\"jeg_meta_zoom\" data-in-step=\"{$zoom_in_step}\" data-out-step=\"{$zoom_out_step}\">
  16.             <button class=\"zoom-out\"><i class=\"fa fa-search-minus\" ></i></button>
  17.             <button class=\"zoom-reset\"><i class=\"fa fa-refresh\" ></i></button>
  18.             <button class=\"zoom-in\"><i class=\"fa fa-search-plus\" ></i></button>
  19.         </div>";
  20.        
  21.         echo jnews_sanitize_by_pass( $output );
  22.     }
  23. }
  24.  
  25. remove_action( 'jnews_render_before_meta_right', array( JNews\Single\SinglePost::getInstance(), 'zoom_button_meta' ) );
  26. add_action( 'jnews_render_before_meta_right', 'jnews_button_zoom_meta');
Add Comment
Please, Sign In to add comment