/** * Adding different options * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function supermag_customize_register($wp_customize) { $wp_customize->get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; /*saved options*/ $options = supermag_get_theme_options(); /*defaults options*/ $defaults = supermag_get_default_theme_options(); /* * file for customizer custom controls classes */ $supermag_custom_controls_file_path = supermag_file_directory('acmethemes/customizer/custom-controls.php'); require $supermag_custom_controls_file_path; /* * file for feature panel of home page */ $supermag_customizer_feature_option_file_path = supermag_file_directory('acmethemes/customizer/feature-section/feature-panel.php'); require $supermag_customizer_feature_option_file_path; /* * file for header panel */ $supermag_customizer_header_options_file_path = supermag_file_directory('acmethemes/customizer/header-options/header-panel.php'); require $supermag_customizer_header_options_file_path; /* * file for customizer footer section */ $supermag_customizer_footer_options_file_path = supermag_file_directory('acmethemes/customizer/footer-section/footer-section.php'); require $supermag_customizer_footer_options_file_path; /* * file for design/layout panel */ $supermag_customizer_design_options_file_path = supermag_file_directory('acmethemes/customizer/design-options/design-panel.php'); require $supermag_customizer_design_options_file_path; /* * file for single post sections */ $supermag_customizer_single_post_section_file_path = supermag_file_directory('acmethemes/customizer/single-posts/single-post-section.php'); require $supermag_customizer_single_post_section_file_path; /* * file for options panel */ $supermag_customizer_options_panel_file_path = supermag_file_directory('acmethemes/customizer/options/options-panel.php'); require $supermag_customizer_options_panel_file_path; /* * file for options reset */ $supermag_customizer_options_reset_file_path = supermag_file_directory('acmethemes/customizer/options/options-reset.php'); require $supermag_customizer_options_reset_file_path; /*removing*/ $wp_customize->remove_panel('header_image'); $wp_customize->remove_control('header_textcolor'); }
$wp_customize->add_panel('supermag-design-panel', array('priority' => 190, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Layout/Design Option', 'supermag'))); /* * file for default layout */ $supermag_customizer_default_layout_file_path = supermag_file_directory('acmethemes/customizer/design-options/default-layout.php'); require $supermag_customizer_default_layout_file_path; /* * file for sidebar layout */ $supermag_customizer_sidebar_layout_file_path = supermag_file_directory('acmethemes/customizer/design-options/sidebar-layout.php'); require $supermag_customizer_sidebar_layout_file_path; /* * file for blog layout */ $supermag_customizer_blog_layout_file_path = supermag_file_directory('acmethemes/customizer/design-options/blog-layout.php'); require $supermag_customizer_blog_layout_file_path; /* * file for color options */ $supermag_customizer_colors_options_file_path = supermag_file_directory('acmethemes/customizer/design-options/colors-options.php'); require $supermag_customizer_colors_options_file_path; /* * file for background image layout */ $supermag_customizer_background_image_file_path = supermag_file_directory('acmethemes/customizer/design-options/background-image.php'); require $supermag_customizer_background_image_file_path; /* * file for custom css */ $supermag_customizer_custom_css_file_path = supermag_file_directory('acmethemes/customizer/design-options/custom-css.php'); require $supermag_customizer_custom_css_file_path;
<?php /*adding feature options panel*/ $wp_customize->add_panel('supermag-feature-panel', array('priority' => 105, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Featured Section Options', 'supermag'), 'description' => __('Customize your awesome site feature section ', 'supermag'))); /* * file for feature slider category */ $supermag_customizer_feature_category_file_path = supermag_file_directory('acmethemes/customizer/feature-section/feature-category.php'); require $supermag_customizer_feature_category_file_path; /* * file for feature side */ $supermag_customizer_feature_side_file_path = supermag_file_directory('acmethemes/customizer/feature-section/feature-side.php'); require $supermag_customizer_feature_side_file_path; /* * file for feature section enable */ $supermag_customizer_feature_enable_file_path = supermag_file_directory('acmethemes/customizer/feature-section/feature-enable.php'); require $supermag_customizer_feature_enable_file_path;
$wp_customize->add_panel('supermag-header-panel', array('priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Header Options', 'supermag'), 'description' => __('Customize your awesome site header ', 'supermag'))); /* * file for header logo options */ $supermag_customizer_header_logo_file_path = supermag_file_directory('acmethemes/customizer/header-options/header-logo.php'); require $supermag_customizer_header_logo_file_path; /* * file for header date options */ $supermag_customizer_header_date_file_path = supermag_file_directory('acmethemes/customizer/header-options/header-date.php'); require $supermag_customizer_header_date_file_path; /* * file for header news options */ $supermag_customizer_header_news_file_path = supermag_file_directory('acmethemes/customizer/header-options/header-news.php'); require $supermag_customizer_header_news_file_path; /* * file for header social options */ $supermag_customizer_header_social_file_path = supermag_file_directory('acmethemes/customizer/header-options/social-options.php'); require $supermag_customizer_header_social_file_path; /* * file for header add options */ $supermag_customizer_header_ad_file_path = supermag_file_directory('acmethemes/customizer/header-options/ad-option.php'); require $supermag_customizer_header_ad_file_path; /* * file for header menu options */ $supermag_customizer_header_menu_option_file_path = supermag_file_directory('acmethemes/customizer/header-options/menu-option.php'); require $supermag_customizer_header_menu_option_file_path;
<?php /*adding theme options panel*/ $wp_customize->add_panel('supermag-options', array('priority' => 210, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Theme Options', 'supermag'), 'description' => __('Customize your awesome site with theme options ', 'supermag'))); /* * file for header breadcrumb options */ $supermag_customizer_options_breadcrumb_file_path = supermag_file_directory('acmethemes/customizer/options/breadcrumb.php'); require $supermag_customizer_options_breadcrumb_file_path; /* * file for header search options */ $supermag_customizer_options_search_file_path = supermag_file_directory('acmethemes/customizer/options/search.php'); require $supermag_customizer_options_search_file_path;
require $supermag_slider_selection_file_path; $supermag_slider_side_file_path = supermag_file_directory('acmethemes/hooks/slider-side.php'); require $supermag_slider_side_file_path; $supermag_hooks_header_file_path = supermag_file_directory('acmethemes/hooks/header.php'); require $supermag_hooks_header_file_path; $supermag_social_links_file_path = supermag_file_directory('acmethemes/hooks/social-links.php'); require $supermag_social_links_file_path; $supermag_hooks_dynamic_css_file_path = supermag_file_directory('acmethemes/hooks/dynamic-css.php'); require $supermag_hooks_dynamic_css_file_path; $supermag_hooks_footer_file_path = supermag_file_directory('acmethemes/hooks/footer.php'); require $supermag_hooks_footer_file_path; $supermag_comment_form_file_path = supermag_file_directory('acmethemes/hooks/comment-forms.php'); require $supermag_comment_form_file_path; $supermag_excerpts_form_file_path = supermag_file_directory('acmethemes/hooks/excerpts.php'); require $supermag_excerpts_form_file_path; $supermag_related_posts_file_path = supermag_file_directory('acmethemes/hooks/related-posts.php'); require $supermag_related_posts_file_path; /* * file for sidebar and widgets */ $supermag_acme_ad_widget = supermag_file_directory('acmethemes/sidebar-widget/acme-ad.php'); require $supermag_acme_ad_widget; $supermag_col_posts = supermag_file_directory('acmethemes/sidebar-widget/acme-col-posts.php'); require $supermag_col_posts; $supermag_sidebar = supermag_file_directory('acmethemes/sidebar-widget/sidebar.php'); require $supermag_sidebar; /* * file for core functions imported from functions.php while downloading Underscores */ $supermag_sidebar = supermag_file_directory('acmethemes/core.php'); require $supermag_sidebar;
if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'supermag_scripts'); /** * Enqueue admin scripts and styles. */ function supermag_admin_scripts($hook) { if ('widgets.php' == $hook) { wp_enqueue_media(); wp_enqueue_script('supermag-widgets-script', get_template_directory_uri() . '/assets/js/acme-widget.js', array('jquery'), '1.0.0'); } } add_action('admin_enqueue_scripts', 'supermag_admin_scripts'); /** * Custom template tags for this theme. */ $supermag_template_tags_file_path = supermag_file_directory('acmethemes/core/template-tags.php'); require $supermag_template_tags_file_path; /** * Custom functions that act independently of the theme templates. */ $supermag_extras_file_path = supermag_file_directory('acmethemes/core/extras.php'); require $supermag_extras_file_path; /** * Load Jetpack compatibility file. */ $supermag_jetpack_file_path = supermag_file_directory('acmethemes/core/jetpack.php'); require $supermag_jetpack_file_path;