aign_tracking_urls' => \__( 'Campaign tracking URL parameters', 'wordpress-seo' ), 'clean_permalinks' => \__( 'Unregistered URL parameters', 'wordpress-seo' ), ]; $this->search_cleanup_settings = [ 'search_cleanup' => \__( 'Filter search terms', 'wordpress-seo' ), 'search_cleanup_emoji' => \__( 'Filter searches with emojis and other special characters', 'wordpress-seo' ), 'search_cleanup_patterns' => \__( 'Filter searches with common spam patterns', 'wordpress-seo' ), 'deny_search_crawling' => \__( 'Prevent search engines from crawling site search URLs', 'wordpress-seo' ), ]; $this->unused_resources_settings = [ 'remove_emoji_scripts' => \__( 'Emoji scripts', 'wordpress-seo' ), 'deny_wp_json_crawling' => \__( 'Prevent search engines from crawling /wp-json/', 'wordpress-seo' ), ]; } /** * Adds a dedicated tab in the General sub-page. * * @param WPSEO_Option_Tabs $dashboard_tabs Object representing the tabs of the General sub-page. */ public function add_crawl_settings_tab( $dashboard_tabs ) { $premium = $this->product_helper->is_premium() && $this->is_premium_upgraded(); $dashboard_tabs->add_tab( new WPSEO_Option_Tab( 'crawl-settings', \__( 'Crawl settings', 'wordpress-seo' ), [ 'save_button' => $premium, 'beta' => $premium, 'premium' => ! $premium, ] ) ); } /** * Adds content to the Crawl Cleanup tab. * * @param Yoast_Form $yform The yoast form object. */ public function add_crawl_settings_tab_content( $yform ) { $this->add_crawl_settings( $yform, false ); } /** * Adds content to the Crawl Cleanup network tab. * * @param Yoast_Form $yform The yoast form object. */ public function add_crawl_settings_tab_content_network( $yform ) { $this->add_crawl_settings( $yform, true ); } /** * Print the settings sections. * * @param Yoast_Form $yform The Yoast form class. * @param bool $is_network Whether we're on the network site. * * @return void */ private function add_crawl_settings( $yform, $is_network ) { $this->display_premium_upsell_btn(); echo '
'; $this->print_toggles( $this->basic_settings, $yform, $is_network, \__( 'Basic crawl settings', 'wordpress-seo' ), \__( 'Remove links added by WordPress to the header and <head>.', 'wordpress-seo' ) ); $this->print_toggles( $this->feed_settings, $yform, $is_network, \__( 'Feed crawl settings', 'wordpress-seo' ), \__( "Remove feed links added by WordPress that aren't needed for this site.", 'wordpress-seo' ) ); $this->print_toggles( $this->unused_resources_settings, $yform, $is_network, \__( 'Remove unused resources', 'wordpress-seo' ), \__( 'WordPress loads lots of resources, some of which your site might not need. If you’re not using these, removing them can speed up your pages and save resources.', 'wordpress-seo' ) ); $first_search_setting = \array_slice( $this->search_cleanup_settings, 0, 1 ); $rest_search_settings = \array_slice( $this->search_cleanup_settings, 1 ); $search_settings_toggles = [ 'off' => \__( 'Disabled', 'wordpress-seo' ), 'on' => \__( 'Enabled', 'wordpress-seo' ), ]; $this->print_toggles( $first_search_setting, $yform, $is_network, \__( 'Search cleanup settings', 'wordpress-seo' ), \__( 'Clean up and filter searches to prevent search spam.', 'wordpress-seo' ), $search_settings_toggles ); if ( ! $is_network ) { echo '
'; $yform->number( 'search_character_limit_free', \__( 'Max number of characters to allow in searches', 'wordpress-seo' ), [ 'min' => 1, 'max' => 1000, 'disabled' => true, ] ); $yform->hidden( 'search_character_limit', 'search_character_limit' ); echo '
'; } $this->print_toggles( $rest_search_settings, $yform, $is_network, '', '', $search_settings_toggles ); $this->print_toggles( $this->permalink_cleanup_settings, $yform, $is_network, \__( 'Permalink cleanup settings', 'wordpress-seo' ), \__( 'Remove unwanted URL parameters from your URLs.', 'wordpress-seo' ) ); if ( ! $is_network ) { echo '
'; $yform->textinput( 'clean_permalinks_extra_variables_free', \__( 'Additional URL parameters to allow', 'wordpress-seo' ), [ 'disabled' => true, ] ); $yform->hidden( 'clean_permalinks_extra_variables', 'clean_permalinks_extra_variables' ); echo '

'; \esc_html_e( 'Please use a comma to separate multiple URL parameters.', 'wordpress-seo' ); echo '

'; echo '
'; } echo '
'; } /** * Prints a list of toggles for an array of settings with labels. * * @param array $settings The settings being displayed. * @param Yoast_Form $yform The Yoast form class. * @param bool $is_network Whether we're on the network site. * @param string $title Optional title for the settings being displayed. * @param string $description Optional description of the settings being displayed. * @param array $toggles Optional naming of the toggle buttons. * * @return void */ private function print_toggles( array $settings, Yoast_Form $yform, $is_network, $title = '', $description = '', $toggles = [] ) { if ( ! empty( $title ) ) { echo '

', \esc_html( $title ), '

'; } if ( ! $is_network && ! empty( $description ) ) { echo '

', \esc_html( $description ), '

'; } if ( empty( $toggles ) ) { $toggles = [ 'off' => \__( 'Keep', 'wordpress-seo' ), 'on' => \__( 'Remove', 'wordpress-seo' ), ]; } $setting_prefix = ''; if ( $is_network ) { $setting_prefix = WPSEO_Option::ALLOW_KEY_PREFIX; // NOTE: the off/on labels here are flipped from their actual would-be values in premium for cosmetic reasons and limitations with disabled toggles. $toggles = [ // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch -- Reason: text is originally from Yoast SEO. 'on' => \__( 'Allow Control', 'wordpress-seo' ), // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch -- Reason: text is originally from Yoast SEO. 'off' => \__( 'Disable', 'wordpress-seo' ), ]; } foreach ( $settings as $setting => $label ) { $attr = [ 'disabled' => true, 'preserve_disabled_value' => true, ]; if ( $this->should_feature_be_disabled_multisite( $setting ) ) { $attr['preserve_disabled_value'] = false; } $yform->toggle_switch( $setting_prefix . $setting, $toggles, $label, '', $attr ); if ( $setting === 'remove_feed_global_comments' && ! $is_network ) { echo '

'; echo \esc_html__( 'By removing Global comments feed, Post comments feeds will be removed too.', 'wordpress-seo' ); echo '

'; } if ( $this->should_feature_be_disabled_multisite( $setting ) ) { echo '

'; \esc_html_e( 'This feature is not available for multisites.', 'wordpress-seo' ); echo '

'; } } } /** * Displays the Premium upsell button. */ public function display_premium_upsell_btn() { echo ''; $button_msg = ( $this->product_helper->is_premium() && ! $this->is_premium_upgraded() ) ? \esc_html__( 'Upgrade Premium', 'wordpress-seo' ) : \esc_html__( 'Unlock with Premium', 'wordpress-seo' ); // phpcs:ignore WordPress.Security.EscapeOutput -- Already escaped. echo $button_msg // phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly. . WPSEO_Admin_Utils::get_new_tab_message(); echo ''; } /** * Checks if the feature should be disabled due to the site being a multisite. * * @param string $setting The setting to be displayed. * * @return bool */ protected function should_feature_be_disabled_multisite( $setting ) { return ( \in_array( $setting, [ 'deny_search_crawling', 'deny_wp_json_crawling' ], true ) && \is_multisite() ); } } जडीबुटी खेतीमा प्रोत्साहन गर्न निः शुल्क बिरुवा-Goodnews24 - Good News24
समाचार

जडीबुटी खेतीमा प्रोत्साहन गर्न निः शुल्क बिरुवा-Goodnews24

Gobal IME Bank

Laxmi sunrise bank
Worldlink

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Sagarmatha cement
Back to top button