admin_settings

Add the settings to the bbPress page in the Dashboard.

Description

admin_settings(); 

Usage

  1. if ( !function_exists( 'admin_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress-notify/bbpress-notify.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = admin_settings(); 
  7.  

Defined (1)

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

/bbpress-notify.php  
  1. function admin_settings() { 
  2. // Add section to bbPress options 
  3. add_settings_section('bbpress_notify_options', __('E-mail Notifications', 'bbpress_notify'), '_settings_intro_text', 'bbpress'); 
  4.  
  5. // Add form fields for all settings 
  6. add_settings_field('bbpress_notify_newtopic_recipients', __('Notifications about new topics are sent to', 'bbpress_notify'), _topic_recipients_inputfield, 'bbpress', 'bbpress_notify_options'); 
  7. add_settings_field('bbpress_notify_newtopic_email_subject', __('E-mail subject', 'bbpress_notify'), _email_newtopic_subject_inputfield, 'bbpress', 'bbpress_notify_options'); 
  8. add_settings_field('bbpress_notify_newtopic_email_body', __('E-mail body (template tags: [blogname], [topic-title], [topic-content], [topic-excerpt], [topic-author], [topic-url], [topic-replyurl])', 'bbpress_notify'), _email_newtopic_body_inputfield, 'bbpress', 'bbpress_notify_options'); 
  9. add_settings_field('bbpress_notify_newreply_recipients', __('Notifications about replies are sent to', 'bbpress_notify'), _reply_recipients_inputfield, 'bbpress', 'bbpress_notify_options'); 
  10. add_settings_field('bbpress_notify_newreply_email_subject', __('E-mail subject', 'bbpress_notify'), _email_newreply_subject_inputfield, 'bbpress', 'bbpress_notify_options'); 
  11. add_settings_field('bbpress_notify_newreply_email_body', __('E-mail body (template tags: [blogname], [reply-title], [reply-content], [reply-excerpt], [reply-author], [reply-url], [reply-replyurl])', 'bbpress_notify'), _email_newreply_body_inputfield, 'bbpress', 'bbpress_notify_options'); 
  12.  
  13. // Register the settings as part of the bbPress settings 
  14. register_setting('bbpress', 'bbpress_notify_newtopic_recipients'); 
  15. register_setting('bbpress', 'bbpress_notify_newtopic_email_subject'); 
  16. register_setting('bbpress', 'bbpress_notify_newtopic_email_body'); 
  17.  
  18. register_setting('bbpress', 'bbpress_notify_newreply_recipients'); 
  19. register_setting('bbpress', 'bbpress_notify_newreply_email_subject'); 
  20. register_setting('bbpress', 'bbpress_notify_newreply_email_body'); 
  21.