[ Index ]

MailPress 7.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/ -> MP_options_.class.php (source)

   1  <?php
   2  abstract class MP_options_
   3  {
   4  	function __construct()
   5      {
   6             // Load all options so that they can do what they have to do.
   7          $root = MP_ABSPATH . 'mp-includes/class/options/' . $this->path;
   8          $dir  = @opendir( $root );
   9          if ( $dir ) while ( ( $file = readdir( $dir ) ) !== false ) if ( $file[0] != '.' ) $this->load( $root, $file );
  10          @closedir( $dir );
  11  
  12          $path = ucfirst( str_replace( '/', '_', $this->path ) );
  13          do_action( "MailPress_load_{$path}" );
  14      }
  15  
  16  	function load( $root, $file )
  17      {
  18          if ( isset( $this->deep ) )
  19          {
  20              if ( is_dir( "$root/$file" ) )
  21              {
  22                  $root .= "/$file";
  23                  $dir  = @opendir( $root );
  24                  if ( $dir ) while ( ( $file = readdir( $dir ) ) !== false ) if ( $file[0] != '.' ) $this->load_file( "$root/$file" );
  25                  @closedir( $dir );
  26                  return;
  27              }
  28          }
  29          elseif ( isset( $this->includes ) && !isset( $this->includes[substr( $file, 0, -4 )] ) ) return;
  30  
  31          $this->load_file( "$root/$file" );
  32      }
  33  
  34  	function load_file( $file )
  35      {
  36          if ( substr( $file, -4 ) != '.php' ) return;
  37          require_once( $file );
  38      }
  39  }


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1