epm_rich_editor_callback

Rich Editor Callback.

Description

epm_rich_editor_callback( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'epm_rich_editor_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-peasy-mailchimp-ajax-form/includes/admin/settings/register-settings.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = epm_rich_editor_callback($args); 
  9.  

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. function epm_rich_editor_callback( $args ) { 
  2. global $epm_options, $wp_version; 
  3.  
  4. if ( isset( $epm_options[ $args['id'] ] ) ) 
  5. $value = $epm_options[ $args['id'] ]; 
  6. else 
  7. $value = isset( $args['std'] ) ? $args['std'] : ''; 
  8.  
  9. if ( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) { 
  10. ob_start(); 
  11. wp_editor( stripslashes( $value ), 'epm_settings[' . $args['id'] . ']', array( 'textarea_name' => 'epm_settings[' . $args['id'] . ']' ) ); 
  12. $html = ob_get_clean(); 
  13. } else { 
  14. $html = '<textarea class="large-text" rows="10" id="epm_settings[' . $args['id'] . ']" name="epm_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>'; 
  15.  
  16. $html .= '<br/><label for="epm_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>'; 
  17.  
  18. echo $html;