_search_plugins_filter_callback

Definition:
function _search_plugins_filter_callback($plugin) {}

Parameters

  • $plugin

Source code

	function _search_plugins_filter_callback($plugin) {

		static $term;

		if ( is_null($term) )

			$term = stripslashes($_GET['s']);

		if ( 	stripos($plugin['Name'], $term) !== false ||

				stripos($plugin['Description'], $term) !== false ||

				stripos($plugin['Author'], $term) !== false ||

				stripos($plugin['PluginURI'], $term) !== false ||

				stripos($plugin['AuthorURI'], $term) !== false ||

				stripos($plugin['Version'], $term) !== false )

			return true;

		else

			return false;

	}

4369

_rotate_image_resource

Definition:
function _rotate_image_resource($img, $angle) {}

Parameters

  • $img
  • $angle

Source code

function _rotate_image_resource($img, $angle) {

	if ( function_exists('imagerotate') ) {

		$rotated = imagerotate($img, $angle, 0);

		if ( is_resource($rotated) ) {

			imagedestroy($img);

			$img = $rotated;

		}

	}

	return $img;

}

4367

_response_to_rss

Definition:
function _response_to_rss ($resp) {}

Retrieve

Parameters

  • unknown_type $resp

Source code

function _response_to_rss ($resp) {

	$rss = new MagpieRSS( $resp->results );



	// if RSS parsed successfully

	if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) {



		// find Etag, and Last-Modified

		foreach( (array) $resp->headers as $h) {

			// 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"

			if (strpos($h, ": ")) {

				list($field, $val) = explode(": ", $h, 2);

			}

			else {

				$field = $h;

				$val = "";

			}



			if ( $field == 'etag' ) {

				$rss->etag = $val;

			}



			if ( $field == 'last-modified' ) {

				$rss->last_modified = $val;

			}

		}



		return $rss;

	} // else construct error message

	else {

		$errormsg = "Failed to parse RSS file.";



		if ($rss) {

			$errormsg .= " (" . $rss->ERROR . ")";

		}

		// error($errormsg);



		return false;

	} // end if ($rss and !$rss->error)

}

4365

_register_widget_update_callback

Definition:
function _register_widget_update_callback($id_base, $update_callback, $options = array() {}

Parameters

  • $id_base
  • $update_callback
  • $options

Source code

function _register_widget_update_callback($id_base, $update_callback, $options = array()) {

	global $wp_registered_widget_updates;



	if ( isset($wp_registered_widget_updates[$id_base]) ) {

		if ( empty($update_callback) )

			unset($wp_registered_widget_updates[$id_base]);

		return;

	}



	$widget = array(

		'callback' => $update_callback,

		'params' => array_slice(func_get_args(), 3)

	);



	$widget = array_merge($widget, $options);

	$wp_registered_widget_updates[$id_base] = $widget;

}

4363

_register_widget_form_callback

Definition:
function _register_widget_form_callback($id, $name, $form_callback, $options = array() {}

Parameters

  • $id
  • $name
  • $form_callback
  • $options

Source code

function _register_widget_form_callback($id, $name, $form_callback, $options = array()) {

	global $wp_registered_widget_controls;



	$id = strtolower($id);



	if ( empty($form_callback) ) {

		unset($wp_registered_widget_controls[$id]);

		return;

	}



	if ( isset($wp_registered_widget_controls[$id]) && !did_action( 'widgets_init' ) )

		return;



	$defaults = array('width' => 250, 'height' => 200 );

	$options = wp_parse_args($options, $defaults);

	$options['width'] = (int) $options['width'];

	$options['height'] = (int) $options['height'];



	$widget = array(

		'name' => $name,

		'id' => $id,

		'callback' => $form_callback,

		'params' => array_slice(func_get_args(), 4)

	);

	$widget = array_merge($widget, $options);



	$wp_registered_widget_controls[$id] = $widget;

}

4361