Файловый менеджер - Редактировать - /home2/cocinasdalloway/constructorasmn.com/wp-content/themes/catch-fullscreen/inc/customizer/custom-controls.php
Назад
<?php /** * Custom Controls * * @package Catch_Fullscreen */ /** * Add Custom Controls * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function catch_fullscreen_custom_controls( $wp_customize ) { // Custom control for Important Links. class Catch_Fullscreen_Important_Links_Control extends WP_Customize_Control { public $type = 'important-links'; public function render_content() { // Add Theme instruction, Support Forum, Changelog, Donate link, Review, Facebook, Twitter, Google+, Pinterest links. $important_links = array( 'theme_instructions' => array( 'link' => esc_url( 'https://catchthemes.com/theme-instructions/catch-fullscreen/' ), 'text' => esc_html__( 'Theme Instructions', 'catch-fullscreen' ), ), 'support' => array( 'link' => esc_url( 'https://catchthemes.com/support/' ), 'text' => esc_html__( 'Support', 'catch-fullscreen' ), ), 'changelog' => array( 'link' => esc_url( 'https://catchthemes.com/changelogs/catch-fullscreen-theme/' ), 'text' => esc_html__( 'Changelog', 'catch-fullscreen' ), ), 'facebook' => array( 'link' => esc_url( 'https://www.facebook.com/catchthemes/' ), 'text' => esc_html__( 'Facebook', 'catch-fullscreen' ), ), 'twitter' => array( 'link' => esc_url( 'https://twitter.com/catchthemes/' ), 'text' => esc_html__( 'Twitter', 'catch-fullscreen' ), ), 'gplus' => array( 'link' => esc_url( 'https://plus.google.com/+Catchthemes/' ), 'text' => esc_html__( 'Google+', 'catch-fullscreen' ), ), 'pinterest' => array( 'link' => esc_url( 'http://www.pinterest.com/catchthemes/' ), 'text' => esc_html__( 'Pinterest', 'catch-fullscreen' ), ), ); foreach ( $important_links as $important_link ) { echo '<p><a target="_blank" href="' . $important_link['link'] . '" >' . $important_link['text'] . ' </a></p>'; // WPCS: XSS OK. } } } // Custom control for dropdown category multiple select. class Catch_Fullscreen_Multi_Categories_Control extends WP_Customize_Control { public $type = 'dropdown-categories'; public function render_content() { $dropdown = wp_dropdown_categories( array( 'name' => $this->id, 'echo' => 0, 'hide_empty' => false, 'show_option_none' => false, 'hide_if_empty' => false, 'show_option_all' => esc_html__( 'All Categories', 'catch-fullscreen' ), ) ); $dropdown = str_replace( '<select', '<select multiple = "multiple" style = "height:150px;" ' . $this->get_link(), $dropdown ); printf( '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',esc_html( $this->label ), $dropdown ); // WPCS: XSS OK. echo '<p class="description">' . esc_html__( 'Hold down the Ctrl (windows) / Command (Mac) button to select multiple options.', 'catch-fullscreen' ) . '</p>'; } } // Custom control for any note, use label as output description. class Catch_Fullscreen_Note_Control extends WP_Customize_Control { public $type = 'description'; public function render_content() { echo '<h2 class="description">' . $this->label . '</h2>'; // WPCS: XSS OK. } } } add_action( 'customize_register', 'catch_fullscreen_custom_controls', 1 );
| ver. 1.4 |
Github
|
.
| PHP 8.2.22 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка