Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/generatepress-premium   php

Repository URL to install this package:

Version: 2.2.2 

/ customizer / controls / class-title-control.php

<?php
// No direct access, please
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'GeneratePress_Title_Customize_Control' ) ) :
/**
 * Create a control to display titles within our sections
 */
class GeneratePress_Title_Customize_Control extends WP_Customize_Control {
	public $type = 'generatepress-customizer-title';
	public $title = '';
	
	public function enqueue() {
		wp_enqueue_style( 'generatepress-title-customize-control', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'css/title-customizer.css', array(), GP_PREMIUM_VERSION );
	}

	public function to_json() {
		parent::to_json();
		$this->json[ 'title' ] = esc_html( $this->title );
	}
	
	public function content_template() {
		?>
		<div class="generatepress-customizer-title">
			<span>{{ data.title }}</span>
		</div>
		<?php
	}
}
endif;