fauzanjeg

JNews || Hide Format Type Input on Frontend Submit from JNews

Aug 15th, 2025
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. if ( ! function_exists( 'jnews_hide_format_type_frontend_submit' ) ) {
  2.     /**
  3.      * Hide Format Type Input on Frontend Submit from JNews
  4.      *
  5.      * @return void
  6.      */
  7.     function jnews_hide_format_type_frontend_submit() {
  8.         if ( ! current_user_can( 'upload_files' ) ) {
  9.             ?>
  10.             <style>
  11.                 .wp-theme-jnews .format-field {
  12.                     display: none;;
  13.                 }
  14.             </style>
  15.             <?php
  16.         }
  17.     }
  18.     add_action( 'wp_footer', 'jnews_hide_format_type_frontend_submit' );
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment