monsterinsights_get_section_settings

Get the settings for a section.

Description

monsterinsights_get_section_settings( $section, (string) $page = 'tracking' ); 

Parameters (2)

0. $section
The section.
1. $page — Optional. (string) => 'tracking'
The page.

Usage

  1. if ( !function_exists( 'monsterinsights_get_section_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/settings/settings-api.php'; 
  3.  
  4. // The section. 
  5. $section = null; 
  6.  
  7. // The page. 
  8. $page = 'tracking'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = monsterinsights_get_section_settings($section, $page); 
  12.  

Defined (1)

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

/includes/admin/settings/settings-api.php  
  1. function monsterinsights_get_section_settings( $section, $page = 'tracking' ) { 
  2. $output = ''; 
  3. if ( is_array( $settings ) && ! empty( $settings[$section] ) && is_array( $settings[$section] ) ) { 
  4. foreach ( $settings[$section] as $setting ) { 
  5. $args = wp_parse_args( $setting, array( 
  6. 'id' => null,  
  7. 'desc' => '',  
  8. 'name' => '',  
  9. 'size' => null,  
  10. 'options' => '',  
  11. 'std' => '',  
  12. 'min' => null,  
  13. 'max' => null,  
  14. 'step' => null,  
  15. 'select2' => null,  
  16. 'placeholder' => null,  
  17. 'allow_blank' => true,  
  18. 'readonly' => false,  
  19. 'faux' => false,  
  20. 'tooltip_title' => false,  
  21. 'tooltip_desc' => false,  
  22. 'field_class' => '',  
  23. 'multiple' => false,  
  24. 'allowclear' => true,  
  25. 'notice_type' => '',  
  26. ) ); 
  27. $output .= monsterinsights_render_field( $args ); 
  28. return $output;