gl_register_settings

Registers the settings via the Settings API, appends the setting to the tabs array of the object.

Description

gl_register_settings(); 

Usage

  1. if ( !function_exists( 'gl_register_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-locker-for-wordpress/admin/pages.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gl_register_settings(); 
  7.  

Defined (1)

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

/admin/pages.php  
  1. function gl_register_settings( ) { 
  2.  
  3. // General  
  4. add_settings_section( 'section_social', 'Social', '__return_false', gl_get_general_settings_key() ); 
  5. add_settings_field( 'google_active', 'Google Plus Button', 'gl_field_googleActive', gl_get_general_settings_key(), 'section_social' ); 
  6. add_settings_field( 'google_share', 'Google Share Button', 'gl_field_google_share', gl_get_general_settings_key(), 'section_social' ); 
  7. add_settings_field( 'google_url', 'Google URL', 'gl_field_googleURL', gl_get_general_settings_key(), 'section_social' ); 
  8. add_settings_field( 'youtube_active', 'Display Youtube', 'gl_field_youtube_active', gl_get_general_settings_key(), 'section_social' ); 
  9. add_settings_field( 'youtube_channel', 'Youtube Channel', 'gl_field_youtube_channel', gl_get_general_settings_key(), 'section_social' ); 
  10.  
  11. add_settings_section( 'section_advance', 'Advance', '__return_false', gl_get_general_settings_key() ); 
  12. add_settings_field( 'language', 'Language', 'gl_field_languages', gl_get_general_settings_key(), 'section_advance' ); 
  13. add_settings_field( 'cookie_days', 'Cookie', 'gl_field_cookieDays', gl_get_general_settings_key(), 'section_advance' ); 
  14.  
  15. // Social locker 
  16. add_settings_section( 'section_social_lock', 'Social Locker Settings', '__return_false', gl_get_social_lock_settings_key() ); 
  17. add_settings_field( 'sl_title', 'Title', 'gl_field_sl_title', gl_get_social_lock_settings_key(), 'section_social_lock' ); 
  18. add_settings_field( 'sl_message', 'Message', 'gl_field_sl_message', gl_get_social_lock_settings_key(), 'section_social_lock' ); 
  19.  
  20. add_settings_section( 'section_theme', 'Theme Options', '__return_false', gl_get_social_lock_settings_key() ); 
  21. add_settings_field( 'sl_style', 'Style', 'gl_field_sl_style', gl_get_social_lock_settings_key(), 'section_theme' ); 
  22. add_settings_field( 'sl_title_color', 'Title Color', 'gl_field_sl_title_color', gl_get_social_lock_settings_key(), 'section_theme' ); 
  23. add_settings_field( 'sl_message_color', 'Message Color', 'gl_field_sl_message_color', gl_get_social_lock_settings_key(), 'section_theme' ); 
  24. add_settings_field( 'sl_bg_color', 'Background Color', 'gl_field_sl_bg_color', gl_get_social_lock_settings_key(), 'section_theme' ); 
  25. add_settings_field( 'sl_shadow_color', 'Shadow Color', 'gl_field_sl_shadow_color', gl_get_social_lock_settings_key(), 'section_theme' ); 
  26. add_settings_field( 'sl_layout', 'Social Layout', 'gl_field_sl_layout', gl_get_social_lock_settings_key(), 'section_theme' ); 
  27. add_settings_field( 'sl_btn_effect', 'Social Button Effect', 'gl_field_sl_btn_effect', gl_get_social_lock_settings_key(), 'section_theme' ); 
  28.  
  29. add_settings_field( 'preview', 'Preview', 'gl_field_preview_social', gl_get_social_lock_settings_key(), 'section_theme' ); 
  30.  
  31. // Content locker 
  32. add_settings_section( 'section_content_lock', 'Content Locker Settings', '__return_false', gl_get_content_lock_settings_key() ); 
  33. add_settings_field( 'cl_title', 'Title', 'gl_field_cl_title', gl_get_content_lock_settings_key(), 'section_content_lock' ); 
  34. add_settings_field( 'cl_message', 'Message', 'gl_field_cl_message', gl_get_content_lock_settings_key(), 'section_content_lock' ); 
  35.  
  36. add_settings_section( 'section_theme', 'Theme Options', '__return_false', gl_get_content_lock_settings_key() ); 
  37. add_settings_field( 'cl_style', 'Style', 'gl_field_cl_style', gl_get_content_lock_settings_key(), 'section_theme' ); 
  38. add_settings_field( 'cl_title_color', 'Title Color', 'gl_field_cl_title_color', gl_get_content_lock_settings_key(), 'section_theme' ); 
  39. add_settings_field( 'cl_message_color', 'Message Color', 'gl_field_cl_message_color', gl_get_content_lock_settings_key(), 'section_theme' ); 
  40. add_settings_field( 'cl_bg_color', 'Background Color', 'gl_field_cl_bg_color', gl_get_content_lock_settings_key(), 'section_theme' ); 
  41. add_settings_field( 'cl_shadow_color', 'Shadow Color', 'gl_field_cl_shadow_color', gl_get_content_lock_settings_key(), 'section_theme' ); 
  42. add_settings_field( 'cl_layout', 'Social Layout', 'gl_field_cl_layout', gl_get_content_lock_settings_key(), 'section_theme' ); 
  43. add_settings_field( 'cl_btn_effect', 'Social Button Effect', 'gl_field_cl_btn_effect', gl_get_content_lock_settings_key(), 'section_theme' ); 
  44.  
  45. add_settings_field( 'preview', 'Preview', 'gl_field_preview_content', gl_get_content_lock_settings_key(), 'section_theme' ); 
  46.  
  47. // How to use