rtmedia_title_input

Get text-box for editing media title.

Description

rtmedia_title_input(); 

Usage

  1. if ( !function_exists( 'rtmedia_title_input' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/app/main/controllers/template/rtmedia-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = rtmedia_title_input(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app/main/controllers/template/rtmedia-functions.php  
  1. function rtmedia_title_input() { 
  2.  
  3. global $rtmedia_media; 
  4.  
  5. $name = 'media_title'; 
  6. $value = stripslashes( esc_html( $rtmedia_media->media_title ) ); 
  7. $html = ''; 
  8.  
  9. if ( 'edit' === rtmedia_request_action() ) { 
  10. $html .= '<input type="text" class="rtmedia-title-editor" name="' . esc_attr( $name ) . '" id="' . esc_attr( $name ) . '" value="' . esc_attr( $value ) . '">'; 
  11. } else { 
  12. $html .= '<h2 name="' . esc_attr( $name ) . '" id="' . esc_attr( $name ) . '">' . esc_html( $value ) . '</h2>'; 
  13.  
  14. $html .= ''; 
  15.  
  16. echo $html; // @codingStandardsIgnoreLine 
  17.