Un motore di ricerca WordPress per sviluppatori e autori di temi



register_block_core_social_link ›

Dan/a
Deprecaton/a
register_block_core_social_link ( Nessun parametro )
Definito a:
Codex:

Registers the `core/social-link` blocks.



Sorgenti

function register_block_core_social_link() {
	$sites = array(
		'amazon',
		'bandcamp',
		'behance',
		'chain',
		'codepen',
		'deviantart',
		'dribbble',
		'dropbox',
		'etsy',
		'facebook',
		'feed',
		'fivehundredpx',
		'flickr',
		'foursquare',
		'goodreads',
		'google',
		'github',
		'instagram',
		'lastfm',
		'linkedin',
		'mail',
		'mastodon',
		'meetup',
		'medium',
		'pinterest',
		'pocket',
		'reddit',
		'skype',
		'snapchat',
		'soundcloud',
		'spotify',
		'tumblr',
		'twitch',
		'twitter',
		'vimeo',
		'vk',
		'wordpress',
		'yelp',
		'youtube',
	);

	foreach ( $sites as $site ) {
		register_block_type(
			'core/social-link-' . $site,
			array(
				'attributes'      => array(
					'url'  => array(
						'type' => 'string',
					),
					'site' => array(
						'type'    => 'string',
						'default' => $site,
					),
				),
				'render_callback' => 'render_core_social_link',
			)
		);
	}
}