??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/pgtankstorage.sg/wp-content/themes/wise-news/inc/customizer-settings/customizer.php
⬅ Kembali
<?php
/**
* Wise News Theme Customizer
*
* @package Wise News
*/
// upgrade to pro.
require get_template_directory() . '/inc/customizer-settings/upgrade-to-pro/class-customize.php';
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function wise_news_customize_register( $wp_customize ) {
// Custom Controls.
require get_template_directory() . '/inc/customizer-settings/custom-controller.php';
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial(
'blogname',
array(
'selector' => '.site-title a',
'render_callback' => 'wise_news_customize_partial_blogname',
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription',
array(
'selector' => '.site-description',
'render_callback' => 'wise_news_customize_partial_blogdescription',
)
);
}
// Header text display setting.
$wp_customize->add_setting(
'wise_news_header_text_display',
array(
'default' => true,
'sanitize_callback' => 'wise_news_sanitize_checkbox',
)
);
$wp_customize->add_control(
'wise_news_header_text_display',
array(
'section' => 'title_tagline',
'type' => 'checkbox',
'label' => esc_html__( 'Display Site Title and Tagline', 'wise-news' ),
)
);
// Archive Page title.
$wp_customize->add_setting(
'wise_news_archive_page_title',
array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control(
'wise_news_archive_page_title',
array(
'label' => esc_html__( 'Archive Posts Title', 'wise-news' ),
'section' => 'static_front_page',
'active_callback' => 'wise_news_is_latest_posts',
)
);
// Abort if selective refresh is not available.
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial(
'wise_news_archive_page_title',
array(
'selector' => '.home .site-main h3.section-title',
'settings' => 'wise_news_archive_page_title',
'container_inclusive' => false,
'fallback_refresh' => true,
'render_callback' => 'wise_news_archive_page_title_text_partial',
)
);
}
/*========================Partial Refresh==============================*/
if ( ! function_exists( 'wise_news_archive_page_title_text_partial' ) ) :
// Archive Page Title.
function wise_news_archive_page_title_text_partial() {
return esc_html( get_theme_mod( 'wise_news_archive_page_title' ) );
}
endif;
// Enable Homepage Content.
$wp_customize->add_setting(
'wise_news_enable_frontpage_content',
array(
'default' => false,
'sanitize_callback' => 'wise_news_sanitize_checkbox',
)
);
$wp_customize->add_control(
'wise_news_enable_frontpage_content',
array(
'label' => esc_html__( 'Enable Homepage Content', 'wise-news' ),
'description' => esc_html__( 'Check to enable the selected homepage content on the front page.', 'wise-news' ),
'section' => 'static_front_page',
'type' => 'checkbox',
'active_callback' => 'wise_news_is_static_homepage_enabled',
)
);
// Color Customizer Setting.
require get_template_directory() . '/inc/customizer-settings/color.php';
// frontpage customizer section.
require get_template_directory() . '/inc/customizer-settings/frontpage-customizer/customizer-sections.php';
// theme options customizer section.
require get_template_directory() . '/inc/customizer-settings/customizer-hub/theme-options-sections.php';
}
add_action( 'customize_register', 'wise_news_customize_register' );
// Sanitize callback.
require get_template_directory() . '/inc/sanitize-callback.php';
/**
* Render the site title for the selective refresh partial.
*
* @return void
*/
function wise_news_customize_partial_blogname() {
bloginfo( 'name' );
}
/**
* Render the site tagline for the selective refresh partial.
*
* @return void
*/
function wise_news_customize_partial_blogdescription() {
bloginfo( 'description' );
}
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function wise_news_customize_preview_js() {
wp_enqueue_script( 'wise-news-customizer', get_template_directory_uri() . '/assets/js/customizer.min.js', array( 'customize-preview' ), WISE_NEWS_VERSION, true );
}
add_action( 'customize_preview_init', 'wise_news_customize_preview_js' );
/**
* Binds JS handlers for Customizer controls.
*/
function wise_news_customize_control_js() {
wp_enqueue_style( 'wise-news-customize-style', get_template_directory_uri() . '/assets/css/customize-controls.min.css', array(), '1.0.0' );
wp_enqueue_script( 'wise-news-customize-control', get_template_directory_uri() . '/assets/js/customize-control.min.js', array( 'jquery', 'customize-controls' ), '1.0.0', true );
$localized_data = array(
'refresh_msg' => esc_html__( 'Refresh the page after Save and Publish.', 'wise-news' ),
'reset_msg' => esc_html__( 'Warning!!! This will reset all the settings. Refresh the page after Save and Publish to reset all.', 'wise-news' ),
);
wp_localize_script( 'wise-news-customize-control', 'localized_data', $localized_data );
}
add_action( 'customize_controls_enqueue_scripts', 'wise_news_customize_control_js' );
Nama
Tipe
Ukuran
Diubah
Aksi
📁 customizer-hub
dir
—
2026-05-26 00:30
📁 frontpage-customizer
dir
—
2026-05-26 00:30
📁 upgrade-to-pro
dir
—
2026-05-26 00:30
🐘 color.php
php
472 B
2026-05-26 00:30
🐘 custom-controller.php
php
1.9 KB
2026-05-26 00:30
🐘 customizer.php
php
5.6 KB
2026-05-26 00:30