make_db_current

Definition:
function make_db_current() {}

Parameters

  • $tables

Source code

function make_db_current() {

	global $wp_queries;



	$alterations = dbDelta($wp_queries);

	echo "<ol>\n";

	foreach($alterations as $alteration) echo "<li>$alteration</li>\n";

	echo "</ol>\n";

}

2309

make_clickable

Definition:
function make_clickable($ret) {}

Convert plaintext URI to HTML links.
Converts URI, www and ftp, and email addresses. Finishes by fixing links within links.

Parameters

  • string $ret: Content to convert URIs.

Return values

returns:Content with converted URIs.

Source code

function make_clickable($ret) {

	$ret = ' ' . $ret;

	// in testing, using arrays here was found to be faster

	$save = @ini_set('pcre.recursion_limit', 10000);

	$retval = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]{1,2000}|[\'*(+.,;:!=&$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);

	if (null !== $retval )

		$ret = $retval;

	@ini_set('pcre.recursion_limit', $save);

	$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);

	$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);

	// this one is not in an array because we need it to run last, for cleanup of accidental links within links

	$ret = preg_replace("#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i", "$1$3</a>", $ret);

	$ret = trim($ret);

	return $ret;

}

2307

maintenance_nag

Definition:
function maintenance_nag() {}

Source code

function maintenance_nag() {

	global $upgrading;

	if ( ! isset( $upgrading ) )

		return false;



	if ( current_user_can('update_core') )

		$msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' );

	else

		$msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.');



	echo "<div class='update-nag'>$msg</div>";

}

2305

log_app

Definition:
function log_app($label,$msg) {}

Writes logging info to a file.

Parameters

  • string $label: Type of logging
  • string $msg: Information describing logging reason.

Source code

function log_app($label,$msg) {

	global $app_logging;

	if ($app_logging) {

		$fp = fopen( 'wp-app.log', 'a+');

		$date = gmdate( 'Y-m-d H:i:s' );

		fwrite($fp, "\n\n$date - $label\n$msg\n");

		fclose($fp);

	}

}

2303

logIO

Definition:
function logIO($io,$msg) {}

logIO() – Writes logging info to a file.

Parameters

  • string $io: Whether input or output
  • string $msg: Information describing logging reason.

Return values

returns:Always return true

Source code

function logIO($io,$msg) {

	global $xmlrpc_logging;

	if ($xmlrpc_logging) {

		$fp = fopen("../xmlrpc.log","a+");

		$date = gmdate("Y-m-d H:i:s ");

		$iot = ($io == "I") ? " Input: " : " Output: ";

		fwrite($fp, "\n\n".$date.$iot.$msg);

		fclose($fp);

	}

	return true;

}

2301