gglstmp_register_settings

The Google Sitemap by BestWebSoft gglstmp register settings function.

Description

gglstmp_register_settings(); 

Usage

  1. if ( !function_exists( 'gglstmp_register_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/google-sitemap-plugin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gglstmp_register_settings(); 
  7.  

Defined (1)

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

/google-sitemap-plugin.php  
  1. function gglstmp_register_settings() { 
  2. global $gglstmp_settings, $gglstmp_plugin_info, $gglstmp_option_defaults; 
  3.  
  4. if ( empty( $gglstmp_plugin_info ) ) { 
  5. if ( ! function_exists( 'get_plugin_data' ) ) 
  6. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  7. $gglstmp_plugin_info = get_plugin_data( dirname( __FILE__ ) . '/google-sitemap-plugin.php' ); 
  8.  
  9. $gglstmp_option_defaults = array( 
  10. 'plugin_option_version' => $gglstmp_plugin_info['Version'],  
  11. 'post_type' => array( 'page', 'post' ),  
  12. 'taxonomy' => array(),  
  13. 'sitemap' => array(),  
  14. 'first_install' => strtotime( "now" ),  
  15. 'display_settings_notice' => 1,  
  16. 'suggest_feature_banner' => 1 
  17. ); 
  18.  
  19. if ( ! get_option( 'gglstmp_settings' ) ) 
  20. add_option( 'gglstmp_settings', $gglstmp_option_defaults ); 
  21.  
  22. $gglstmp_settings = get_option( 'gglstmp_settings' ); 
  23.  
  24. if ( ! isset( $gglstmp_settings['plugin_option_version'] ) || $gglstmp_settings['plugin_option_version'] != $gglstmp_plugin_info['Version'] ) { 
  25. if ( ! isset( $gglstmp_settings['post_type'] ) && is_array( $gglstmp_settings ) ) 
  26. $gglstmp_settings['post_type'] = $gglstmp_settings; 
  27.  
  28. $gglstmp_option_defaults['display_settings_notice'] = 0; 
  29. $gglstmp_settings = array_merge( $gglstmp_option_defaults, $gglstmp_settings ); 
  30. $gglstmp_settings['plugin_option_version'] = $gglstmp_plugin_info["Version"]; 
  31. /** show pro features */ 
  32. $gglstmp_settings['hide_premium_options'] = array(); 
  33. update_option( 'gglstmp_settings', $gglstmp_settings );