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

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

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

Usage Example

Пример #1
0
 /**
  * Checks if MultilingualPress has been activated network-wide, and collects potential error messages.
  *
  * @return void
  */
 private function check_plugin_activation()
 {
     $plugin_file_path = wp_normalize_path(realpath($this->plugin_properties->plugin_file_path()));
     foreach (wp_get_active_network_plugins() as $plugin) {
         if ($plugin_file_path === wp_normalize_path(realpath($plugin))) {
             return;
         }
     }
     /* translators: %s: link to network plugin screen */
     $message = __('This plugin must be activated for the network. Please use the <a href="%s">network plugin administration</a>.', 'multilingual-press');
     $this->errors[] = sprintf($message, esc_url(network_admin_url('plugins.php')));
 }