This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Astra_Ext_Advanced_Hooks_Meta::target_rules_404_layout()

Force target rules for 404 page layout.


Description

404 Page layout will always the target rules of special-404.


Return

(null)


Source

File: addons/advanced-hooks/classes/class-astra-ext-advanced-hooks-meta.php

		private function target_rules_404_layout() {
			$layout = get_post_meta( get_the_ID(), 'ast-advanced-hook-layout', true );

			// bail if current layout is not 404 Page.
			if ( '404-page' !== $layout ) {
				return;
			}

			$target_rule_404 = array(
				'rule'     => array(
					0 => 'special-404',
				),
				'specific' => array(),
			);

			update_post_meta( get_the_ID(), 'ast-advanced-hook-location', $target_rule_404 );
		}

Changelog

Changelog
Version Description
1.2.1 Introduced.


User Contributed Notes

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