get_file() ) { return false; } if ( ! is_file( $this->get_file() ) ) { return false; } return true; } /** * Get plugin file path. * * @return string */ public function get_file() { return $this->plugin_file; } /** * Get plugin slug. * * @return string */ public function get_slug() { if ( $this->plugin_slug ) { return $this->plugin_slug; } if ( ! $this->get_file() ) { return false; } $plugin_slug = basename( $this->get_file(), '.php' ); $this->plugin_slug = $plugin_slug; return $this->plugin_slug; } /** * Get plugin base folder. * * @return string */ public function get_base() { if ( $this->plugin_base ) { return $this->plugin_base; } if ( ! $this->get_file() ) { return false; } $plugin_base = plugin_basename( $this->get_file() ); $this->plugin_base = $plugin_base; return $this->plugin_base; } }