diff --git a/header.php b/header.php index 7c2fb22..5dd93c7 100644 --- a/header.php +++ b/header.php @@ -14,45 +14,44 @@ >
- - - - ' . "\n"; + echo '' . "\n"; + if (is_front_page()) { $home_og_image = get_option('sophia_after_dark_home_og_image'); if ($home_og_image) { - echo '' . "\n"; + echo '' . "\n"; } - echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; } elseif (is_single() || is_page()) { global $post; if (has_post_thumbnail($post->ID)) { - $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'og-image-size'); - if ($thumbnail) { - echo '' . "\n"; - // Uncomment and adjust the following lines if needed + $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'og-image-size'); + if ($thumbnail) { + echo '' . "\n"; // $thumbnail_url = esc_url($thumbnail[0]); // $thumbnail_parts = pathinfo($thumbnail_url); // $thumbnail_new_url = $thumbnail_parts['dirname'] . '/' . $thumbnail_parts['filename'] . '-1536x878.' . $thumbnail_parts['extension']; // echo '' . "\n"; } } else { - echo '' . "\n"; + echo '' . "\n"; } echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; } + echo '' . "\n"; + wp_head(); ?> - > diff --git a/inc/customizer/mt-customizer-general-panel-options.php b/inc/customizer/mt-customizer-general-panel-options.php index 3d95aa3..f7adbd0 100644 --- a/inc/customizer/mt-customizer-general-panel-options.php +++ b/inc/customizer/mt-customizer-general-panel-options.php @@ -49,7 +49,7 @@ function sophia_after_dark_customize_general_panels_sections_register( $wp_custo ) ) ); - $wp_customize->add_control(new WP_Customize_Image_control( + $wp_customize->add_control(new Sophia_After_Dark_Image_control( $wp_customize, 'sophia_after_dark_home_og_image', array( 'label' => __('Home Page Open Graph Image', 'sophia_after_dark'), 'section' => 'sophia_after_dark_section_site', diff --git a/inc/customizer/mt-customizer.php b/inc/customizer/mt-customizer.php index 285e884..e95799d 100644 --- a/inc/customizer/mt-customizer.php +++ b/inc/customizer/mt-customizer.php @@ -25,6 +25,7 @@ function sophia_after_dark_customize_register( $wp_customize ) { $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_setting('sophia_after_dark_home_og_user', array('default' => 1,'sanitize_callback' => 'absint','type' => 'option',)); + $wp_customize->add_setting('sophia_after_dark_mastodon', array('default' => 1,'sanitize_callback' => 'absint','type' => 'option',)); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array(