D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
themes
/
aeen
/
inc
/
customizer
/
settings
/
Filename :
gallery.php
back
Copy
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\aeen\Customizer\Settings; use radiustheme\aeen\Customizer\RDTheme_Customizer; use radiustheme\aeen\Customizer\Controls\Customizer_Switch_Control; use radiustheme\aeen\Customizer\Controls\Customizer_Image_Radio_Control; /** * Adds the individual sections, settings, and controls to the theme customizer */ class RDTheme_Gallery_Post_Settings extends RDTheme_Customizer { public function __construct() { parent::instance(); $this->populated_default_data(); // Add Controls add_action( 'customize_register', array( $this, 'register_gallery_post_controls' ) ); } /** * Gallery Post Controls */ public function register_gallery_post_controls( $wp_customize ) { // Posts per page $wp_customize->add_setting( 'gallery_archive_number', array( 'default' => $this->defaults['gallery_archive_number'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_sanitize_integer' ) ); $wp_customize->add_control( 'gallery_archive_number', array( 'label' => __( 'Posts Per Page', 'aeen' ), 'section' => 'gallery_section', 'type' => 'number' ) ); $wp_customize->add_setting( 'gallery_style', array( 'default' => $this->defaults['gallery_style'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_radio_sanitization' ) ); $wp_customize->add_control( new Customizer_Image_Radio_Control( $wp_customize, 'gallery_style', array( 'label' => __( 'Layout', 'aeen' ), 'description' => esc_html__( 'Select the gallery layout for gallery page', 'aeen' ), 'section' => 'gallery_section', 'choices' => array( '1' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/grid.png', 'name' => __( 'Grid Layout', 'aeen' ) ), '2' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/masonry.png', 'name' => __( 'Masonry Layout', 'aeen' ) ), '3' => array( 'image' => trailingslashit( get_template_directory_uri() ) . 'assets/img/proof.png', 'name' => __( 'Proof Layout', 'aeen' ) ) ) ) ) ); // Logo Area Width $wp_customize->add_setting( 'gallery_cols_width', array( 'default' => $this->defaults['gallery_cols_width'], 'transport' => 'refresh', 'sanitize_callback' => 'rttheme_radio_sanitization' ) ); $wp_customize->add_control( 'gallery_cols_width', array( 'label' => __( 'Gallery Columns', 'aeen' ), 'section' => 'gallery_section', 'description' => esc_html__( 'Width is defined by the number of bootstrap columns. Please note, gallery columns devided by the selected bootstrap columns', 'aeen' ), 'type' => 'select', 'choices' => array( '6' => esc_html__( '2 Columns', 'aeen' ), '4' => esc_html__( '3 Columns', 'aeen' ), '3' => esc_html__( '4 Columns', 'aeen' ), '2' => esc_html__( '6 Columns', 'aeen' ), ) ) ); } } /** * Initialise our Customizer settings only when they're required */ if ( class_exists( 'WP_Customize_Control' ) ) { new RDTheme_Gallery_Post_Settings(); }