add_magic_quotes

Definition:
function add_magic_quotes( $array ) {}

Walks the array while sanitizing the contents.

Parameters

  • array $array: Array to used to walk while sanitizing contents.

Return values

returns:Sanitized $array.

Source code

function add_magic_quotes( $array ) {

	foreach ( (array) $array as $k => $v ) {

		if ( is_array( $v ) ) {

			$array[$k] = add_magic_quotes( $v );

		} else {

			$array[$k] = addslashes( $v );

		}

	}

	return $array;

}

245

add_image_size

Definition:
function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {}

Registers a new image size

Parameters

  • $name
  • $width
  • $height
  • $crop

Source code

function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {

	global $_wp_additional_image_sizes;

	$_wp_additional_image_sizes[$name] = array( 'width' => absint( $width ), 'height' => absint( $height ), 'crop' => (bool) $crop );

}

237

add_existing_user_to_blog

Definition:
function add_existing_user_to_blog( $details = false ) {}

Add a user to a blog based on details from maybe_add_existing_user_to_blog().

Parameters

  • array $details

Defined actions

  • added_existing_user
    do_action( 'added_existing_user', $details[ 'user_id' ], $result );

Source code

function add_existing_user_to_blog( $details = false ) {

	global $blog_id;



	if ( is_array( $details ) ) {

		$result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] );

		do_action( 'added_existing_user', $details[ 'user_id' ], $result );

	}

	return $result;

}

231

add_editor_style

Definition:
function add_editor_style( $stylesheet = 'editor-style.css' ) {}

Add callback for custom TinyMCE editor stylesheets.
The parameter $stylesheet is the name of the stylesheet, relative to the theme root. It also accepts an array of stylesheets. It is optional and defaults to ‘editor-style.css’.

Parameters

  • mixed $stylesheet: Optional. Stylesheet name or array thereof, relative to theme root. Defaults to ‘editor-style.css’

Source code

function add_editor_style( $stylesheet = 'editor-style.css' ) {



	add_theme_support( 'editor-style' );



	if ( ! is_admin() )

		return;



	global $editor_styles;

	$editor_styles = (array) $editor_styles;

	$stylesheet    = (array) $stylesheet;

	if ( is_rtl() ) {

		$rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]);

		$stylesheet[] = $rtl_stylesheet;

	}



	$editor_styles = array_merge( $editor_styles, $stylesheet );

}

229

add_dashboard_page

Definition:
function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {}

Add sub menu page to the Dashboard main menu.
This function takes a capability which will be used to determine whether or not a page is included in the menu.

Parameters

  • string $page_title: The text to be displayed in the title tags of the page when the menu is selected
  • string $menu_title: The text to be used for the menu
  • string $capability: The capability required for this menu to be displayed to the user.
  • string $menu_slug: The slug name to refer to this menu by (should be unique for this menu)
  • callback $function: The function to be called to output the content for this page.

Return values

returns:The resulting page’s hook_suffix, or false if the user does not have the capability required.

Source code

function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {

	return add_submenu_page( 'index.php', $page_title, $menu_title, $capability, $menu_slug, $function );

}

227