__( 'Main Menu', 'pixgraphy' ) ) ); /* * Enable support for custom logo. * */ add_theme_support( 'custom-logo', array( 'flex-width' => true, 'flex-height' => true, ) ); //Indicate widget sidebars can use selective refresh in the Customizer. add_theme_support( 'customize-selective-refresh-widgets' ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /** * Add support for the Aside Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'pixgraphy_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); add_editor_style( array( 'css/editor-style.css') ); /** * Making the theme Woocommrece compatible */ add_theme_support( 'woocommerce' ); } endif; // pixgraphy_setup add_action( 'after_setup_theme', 'pixgraphy_setup' ); /***************************************************************************************/ function pixgraphy_content_width() { if ( is_page_template( 'page-templates/gallery-template.php' ) || is_attachment() ) { global $content_width; $content_width = 1170; } } add_action( 'template_redirect', 'pixgraphy_content_width' ); /***************************************************************************************/ if(!function_exists('pixgraphy_get_theme_options')): function pixgraphy_get_theme_options() { return wp_parse_args( get_option( 'pixgraphy_theme_options', array() ), pixgraphy_get_option_defaults_values() ); } endif; /***************************************************************************************/ require get_template_directory() . '/inc/customizer/pixgraphy-default-values.php'; require( get_template_directory() . '/inc/settings/pixgraphy-functions.php' ); require( get_template_directory() . '/inc/settings/pixgraphy-common-functions.php' ); require get_template_directory() . '/inc/jetpack.php'; require get_template_directory() . '/inc/footer-details.php'; /************************ Pixgraphy Widgets *****************************/ require get_template_directory() . '/inc/widgets/widgets-functions/contactus-widgets.php'; require get_template_directory() . '/inc/widgets/widgets-functions/register-widgets.php'; /************************ Pixgraphy Customizer *****************************/ require get_template_directory() . '/inc/customizer/functions/sanitize-functions.php'; require get_template_directory() . '/inc/customizer/functions/register-panel.php'; function pixgraphy_customize_register( $wp_customize ) { if(!class_exists('Pixgraphy_Plus_Features')){ class Pixgraphy_Customize_upgrade extends WP_Customize_Control { public function render_content() { ?>




add_section('pixgraphy_upgrade_links', array( 'title' => __('About Pixgraphy', 'pixgraphy'), 'priority' => 1, )); $wp_customize->add_setting( 'pixgraphy_upgrade_links', array( 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new Pixgraphy_Customize_upgrade( $wp_customize, 'pixgraphy_upgrade_links', array( 'section' => 'pixgraphy_upgrade_links', 'settings' => 'pixgraphy_upgrade_links', ) ) ); } $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', 'container_inclusive' => false, 'render_callback' => 'pixgraphy_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'container_inclusive' => false, 'render_callback' => 'pixgraphy_customize_partial_blogdescription', ) ); } require get_template_directory() . '/inc/customizer/functions/design-options.php'; require get_template_directory() . '/inc/customizer/functions/theme-options.php'; require get_template_directory() . '/inc/customizer/functions/social-icons.php'; require get_template_directory() . '/inc/customizer/functions/featured-content-customizer.php' ; } /** * Render the site title for the selective refresh partial. * @see pixgraphy_customize_register() * @return void */ function pixgraphy_customize_partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * @see pixgraphy_customize_register() * @return void */ function pixgraphy_customize_partial_blogdescription() { bloginfo( 'description' ); } add_action( 'customize_register', 'pixgraphy_customize_register' ); add_action( 'customize_preview_init', 'pixgraphy_customize_preview_js' ); /******************* Front Page *************************/ function pixgraphy_display_front_page(){ require get_template_directory() . '/index.php'; } add_action('pixgraphy_show_front_page','pixgraphy_display_front_page'); /******************* Pixgraphy Header Display *************************/ function pixgraphy_header_display(){ $pixgraphy_settings = pixgraphy_get_theme_options(); $header_display = $pixgraphy_settings['pixgraphy_header_display']; if ($header_display == 'header_text') { ?>