Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fcojgodoy
committed
Dec 28, 2016
1 parent
8f3973c
commit 414efaa
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
add_theme_support( 'custom-header' ); | ||
|
||
function themename_custom_header_setup() { | ||
$defaults = array( | ||
// Default Header Image to display | ||
'default-image' => get_template_directory_uri() . '/images/headers/default.jpg', | ||
// Display the header text along with the image | ||
'header-text' => true, | ||
// Header text color default | ||
'default-text-color' => '000', | ||
// Header image width (in pixels) | ||
'width' => 1000, | ||
// Header image height (in pixels) | ||
'height' => 198, | ||
// Width will be used as suggested dimensions instead | ||
'flex-width' => true, | ||
// Height will be used as suggested dimensions instead | ||
'flex-height' => true, | ||
// Header image random rotation default | ||
'random-default' => false, | ||
// Enable upload of image file in admin | ||
'uploads' => true, | ||
// function to be called in theme head section | ||
'wp-head-callback' => 'wphead_cb', | ||
// function to be called in preview page head section | ||
'admin-head-callback' => 'adminhead_cb', | ||
// function to produce preview markup in the admin screen | ||
'admin-preview-callback' => 'adminpreview_cb', | ||
); | ||
} | ||
add_action( 'after_setup_theme', __NAMESPACE__ . '\\themename_custom_header_setup' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters