PATH:
home
/
centosnipponia
/
public_html
/
sweetrich
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
customizer
/
controls
<?php /** * Create page control * * @package Sydney * */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } class Sydney_Create_Page_Control extends WP_Customize_Control { /** * The type of control being rendered */ public $type = 'sydney-create-page-control'; public $page_title = ''; public $page_meta_key = ''; public $page_meta_value = ''; public $option_name = ''; /** * Constructor */ public function __construct( $manager, $id, $args = array(), $options = array() ) { parent::__construct( $manager, $id, $args ); } /** * Render the control in the customizer */ public function render_content() { $page_id = get_option( $this->option_name ); if( $page_id && post_exists( get_the_title( $page_id ) ) && get_post_status( $page_id ) === 'publish' ) { echo wp_kses_post( sprintf( /* translators: 1: link to edit page */ __( 'Your page is created!<br>Click <a href="%s" target="_blank">here</a> if you want to edit the page.', 'sydney' ), esc_url( get_admin_url() . 'post.php?post='. $page_id .'&action=edit' ) ) ); } else { echo '<div class="sydney-create-page-control-create-message">'; echo wp_kses_post( sprintf( /* translators: 1: page name */ __( 'It looks like you haven\'t created a <strong>%s</strong> page yet. Click the below button to create the page.', 'sydney' ), esc_html( $this->page_title ) ) ); echo '<br><br>'; echo '</div>'; echo '<div class="sydney-create-page-control-success-message" style="display: none;">'; echo wp_kses_post( sprintf( /* translators: 1: link to edit page */ __( 'Page created with success!<br>Click <a href="%s" target="_blank">here</a> if you want to edit the page.<br><br>If you want to show a link to this page, assign the page to a menu by clicking <a href="#" data-goto="nav_menus" data-type="panel">here</a>', 'sydney' ), esc_url( get_admin_url() . 'post.php?post=&action=edit' ) ) ); echo '</div>'; echo wp_kses_post( sprintf( /* translators: 1: page title, 2: page meta key, 3: page meta value, 4: option name, 5: nonce, 6: loading text, 7: success text */ __( '<a href="#" class="sydney-create-page-control-button button" data-page-title="%1$s" data-page-meta-key="%2$s" data-page-meta-value="%3$s" data-option-name="%4$s" data-nonce="%5$s" data-creating-text="%6$s" data-created-text="%7$s">Create Page</a>', 'sydney' ), esc_attr( $this->page_title ), esc_attr( $this->page_meta_key ), esc_attr( $this->page_meta_value ), esc_attr( $this->option_name ), esc_attr( wp_create_nonce( 'customize-create-page-control-nonce' ) ), esc_attr__( 'Creating...', 'sydney' ), esc_attr__( 'Created!', 'sydney' ) ) ); } } }
[+]
..
[+]
accordion
[+]
alpha-color
[+]
custom-sidebars
[+]
display-conditions
[+]
multiple-select
[+]
quick-links
[+]
radio-buttons
[+]
radio-images
[+]
repeater
[+]
responsive-slider
[+]
toggle
[+]
typography
[+]
typography-adobe
[-] class_sydney_create_page_control.php
[edit]
[-] class_sydney_divider_control.php
[edit]
[-] class_sydney_posts_control.php
[edit]
[-] class_sydney_tab_control.php
[edit]
[-] class_sydney_text_control.php
[edit]
[-] class_sydney_tinymce_control.php
[edit]
[-] control-checkbox-multiple.php
[edit]
[-] .htaccess.disabled
[edit]