WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#43161 closed defect (bug) (invalid)

add_theme_support('custom-header')

Reported by: santipm Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.2
Component: General Keywords:
Focuses: administration Cc:

Description

No Working

<?php

$defaults = array(
                        'default-image'          => '',
                        'width'                  => 0,
                        'height'                 => 0,
                        'flex-height'            => false,
                        'flex-width'             => false,
                        'uploads'                => false,
                        'random-default'         => true,
                        'header-text'            => true,
                        'default-text-color'     => '#000',
                        'wp-head-callback'       => '_entro',
                        'admin-head-callback'    => 'admin_header_style',
                        'admin-preview-callback' => '',
                );

add_theme_support( 'custom-header', $defaults );

//Access Panel admin Aparencce->Header 
function admin_header_style() {
        echo '<script type=""text/javascript">console.log("admin script")</script>';
}



//its works 
add_action('admin-head','admin_header_style' );

Change History (2)

#1 @santipm
3 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @netweb
3 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.