Inpsyde\MultilingualPress\Common\PluginProperties::plugin_dir_path PHP Метод

plugin_dir_path() публичный Метод

Returns the absolute path of the plugin root folder.
С версии: 3.0.0
public plugin_dir_path ( ) : string
Результат string The absolute path of the plugin root folder.
    public function plugin_dir_path();

Usage Example

 /**
  * Find and load core and pro features.
  *
  * @access	public
  * @since	0.1
  * @return	array Files to include
  */
 protected function load_features()
 {
     $found = [];
     $path = $this->properties->plugin_dir_path() . '/src/inc';
     if (!is_readable($path)) {
         return $found;
     }
     $files = glob("{$path}/feature.*.php");
     if (empty($files)) {
         return $found;
     }
     foreach ($files as $file) {
         $found[] = $file;
         require $file;
     }
     // We need the return value for tests.
     return $found;
 }