Custom_Image_Header::__construct()

最后更新于:2021-11-25 19:50:37

Custom_Image_Header::__construct( callable$admin_header_callback, callable$admin_image_div_callback=”)

Constructor – Register administration header callback.

参数

$admin_header_callback

(callable) (Required)

$admin_image_div_callback

(callable) (Optional) custom image div output callback.

Default value: ”

源文件

文件: gc-admin/includes/class-custom-image-header.php

	public function __construct( $admin_header_callback, $admin_image_div_callback = '' ) {
		$this->admin_header_callback    = $admin_header_callback;
		$this->admin_image_div_callback = $admin_image_div_callback;

		add_action( 'admin_menu', array( $this, 'init' ) );

		add_action( 'customize_save_after', array( $this, 'customize_set_last_used' ) );
		add_action( 'gc_ajax_custom-header-crop', array( $this, 'ajax_header_crop' ) );
		add_action( 'gc_ajax_custom-header-add', array( $this, 'ajax_header_add' ) );
		add_action( 'gc_ajax_custom-header-remove', array( $this, 'ajax_header_remove' ) );
	}