• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Yoast SEO a2z

Yoast SEO a2z

WordPress SEO a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / admin/views/tabs/network/features.php


Lines:

1 to 68 of 68
<?php

/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Views
 *
 * @uses Yoast_Form $yform Form object.
 */

if ( ! defined( 'WPSEO_VERSION' ) ) {
  header( 'Status: 403 Forbidden' );
  header( 'HTTP/1.1 403 Forbidden' );
  exit();
}

$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();

?>
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
	<?php
  echo sprintf(
    /* translators: %s expands to Yoast SEO */
    esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
    'Yoast SEO'
  );

  foreach ( $feature_toggles as $feature ) {
    $help_text = esc_html( $feature->label );
    if ( ! empty( $feature->extra ) ) {
      $help_text .= ' ' . $feature->extra;
    }
    if ( ! empty( $feature->read_more_label ) ) {
      $help_text .= ' ';
      $help_text .= sprintf(
        '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
        esc_url( WPSEO_Shortlinker::get( $feature->read_more_url ) ),
        esc_html( $feature->read_more_label )
      );
    }

    $feature_help = new WPSEO_Admin_Help_Panel(
      WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
      /* translators: %s expands to a feature's name */
      sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
      $help_text
    );

    $yform->toggle_switch(
      WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
      [
        'on'  => __( 'Allow Control', 'wordpress-seo' ),
        'off' => __( 'Disable', 'wordpress-seo' ),
      ],
      '<strong>' . $feature->name . '</strong>',
      $feature_help->get_button_html() . $feature_help->get_panel_html()
    );
  }
  ?>
</div>
<?php
/*
 * Required to prevent our settings framework from saving the default because the field
 * isn't explicitly set when saving the Dashboard page.
 */
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 1 of 1
      • Yoast_Feature_Toggles::instance() – Gets the main feature toggles manager instance used.

      Call hooks

      File name: admin/views/tabs/network/features.php
      Plugin ref: Yoast SEO
      Version: 15.4
      Deprecated?: No
      API Letters: A,F,N,T,V

      Published: 27th November 2019 | Last updated: 10th December 2020

      Primary Sidebar

      Information

      File name: admin/views/tabs/network/features.php
      Plugin ref: Yoast SEO
      Version: 15.4
      Deprecated?: No
      API Letters: A,F,N,T,V

      admin/views/tabs/network

      Footer

      Yoast SEO a2z
      Yoast SEO a2z
      WordPress SEO a2z
      WordPress 5.6
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  wordpress-seo.wp-a2z.org
      © Copyright Yoast SEO a2z 2017-2021. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites