On this page
Custom_Background::init()
Sets up the hooks for the Custom Background admin page.
Source
File: wp-admin/includes/class-custom-background.php. View all references
public function init() {
$page = add_theme_page( __( 'Background' ), __( 'Background' ), 'edit_theme_options', 'custom-background', array( $this, 'admin_page' ) );
if ( ! $page ) {
return;
}
add_action( "load-{$page}", array( $this, 'admin_load' ) );
add_action( "load-{$page}", array( $this, 'take_action' ), 49 );
add_action( "load-{$page}", array( $this, 'handle_upload' ), 49 );
if ( $this->admin_header_callback ) {
add_action( "admin_head-{$page}", $this->admin_header_callback, 51 );
}
}
Related
Uses
| Uses | Description |
|---|---|
| add_theme_page() wp-admin/includes/plugin.php | Adds a submenu page to the Appearance main menu. |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
| add_action() wp-includes/plugin.php | Adds a callback function to an action hook. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/custom_background/init