otw_inner_custom_box

Prints the box content.

Description

otw_inner_custom_box( $post ); 

Parameters (1)

0. $post
The post.

Usage

  1. if ( !function_exists( 'otw_inner_custom_box' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The post. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = otw_inner_custom_box($post); 
  9.  

Defined (1)

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

/functions.php  
  1. function otw_inner_custom_box( $post ) { 
  2.  
  3. // Use nonce for verification 
  4. wp_nonce_field( plugin_basename( __FILE__ ), 'otw_noncename' ); 
  5.  
  6. global $post; 
  7. $custom = get_post_custom($post->ID); 
  8.  
  9. if( isset($custom["otw_head_title_setting"][0]) ) { 
  10. $otw_head_title_setting = $custom["otw_head_title_setting"][0]; 
  11. } else { 
  12. $otw_head_title_setting = ''; 
  13.  
  14. $checked = ''; 
  15. if( $otw_head_title_setting != '' ) { $checked = 'checked="checked"'; } 
  16.  
  17. echo '<p><input type="checkbox" id="otw_head_title_setting" name="otw_head_title_setting" value="1" '.$checked.' /> '; 
  18. echo '<label for="otw_head_title_setting">'; 
  19. _e("Hide page title area", 'otw-carbon-light' ); 
  20. echo '</label></p>'; 
  21.  
  22. $value = get_post_meta( $post->ID, '_otw_meta_value_key', true ); 
  23. echo '<label for="otw_page_sub_title">'; 
  24. _e("Sub-title", 'otw-carbon-light' ); 
  25. echo '</label><br />'; 
  26. echo '<input style="width:100%;" type="text" id="otw_page_sub_title" name="otw_page_sub_title" value="'.esc_attr($value).'" />'; 
  27.