WordPress开发者和主题制作者的搜索引擎



core_update_footer ›

Sincen/a
已弃用n/a
core_update_footer ( $msg = '' )
参数:
  • (string) $msg
    Required: No
    默认: (empty)
返回:
  • (string)
定义在:
文档:

暂无描述



源码

function core_update_footer( $msg = '' ) {
	if ( ! current_user_can( 'update_core' ) ) {
		/* translators: %s: WordPress version. */
		return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
	}

	$cur = get_preferred_from_update_core();
	if ( ! is_object( $cur ) ) {
		$cur = new stdClass;
	}

	if ( ! isset( $cur->current ) ) {
		$cur->current = '';
	}

	if ( ! isset( $cur->url ) ) {
		$cur->url = '';
	}

	if ( ! isset( $cur->response ) ) {
		$cur->response = '';
	}

	switch ( $cur->response ) {
		case 'development':
			return sprintf(
				/* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */
				__( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ),
				get_bloginfo( 'version', 'display' ),
				network_admin_url( 'update-core.php' )
			);

		case 'upgrade':
			return sprintf(
				'<strong><a href="%s">%s</a></strong>',
				network_admin_url( 'update-core.php' ),
				/* translators: %s: WordPress version. */
				sprintf( __( 'Get Version %s' ), $cur->current )
			);

		case 'latest':
		default:
			/* translators: %s: WordPress version. */
			return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
	}
}