register_column_headers

Definition:
function register_column_headers($screen, $columns) {}

Register column headers for a particular screen. The header names will be listed in the Screen Options.

Parameters

  • string $screen: The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
  • array $columns: An array of columns with column IDs as the keys and translated column names as the values

Source code

function register_column_headers($screen, $columns) {

	global $_wp_column_headers;



	if ( is_string($screen) )

		$screen = convert_to_screen($screen);



	if ( !isset($_wp_column_headers) )

		$_wp_column_headers = array();



	$_wp_column_headers[$screen->id] = $columns;

}

2659

register_admin_color_schemes

Definition:
function register_admin_color_schemes() {}

Registers the default Admin color schemes

Source code

function register_admin_color_schemes() {

	wp_admin_css_color( 'classic', _x( 'Blue', 'admin color scheme' ), admin_url( 'css/colors-classic.css' ),

		array( '#5589aa', '#cfdfe9', '#d1e5ee', '#eff8ff' ) );

	wp_admin_css_color( 'fresh', _x( 'Gray', 'admin color scheme' ), admin_url( 'css/colors-fresh.css' ),

		array( '#7c7976', '#c6c6c6', '#e0e0e0', '#f1f1f1' ) );

}

2657

register_activation_hook

Definition:
function register_activation_hook($file, $function) {}

Set the activation hook for a plugin.
When a plugin is activated, the action ‘activate_PLUGINNAME’ hook is activated. In the name of this hook, PLUGINNAME is replaced with the name of the plugin, including the optional subdirectory. For example, when the plugin is located in wp-content/plugin/sampleplugin/sample.php, then the name of this hook will become ‘activate_sampleplugin/sample.php’. When the plugin consists of only one file and is (as by default) located at wp-content/plugin/sample.php the name of this hook will be ‘activate_sample.php’.

Parameters

  • string $file: The filename of the plugin including the path.
  • callback $function: the function hooked to the ‘activate_PLUGIN’ action.

Source code

function register_activation_hook($file, $function) {

	$file = plugin_basename($file);

	add_action('activate_' . $file, $function);

}

2655

refresh_user_details

Definition:
function refresh_user_details( $id ) {}

Parameters

  • $id

Source code

function refresh_user_details( $id ) {

	$id = (int) $id;



	if ( !$user = get_userdata( $id ) )

		return false;



	clean_user_cache( $id );



	return $id;

}

2653

refresh_blog_details

Definition:
function refresh_blog_details( $blog_id ) {}

Clear the blog details cache.

Parameters

  • int $blog_id: Blog ID

Source code

function refresh_blog_details( $blog_id ) {

	$blog_id = (int) $blog_id;

	$details = get_blog_details( $blog_id, false );



	wp_cache_delete( $blog_id , 'blog-details' );

	wp_cache_delete( $blog_id . 'short' , 'blog-details' );

	wp_cache_delete( md5( $details->domain . $details->path )  , 'blog-lookup' );

	wp_cache_delete( 'current_blog_' . $details->domain, 'site-options' );

	wp_cache_delete( 'current_blog_' . $details->domain . $details->path, 'site-options' );

}

2651