* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Image_Checkbox_Custom_Control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'image_checkbox';
/**
* Enqueue our scripts and styles
*/
public function enqueue() {
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Render the control in the customizer
*/
public function render_content() {
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Text_Radio_Button_Custom_Control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'text_radio_button';
/**
* Enqueue our scripts and styles
*/
public function enqueue() {
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Render the control in the customizer
*/
public function render_content() {
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Image_Radio_Button_Custom_Control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'image_radio_button';
/**
* Enqueue our scripts and styles
*/
public function enqueue() {
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Render the control in the customizer
*/
public function render_content() {
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Slider_Custom_Control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'slider_control';
/**
* Enqueue our scripts and styles
*/
public function enqueue() {
wp_enqueue_script( 'ephemeris-custom-controls-js', trailingslashit( get_template_directory_uri() ) . 'js/customizer.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Render the control in the customizer
*/
public function render_content() {
?>
label ); ?>link(); ?> />
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Toggle_Switch_Custom_control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'toogle_switch';
/**
* Enqueue our scripts and styles
*/
public function enqueue(){
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Render the control in the customizer
*/
public function render_content(){
?>
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/maddisondesigns
*/
class Ephemeris_Google_Font_Select_Custom_Control extends WP_Customize_Control {
/**
* The type of control being rendered
*/
public $type = 'google_fonts';
/**
* The list of Google Fonts
*/
private $fontList = false;
/**
* The saved font values decoded from json
*/
private $fontValues = array();
/**
* The index of the saved font within the list of Google fonts
*/
private $fontListIndex = 0;
/**
* Get our list of fonts from the json file
*/
public function __construct( $manager, $id, $args = array(), $options = array() ) {
parent::__construct( $manager, $id, $args );
//Get the list of Google fonts
$this->fontList = $this->ephemeris_getGoogleFonts();
// Decode the default json font value
$this->fontValues = json_decode( $this->value() );
// Find the index of our default font within our list of Google fonts
$this->fontListIndex = $this->ephemeris_getFontIndex( $this->fontList, $this->fontValues->font );
}
/**
* Enqueue our scripts and styles
*/
public function enqueue() {
wp_enqueue_script( 'ephemeris-custom-controls-js', trailingslashit( get_template_directory_uri() ) . 'js/customizer.js', array( 'jquery' ), '1.0', true );
wp_enqueue_style( 'ephemeris-custom-controls-css', trailingslashit( get_template_directory_uri() ) . 'css/customizer.css', array(), '1.0', 'all' );
}
/**
* Export our List of Google Fonts to JavaScript
*/
public function to_json() {
parent::to_json();
$this->json['ephemerisfontslist'] = $this->fontList;
}
/**
* Render the control in the customizer
*/
public function render_content() {
if( !empty($this->fontList) ) {
?>