[ Index ]

MailPress 544

[ 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          do_action('MailPress_load_' . ucfirst(str_replace('/', '_', $this->path)));
  13      }
  14  
  15  	function load($root, $file)
  16      {
  17          if (isset($this->deep))
  18          {
  19              if (is_dir("$root/$file"))
  20              {
  21                  $root .= "/$file";
  22                  $dir  = @opendir($root);
  23                  if ($dir) while (($file = readdir($dir)) !== false) if ($file[0] != '.') $this->load_file("$root/$file");
  24                  @closedir($dir);
  25                  return;
  26              }
  27          }
  28          elseif ( isset($this->includes) && !isset($this->includes[substr($file, 0, -4)]) ) return;
  29  
  30          $this->load_file("$root/$file");
  31      }
  32  
  33  	function load_file($file)
  34      {
  35          if (substr($file, -4) != '.php') return;
  36          require_once($file);
  37      }
  38  }


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1