{$key} = $details[ $key ]; } } } public function get_name() { return $this->name; } public function get_code() { return $this->code; } public function get_version() { return $this->version; } public function get_author() { return $this->author; } public function get_root_file() { return $this->root_file; } /** * Return add-on slug. * * Add-on slug is the name of the root file without file extension. * * @since 6.0.1 * * @return string Add-on slug. */ public function get_addon_slug() { return basename( $this->root_file, '.php' ); } public function get_addon_directory() { return plugin_dir_path( $this->root_file ); } public function get_addon_directory_url() { return plugin_dir_url( $this->root_file ); } }