Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_Posttype_Defaults_Settings_Importing_Action::import_redirect_attachment()publicYoast 1.0

Transforms the redirect_attachment setting.

Метод класса: Aioseo_Posttype_Defaults_Settings_Importing_Action{}

Хуков нет.

Возвращает

true|false. The transformed redirect_attachment setting.

Использование

$Aioseo_Posttype_Defaults_Settings_Importing_Action = new Aioseo_Posttype_Defaults_Settings_Importing_Action();
$Aioseo_Posttype_Defaults_Settings_Importing_Action->import_redirect_attachment( $redirect_attachment );
$redirect_attachment(строка) (обязательный)
The redirect_attachment setting.

Код Aioseo_Posttype_Defaults_Settings_Importing_Action::import_redirect_attachment() Yoast 19.11

public function import_redirect_attachment( $redirect_attachment ) {
	switch ( $redirect_attachment ) {
		case 'disabled':
			return false;

		case 'attachment':
		case 'attachment_parent':
		default:
			return true;
	}
}