wpsf_get_option_group

Converts the settings file name to option group id.

Description

(string) wpsf_get_option_group( (string) $settings_file ); 

Returns (string)

option group id

Parameters (1)

0. $settings_file (string)
The settings file.

Usage

  1. if ( !function_exists( 'wpsf_get_option_group' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress-like-button/wp-settings-framework.php'; 
  3.  
  4. // The settings file. 
  5. $settings_file = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpsf_get_option_group($settings_file); 
  9.  

Defined (2)

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

/wp-settings-framework.php  
  1. function wpsf_get_option_group( $settings_file ) { 
  2. $option_group = preg_replace("/[^a-z0-9]+/i", "", basename( $settings_file, '.php' )); 
  3. return $option_group; 
  1. function wpsf_get_option_group( $settings_file ) { 
  2. $option_group = preg_replace("/[^a-z0-9]+/i", "", basename( $settings_file, '.php' )); 
  3. return $option_group;