bbp_converter_setting_callback_platform

Edit Platform setting field.

Description

bbp_converter_setting_callback_platform(); 

Usage

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

Defined (1)

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

/includes/admin/settings.php  
  1. function bbp_converter_setting_callback_platform() { 
  2.  
  3. $platform_options = ''; 
  4. $curdir = opendir(bbpress)->admin->admin_dir . 'converters/' ); 
  5.  
  6. // Bail if no directory was found (how did this happen?) 
  7. if ( empty( $curdir ) ) 
  8. return; 
  9.  
  10. // Loop through files in the converters folder and assemble some options 
  11. while ( $file = readdir( $curdir ) ) { 
  12. if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) { 
  13. $file = preg_replace( '/.php/', '', $file ); 
  14. $platform_options .= '<option value="' . $file . '">' . esc_html( $file ) . '</option>'; 
  15.  
  16. closedir( $curdir ); ?> 
  17.  
  18. <select name="_bbp_converter_platform" id="_bbp_converter_platform" /><?php echo $platform_options ?></select> 
  19. <label for="_bbp_converter_platform"><?php esc_html_e( 'is the previous forum software', bbpress ); ?></label> 
  20.  
  21. <?php