WPDev.one
Core Class

Custom_Image_Header

class Custom_Image_Header // Constructor: function Object() { [native code] }

The custom header image class.

Methods 33 methods

Method / Return Description
__construct()
void

Constructor - Registers administration header callback.

Parameters: $admin_header_callback: mixed, $admin_image_div_callback: mixed
init()
void

Sets up the hooks for the Custom Header admin page.

help()
void

Adds contextual help.

step()
int

Gets the current step.

js_includes()
void

Sets up the enqueue for the JavaScript files.

css_includes()
void

Sets up the enqueue for the CSS files.

take_action()
void

Executes custom header modification.

process_default_headers()
void

Processes the default headers.

show_header_selector()
void

Displays UI for selecting one of several default headers.

Parameters: $type: mixed
js()
void

Executes JavaScript depending on step.

js_1()
void

Displays JavaScript based on Step 1 and 3.

js_2()
void

Displays JavaScript based on Step 2.

step_1()
void

Displays first step of custom header image page.

step_2()
void

Displays second step of custom header image page.

step_2_manage_upload()
void

Uploads the file to be cropped in the second step.

step_3()
void

Displays third step of custom header image page.

finished()
void

Displays last step of custom header image page.

admin_page()
void

Displays the page based on the current step.

attachment_fields_to_edit()
array

Unused since 3.5.0.

Parameters: $form_fields: mixed
filter_upload_tabs()
array

Unused since 3.5.0.

Parameters: $tabs: mixed
set_header_image()
void

Chooses a header image, selected from existing uploaded and default headers,

Parameters: $choice: mixed
remove_header_image()
void

Removes a header image.

reset_header_image()
void

Resets a header image to the default image for the theme.

get_header_dimensions()
array

Calculates width and height based on what the currently selected theme supports.

Parameters: $dimensions: mixed
create_attachment_object()
array

Creates an attachment 'object'.

Parameters: $cropped: mixed, $parent_attachment_id: mixed
insert_attachment()
int

Inserts an attachment and its metadata.

Parameters: $attachment: mixed, $cropped: mixed
ajax_header_crop()
void

Gets attachment uploaded by Media Manager, crops it, then saves it as a

ajax_header_add()
void

Given an attachment ID for a header image, updates its "last used"

ajax_header_remove()
void

Given an attachment ID for a header image, unsets it as a user-uploaded

customize_set_last_used()
void

Updates the last-used postmeta on a header image attachment after saving a new header image via the Customizer.

Parameters: $wp_customize: mixed
get_default_header_images()
array

Gets the details of default header images if defined.

get_uploaded_header_images()
array

Gets the previously uploaded header images.

get_previous_crop()
(int

Gets the ID of a previous crop from the same base image.

Parameters: $attachment: mixed

Properties

Property / Type Description
$admin_header_callback
mixed
public
No description available.
$admin_image_div_callback
mixed
public
No description available.
$default_headers
mixed
public
No description available.
$updated
mixed
public
No description available.

Class Information

Since Version
2.1.0
Source File
wp-admin/includes/class-custom-image-header.php
Advertisement