File Editor
Directories:
.. (Back)
ajax
capabilities
endpoints
exceptions
filters
formatter
google_search_console
import
listeners
menu
metabox
notifiers
pages
roles
services
statistics
taxonomy
tracking
views
watchers
Files:
admin-settings-changed-listener.php
ajax.php
class-admin-asset-analysis-worker-location.php
class-admin-asset-dev-server-location.php
class-admin-asset-location.php
class-admin-asset-manager.php
class-admin-asset-seo-location.php
class-admin-editor-specific-replace-vars.php
class-admin-gutenberg-compatibility-notification.php
class-admin-help-panel.php
class-admin-init.php
class-admin-recommended-replace-vars.php
class-admin-user-profile.php
class-admin-utils.php
class-admin.php
class-asset.php
class-bulk-description-editor-list-table.php
class-bulk-editor-list-table.php
class-bulk-title-editor-list-table.php
class-collector.php
class-config.php
class-database-proxy.php
class-export.php
class-expose-shortlinks.php
class-gutenberg-compatibility.php
class-meta-columns.php
class-my-yoast-proxy.php
class-option-tab.php
class-option-tabs-formatter.php
class-option-tabs.php
class-paper-presenter.php
class-plugin-availability.php
class-plugin-conflict.php
class-premium-popup.php
class-premium-upsell-admin-block.php
class-primary-term-admin.php
class-product-upsell-notice.php
class-remote-request.php
class-schema-person-upgrade-notification.php
class-suggested-plugins.php
class-wincher-dashboard-widget.php
class-yoast-columns.php
class-yoast-dashboard-widget.php
class-yoast-form.php
class-yoast-input-validation.php
class-yoast-network-admin.php
class-yoast-network-settings-api.php
class-yoast-notification-center.php
class-yoast-notification.php
class-yoast-notifications.php
class-yoast-plugin-conflict.php
index.php
interface-collection.php
interface-installable.php
Create New File
Create
Edit File: class-option-tab.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Options\Tabs */ /** * Class WPSEO_Option_Tab. */ class WPSEO_Option_Tab { /** * Name of the tab. * * @var string */ private $name; /** * Label of the tab. * * @var string */ private $label; /** * Optional arguments. * * @var array */ private $arguments; /** * WPSEO_Option_Tab constructor. * * @param string $name Name of the tab. * @param string $label Localized label of the tab. * @param array $arguments Optional arguments. */ public function __construct( $name, $label, array $arguments = [] ) { $this->name = sanitize_title( $name ); $this->label = $label; $this->arguments = $arguments; } /** * Gets the name. * * @return string The name. */ public function get_name() { return $this->name; } /** * Gets the label. * * @return string The label. */ public function get_label() { return $this->label; } /** * Retrieves whether the tab needs a save button. * * @return bool True whether the tabs needs a save button. */ public function has_save_button() { return (bool) $this->get_argument( 'save_button', true ); } /** * Retrieves whether the tab hosts beta functionalities. * * @return bool True whether the tab hosts beta functionalities. */ public function is_beta() { return (bool) $this->get_argument( 'beta', false ); } /** * Retrieves whether the tab hosts premium functionalities. * * @return bool True whether the tab hosts premium functionalities. */ public function is_premium() { return (bool) $this->get_argument( 'premium', false ); } /** * Gets the option group. * * @return string The option group. */ public function get_opt_group() { return $this->get_argument( 'opt_group' ); } /** * Retrieves the variable from the supplied arguments. * * @param string $variable Variable to retrieve. * @param string|mixed $default_value Default to use when variable not found. * * @return mixed|string The retrieved variable. */ protected function get_argument( $variable, $default_value = '' ) { return array_key_exists( $variable, $this->arguments ) ? $this->arguments[ $variable ] : $default_value; } }
Save Changes
Rename File
Rename