list_core_update

Definition:
function list_core_update( $update ) {}

Parameters

  • $update

Source code

function list_core_update( $update ) {

	global $wp_local_package, $wpdb;

	static $first_pass = true;



	$version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ?

			$update->current : sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);

	$current = false;

	if ( !isset($update->response) || 'latest' == $update->response )

		$current = true;

	$submit = __('Update Now');

	$form_action = 'update-core.php?action=do-core-upgrade';

	$php_version    = phpversion();

	$mysql_version  = $wpdb->db_version();

	$show_buttons = true;

	if ( 'development' == $update->response ) {

		$message = __('You are using a development version of WordPress.  You can update to the latest nightly build automatically or download the nightly build and install it manually:');

		$download = __('Download nightly build');

	} else {

		if ( $current ) {

			$message = sprintf(__('You have the latest version of WordPress. You do not need to update. However, if you want to re-install version %s, you can do so automatically or download the package and re-install manually:'), $version_string);

			$submit = __('Re-install Now');

			$form_action = 'update-core.php?action=do-core-reinstall';

		} else {

			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );

			$mysql_compat   = version_compare( $mysql_version, $update->mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );

			if ( !$mysql_compat && !$php_compat )

				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );

			elseif ( !$php_compat )

				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );

			elseif ( !$mysql_compat )

				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version );

			else

				$message = 	sprintf(__('You can update to <a href="http://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string);

			if ( !$mysql_compat || !$php_compat )

				$show_buttons = false;

		}

		$download = sprintf(__('Download %s'), $version_string);

	}



	echo '<p>';

	echo $message;

	echo '</p>';

	echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';

	wp_nonce_field('upgrade-core');

	echo '<p>';

	echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>';

	echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';

	if ( $show_buttons ) {

		if ( $first_pass ) {

			submit_button( $submit, 'button button-primary', 'upgrade', false );

			$first_pass = false;

		} else {

			submit_button( $submit, 'button', 'upgrade', false );

		}

		echo '&nbsp;<a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a>&nbsp;';

	}

	if ( 'en_US' != $update->locale )

		if ( !isset( $update->dismissed ) || !$update->dismissed )

			submit_button( __('Hide this update'), 'button', 'dismiss', false );

		else

			submit_button( __('Bring back this update'), 'button', 'undismiss', false );

	echo '</p>';

	if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) )

	    echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>';

	else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) {

	    echo '<p class="hint">'.sprintf( __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), $update->response != 'development' ? $update->current : '' ).'</p>';

	}

	echo '</form>';



}

2269

list_cats

Definition:
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,

Parameters

  • int $optionall
  • string $all
  • string $sort_column
  • string $sort_order
  • string $file
  • bool $list
  • int $optiondates
  • int $optioncount
  • int $hide_empty
  • int $use_desc_for_title
  • bool $children
  • int $child_of
  • int $categories
  • int $recurse
  • string $feed
  • string $feed_image
  • string $exclude
  • bool $hierarchical

Source code

function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,

				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,

				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {

	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );



	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',

		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');

	return wp_list_cats($query);

}

2267

list_authors

Definition:
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {}

Parameters

  • bool $optioncount
  • bool $exclude_admin
  • bool $show_fullname
  • bool $hide_empty
  • string $feed
  • string $feed_image

Source code

function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {

	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' );



	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');

	return wp_list_authors($args);

}

2265

link_xfn_meta_box

Definition:
function link_xfn_meta_box($link) {}

Display xfn form fields.

Parameters

  • object $link

Source code

function link_xfn_meta_box($link) {

?>

<table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">

	<tr>

		<th style="width: 20%;" scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th>

		<td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( isset( $link->link_rel ) ? esc_attr($link->link_rel) : ''); ?>" /></td>

	</tr>

	<tr>

		<td colspan="2">

			<table cellpadding="3" cellspacing="5" class="form-table">

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </span></legend>

						<label for="me">

						<input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />

						<?php _e('another web address of mine') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </span></legend>

						<label for="contact">

						<input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?></label>

						<label for="acquaintance">

						<input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> />  <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?></label>

						<label for="friend">

						<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?></label>

						<label for="friendship">

						<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </span></legend>

						<label for="met">

						<input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </span></legend>

						<label for="co-worker">

						<input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?></label>

						<label for="colleague">

						<input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend>

						<label for="co-resident">

						<input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?></label>

						<label for="neighbor">

						<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?></label>

						<label for="geographical">

						<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend>

						<label for="child">

						<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?>  />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label>

						<label for="kin">

						<input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?>  />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label>

						<label for="parent">

						<input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?></label>

						<label for="sibling">

						<input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?></label>

						<label for="spouse">

						<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?></label>

						<label for="family">

						<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>

					</fieldset></td>

				</tr>

				<tr>

					<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </th>

					<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend>

						<label for="muse">

						<input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?></label>

						<label for="crush">

						<input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?></label>

						<label for="date">

						<input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?></label>

						<label for="romantic">

						<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />

						<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?></label>

					</fieldset></td>

				</tr>

			</table>

		</td>

	</tr>

</table>

<p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>

<?php

}

2263

link_target_meta_box

Definition:
function link_target_meta_box($link) { ?>

Display form fields for changing link target.

Parameters

  • object $link

Source code

function link_target_meta_box($link) { ?>

<fieldset><legend class="screen-reader-text"><span><?php _e('Target') ?></span></legend>

<p><label for="link_target_blank" class="selectit">

<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />

<?php _e('<code>_blank</code> &mdash; new window or tab.'); ?></label></p>

<p><label for="link_target_top" class="selectit">

<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />

<?php _e('<code>_top</code> &mdash; current window or tab, with no frames.'); ?></label></p>

<p><label for="link_target_none" class="selectit">

<input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ($link->link_target == '') ? 'checked="checked"' : ''); ?> />

<?php _e('<code>_none</code> &mdash; same window or tab.'); ?></label></p>

</fieldset>

<p><?php _e('Choose the target frame for your link.'); ?></p>

<?php

}

2261