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
<?php | |
add_action( 'wp_enqueue_scripts', 'jt_enqueue_scripts' ); | |
function jt_enqueue_scripts() { | |
wp_enqueue_script( 'wp-api' ); | |
wp_enqueue_script( 'wp-util' ); | |
} | |
add_action( 'wp_footer', 'jt_print_post_template', 25 ); |
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
<?php | |
/** | |
* The template for displaying home page. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* @package SKT Bakery |
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
<?php | |
class Hybrid_Customize_Control_Select extends WP_Customize_Control { | |
public $type = 'select-custom'; | |
public function to_json() { | |
parent::to_json(); | |
$this->json['choices'] = $this->choices; |
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
<?php | |
add_action( 'customize_register', 'my_customize_register' ); | |
function my_customize_register( $wp_customize ) { | |
$wp_customize->add_setting( | |
'color_xyz', | |
array( | |
'default' => '', |
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
<?php | |
/** | |
* A dropdown taxonomy terms `<select>` customizer control class. | |
* | |
* @package Hybrid | |
* @subpackage Classes | |
* @author Justin Tadlock <[email protected]> | |
* @copyright Copyright (c) 2008 - 2015, Justin Tadlock | |
* @link http://themehybrid.com/hybrid-core | |
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
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
<?php | |
/** | |
* Customize control class to handle color palettes. | |
* | |
* @package Hybrid | |
* @subpackage Classes | |
* @author Justin Tadlock <[email protected]> | |
* @copyright Copyright (c) 2008 - 2015, Justin Tadlock | |
* @link http://themehybrid.com/hybrid-core | |
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
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
<?php | |
/** | |
* The radio image customize control extends the WP_Customize_Control class. This class allows | |
* developers to create a list of image radio inputs. | |
* | |
* Note, the `$choices` array is slightly different than normal and should be in the form of | |
* `array( | |
* $value => array( 'url' => $image_url, 'label' => $text_label ), | |
* $value => array( 'url' => $image_url, 'label' => $text_label ), | |
* )` |
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
<?php | |
/* | |
Plugin Name: Fruity Fruit | |
Description: An example plugin to test saving multiple meta values. | |
*/ | |
add_action( 'add_meta_boxes_post', 'fruity_fruit_add_meta_boxes' ); | |
add_action( 'save_post', 'fruity_fruit_save_meta', 10, 2 ); | |
function fruity_fruit_add_meta_boxes() { |
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
<?php | |
/** | |
* Extends the WordPress background image customize control class, which allows a theme to register | |
* multiple default backgrounds for the user to choose from. To use this, the theme author | |
* should remove the 'background_image' control and add this control in its place. | |
* | |
* @since 0.1.0 | |
* @author Justin Tadlock <[email protected]> | |
* @copyright Copyright (c) 2013, Justin Tadlock | |
* @link http://justintadlock.com/archives/2013/10/13/registering-multiple-default-backgrounds |
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
<!DOCTYPE html> | |
<html lang="en-EN"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Test custom background & header</title> | |
</head> | |
<body class="wordpress" itemscope="itemscope" itemtype="http://schema.org/WebPage"> |