Astra_Builder_Loader::nofollow_markup( string $theme_location, string $markup )

Method to add rel=”nofollow” for markup


Description


Parameters

$theme_location

(string) (Required) Theme location for key.

$markup

(string) (Required) Markup.


Return

(string) Menu markup with rel="nofollow".


Source

File: inc/builder/class-astra-builder-loader.php

		public function nofollow_markup( $theme_location, $markup ) {
			$nofollow_disabled = apply_filters( 'astra_disable_nofollow_markup', false );

			if ( $nofollow_disabled ) {
				return $markup;
			}

			if ( isset( self::$menu_locations[ $theme_location ] ) ) {
				$markup = str_replace( 'href="', 'rel="nofollow" href="', $markup );
			} else {
				self::$menu_locations[ $theme_location ] = true;
			}

			return $markup;
		}

Changelog

Changelog
Version Description
4.6.14 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.