WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WPSEO_Meta::init() public Yoast 1.0

Register our actions and filters.

{} Это метод класса: WPSEO_Meta{}

Хуки из метода

Возвращает

null. Ничего.

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

$result = WPSEO_Meta::init();

Код WPSEO_Meta::init() Yoast 17.3

public static function init() {
	foreach ( self::$social_networks as $option => $network ) {
		if ( WPSEO_Options::get( $option, false ) === true ) {
			foreach ( self::$social_fields as $box => $type ) {
				self::$meta_fields['social'][ $network . '-' . $box ] = [
					'type'          => $type,
					'title'         => '', // Translation added later.
					'default_value' => '',
					'description'   => '', // Translation added later.
				];
			}
		}
	}
	unset( $option, $network, $box, $type );

	/**
	 * Allow add-on plugins to register their meta fields for management by this class.
	 * Calls to add_filter() must be made before plugins_loaded prio 14.
	 */
	$extra_fields = apply_filters( 'add_extra_wpseo_meta_fields', [] );
	if ( is_array( $extra_fields ) ) {
		self::$meta_fields = self::array_merge_recursive_distinct( $extra_fields, self::$meta_fields );
	}
	unset( $extra_fields );

	foreach ( self::$meta_fields as $subset => $field_group ) {
		foreach ( $field_group as $key => $field_def ) {

			register_meta(
				'post',
				self::$meta_prefix . $key,
				[ 'sanitize_callback' => [ __CLASS__, 'sanitize_post_meta' ] ]
			);

			// Set the $fields_index property for efficiency.
			self::$fields_index[ self::$meta_prefix . $key ] = [
				'subset' => $subset,
				'key'    => $key,
			];

			// Set the $defaults property for efficiency.
			if ( isset( $field_def['default_value'] ) ) {
				self::$defaults[ self::$meta_prefix . $key ] = $field_def['default_value'];
			}
			else {
				// Meta will always be a string, so let's make the meta meta default also a string.
				self::$defaults[ self::$meta_prefix . $key ] = '';
			}
		}
	}
	unset( $subset, $field_group, $key, $field_def );

	add_filter( 'update_post_metadata', [ __CLASS__, 'remove_meta_if_default' ], 10, 5 );
	add_filter( 'add_post_metadata', [ __CLASS__, 'dont_save_meta_if_default' ], 10, 4 );
}