add Open Graph support! (that looks good XD)
This commit is contained in:
@ -20,10 +20,12 @@ function sophia_after_dark_customize_register( $wp_customize ) {
|
||||
$wp_customize->get_section( 'background_image' )->priority = '15';
|
||||
$wp_customize->get_section( 'static_front_page' )->panel = 'sophia_after_dark_general_panel';
|
||||
$wp_customize->get_section( 'static_front_page' )->priority = '20';
|
||||
|
||||
$wp_customize->get_section( 'header_image' )->panel = 'sophia_after_dark_header_panel';
|
||||
$wp_customize->get_section( 'header_image' )->priority = '5';
|
||||
$wp_customize->get_section( 'header_image' )->description = __( 'Header Image for only Innerpages', 'sophia-after-dark' );
|
||||
$wp_customize->add_setting('sophia_after_dark_home_og_image', array('default' => '','sanitize_callback' => 'esc_url_raw','type' => 'option',));
|
||||
$wp_customize->add_control(new WP_Customize_Image_control($wp_customize, 'sophia_after_dark_home_og_image', array('label' => __('Home Page Open Graph Image', 'sophia_after_dark'),'section' => 'title_tagline','settings' => 'sophia_after_dark_home_og_image',)));
|
||||
|
||||
|
||||
if ( isset( $wp_customize->selective_refresh ) ) {
|
||||
$wp_customize->selective_refresh->add_partial( 'blogname', array(
|
||||
@ -78,10 +80,8 @@ add_action( 'customize_preview_init', 'sophia_after_dark_customize_preview_js' )
|
||||
*/
|
||||
function sophia_after_dark_customize_backend_scripts() {
|
||||
global $sophia_after_dark_theme_version;
|
||||
|
||||
wp_enqueue_style( 'sophia-after-dark--admin-customizer-style', get_template_directory_uri() . '/assets/css/mt-customizer-styles.css', array(), esc_attr( esc_attr( $sophia_after_dark_theme_version ) ) );
|
||||
wp_enqueue_style( 'jquery-ui', esc_url( get_template_directory_uri() . '/assets/css/jquery-ui.css' ) );
|
||||
|
||||
wp_enqueue_script( 'sophia-after-dark--admin-customizer-script', get_template_directory_uri() . '/assets/js/mt-customizer-controls.js', array( 'jquery', 'customize-controls' ), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
}
|
||||
add_action( 'customize_controls_enqueue_scripts', 'sophia_after_dark_customize_backend_scripts', 10 );
|
||||
@ -89,6 +89,8 @@ add_action( 'customize_controls_enqueue_scripts', 'sophia_after_dark_customize_b
|
||||
/**
|
||||
* Add Kirki required file for custom fields
|
||||
*/
|
||||
require get_template_directory() . '/inc/customizer/mt-customizer-additional-open-graph.php';
|
||||
|
||||
require get_template_directory() . '/inc/customizer/mt-customizer-custom-classes.php';
|
||||
require get_template_directory() . '/inc/customizer/mt-customizer-panels.php';
|
||||
require get_template_directory() . '/inc/customizer/mt-sanitize.php';
|
||||
|
Reference in New Issue
Block a user