normalize_whitespace

Definition:
function normalize_whitespace( $str ) {}

Parameters

  • $str

Source code

function normalize_whitespace( $str ) {

	$str  = trim($str);

	$str  = str_replace("\r", "\n", $str);

	$str  = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str );

	return $str;

}

2459

noindex

Definition:
function noindex() {}

Display a noindex meta tag if required by the blog configuration.
If a blog is marked as not being public then the noindex meta tag will be output to tell web robots not to index the page content. Add this to the wp_head action. Typical usage is as a wp_head callback. add_action( ‘wp_head’, ‘noindex’ );

Source code

function noindex() {

	// If the blog is not public, tell robots to go away.

	if ( '0' == get_option('blog_public') )

		wp_no_robots();

}

2457

nocache_headers

Definition:
function nocache_headers() {}

Sets the headers to prevent caching for the different browsers.
Different browsers support different nocache headers, so several headers must be sent so that all of them get the point that no caching should occur.

Source code

function nocache_headers() {

	$headers = wp_get_nocache_headers();

	foreach( $headers as $name => $field_value )

		@header("{$name}: {$field_value}");

2455

next_widget_id_number

Definition:
function next_widget_id_number($id_base) {}

Parameters

  • $id_base

Source code

function next_widget_id_number($id_base) {

	global $wp_registered_widgets;

	$number = 1;



	foreach ( $wp_registered_widgets as $widget_id => $widget ) {

		if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) )

			$number = max($number, $matches[1]);

	}

	$number++;



	return $number;

}

2453

next_post_rel_link

Definition:
function next_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {}

Display relational link for the next post adjacent to the current post.

Parameters

  • string $title: Optional. Link title format.
  • bool $in_same_cat: Optional. Whether link should be in a same category.
  • array|string $excluded_categories: Optional. Array or comma-separated list of excluded category IDs.

Source code

function next_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {

	echo get_adjacent_post_rel_link($title, $in_same_cat, $excluded_categories = '', false);

}

2451