', esc_html__( 'Comments are closed.', 'dw-mekatron' ), '

'; } add_action( 'comment_form_comments_closed', 'dw_mekatron_closed_comments' ); endif; if ( ! function_exists( 'dw_mekatron_setup' ) ) : function dw_mekatron_setup() { load_theme_textdomain( 'dw-mekatron', get_template_directory() . '/languages' ); add_theme_support( 'custom-logo', array( 'height' => 166, 'width' => 449, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'title-tag' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'customize-selective-remekatron-widgets' ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150 ); add_image_size( 'dw-mekatron-single-post-thumbnail', 9999, 9999 ); add_image_size( 'dw-mekatron-homepage-featured', 350, 350 ); add_theme_support( 'starter-content', array( 'widgets' => array( 'left-sidebar' => array( array( 'text', array( 'title' => esc_html__( 'First Sidebar', 'dw-mekatron' ), 'text' => _x( 'This is some text in the first sidebar.', 'Theme Starter Content', 'dw-mekatron' ), ), ), ), 'right-sidebar' => array( array( 'text', array( 'title' => esc_html__( 'Second Sidebar', 'dw-mekatron' ), 'text' => _x( 'This is some text in the second sidebar.', 'Theme Starter Content', 'dw-mekatron' ), ), ), ), 'center-block' => array( array( 'text', array( 'title' => esc_html__( 'Center Block', 'dw-mekatron' ), 'text' => _x( 'This is some text in the center block.', 'Theme Starter Content', 'dw-mekatron' ), ), ), ), ), ) ); } add_action( 'after_setup_theme', 'dw_mekatron_setup' ); endif; if ( ! function_exists( 'dw_mekatron_register_menu' ) ) : function dw_mekatron_register_menu() { register_nav_menus( array( 'top_header_menu' => esc_html__( 'Top Header Menu', 'dw-mekatron' ), ) ); } add_action( 'init', 'dw_mekatron_register_menu' ); endif; if ( ! function_exists( 'dw_mekatron_stylesheet' ) ) : function dw_mekatron_stylesheet() { wp_enqueue_style( 'dw-mekatron-style', get_stylesheet_directory_uri() . '/style.css', array(), wp_get_theme()->version ); } add_action( 'wp_enqueue_scripts', 'dw_mekatron_stylesheet' ); endif; if ( ! function_exists( 'dw_mekatron_sidebars' ) ) : // register the sidebars function dw_mekatron_sidebars() { register_sidebar( array( 'name' => __( 'Left Sidebar 1', 'dw-mekatron' ), 'id' => 'left-sidebar', ) ); register_sidebar( array( 'name' => __( 'Center Block 1', 'dw-mekatron' ), 'id' => 'center-block', ) ); register_sidebar( array( 'name' => __( 'Right Sidebar 1', 'dw-mekatron' ), 'id' => 'right-sidebar', ) ); } add_action( 'widgets_init', 'dw_mekatron_sidebars' ); endif; // display information about a post under the post title if ( ! function_exists( 'dw_mekatron_post_meta' ) ) : function dw_mekatron_post_meta() { echo '
'; if ( get_post_type() === 'page' ) : printf( /* translators: %s = author */ esc_html__( 'Posted by %s', 'dw-mekatron' ), get_the_author() ); elseif ( has_category() ) : printf( /* translators: %1$s = date, %2$s = categories, %3$s = author */ esc_html__( 'Posted on %1$s in %2$s by %3$s', 'dw-mekatron' ), get_the_date(), wp_kses_post( get_the_category_list( ',' ) ), get_the_author() ); else : printf( /* translators: %1$s = date, %2$s = author */ esc_html__( 'Posted on %1$s by %2$s', 'dw-mekatron' ), get_the_date(), get_the_author() ); endif; edit_post_link( _x( 'Edit', 'verb', 'dw-mekatron' ), ' | ' ); if ( get_post_type() !== 'page' && has_tag() ) : echo '
'; the_tags(); endif; echo '
'; } endif; // change the archive title to show the search query when showing the archive title on a search result page. if ( ! function_exists( 'dw_mekatron_search_title' ) ) : function dw_mekatron_search_title( $title ) { if ( is_search() ) { /* translators: %s = search query */ $title = sprintf( __( 'Search: %s', 'dw-mekatron' ), get_search_query() ); } return $title; } add_filter( 'get_the_archive_title', 'dw_mekatron_search_title' ); endif; function dw_mekatron_google_fonts() { wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css2?family=Electrolize&display=swap', array(), wp_get_theme()->version ); } add_action( 'wp_enqueue_scripts', 'dw_mekatron_google_fonts' ); /** * Enqueue scripts */ function dw_mekatron_enqueue_scripts() { wp_enqueue_script( 'dw-mekatron-header-clock', get_template_directory_uri() . '/js/dw-mekatron-header-clock.js', array(), wp_get_theme()->version, true ); wp_enqueue_script( 'dw-mekatron-top-button', get_template_directory_uri() . '/js/dw-mekatron-top-button.js', array(), wp_get_theme()->version, true ); wp_enqueue_script( 'dw-mekatron-navigation', get_template_directory_uri() . '/js/dw-mekatron-navigation.js', array( 'jquery' ), '20141205', true ); } add_action( 'wp_enqueue_scripts', 'dw_mekatron_enqueue_scripts' ); // Add Footer Text Box section to customize function dw_mekatron_fcontent( $wp_customize ) { $wp_customize->add_section( 'dw-mekatron-fcontent-section', array( 'title' => __( 'Footer Text Box', 'dw-mekatron' ), ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-fcontent-text-control', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Get this feature with premium!', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw-mekatron-fcontent-section', 'input_attrs' => array( 'value' => __( 'Click Here!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ) ); } add_action( 'customize_register', 'dw_mekatron_fcontent' ); // Premium Upgrade Section function dw_mekatron_procontent( $wp_customize ) { $wp_customize->add_section( 'pro_sec', array( 'title' => __( 'GET PREMIUM VERSION', 'dw-mekatron' ), 'description' => '', 'priority' => 10, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'button_id', array( 'type' => 'button', 'settings' => array(), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'BUY PREMIUM VERSION', 'dw-mekatron' ), 'class' => 'button-primary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); $wp_customize->add_control( 'label', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Premium Features:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( '12 More Widget Blocks', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); $wp_customize->add_control( 'label1', array( 'type' => 'button', 'settings' => array(), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'Footer HTML/Text Content Area', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); $wp_customize->add_control( 'label2', array( 'type' => 'button', 'settings' => array(), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'Top Header and Bottom Footer Length Widget Area', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); $wp_customize->add_control( 'label3', array( 'type' => 'button', 'settings' => array(), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'bbPress Matching Forum Style', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); $wp_customize->add_control( 'label4', array( 'type' => 'button', 'settings' => array(), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'And More!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); $wp_customize->add_control( 'label5', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'FOR MORE DW THEMES:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'pro_sec', 'input_attrs' => array( 'value' => __( 'CLICK HERE!', 'dw-mekatron' ), 'class' => 'button-primary', 'onclick' => "window.open('https://www.designwicked.com/wordpress-themes', '_blank')", ), ) ); } add_action( 'customize_register', 'dw_mekatron_procontent' ); // Header Nav function dw_mekatron_hnav( $wp_customize ) { $wp_customize->add_section( 'dw-mekatron-hnav-section', array( 'title' => esc_html__( 'Header Navigation', 'dw-mekatron' ), ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-linkname1', array( 'default' => esc_html__( 'Link 1', 'dw-mekatron' ), 'sanitize_callback' => 'dw_mekatron_sanitize_html', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-linkname1', array( 'label' => esc_html__( 'Link 1 Name:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'description' => esc_html__( 'The visible name of the link on the button.', 'dw-mekatron' ), 'settings' => 'dw-mekatron-hnav-linkname1', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-link1', array( 'default' => esc_html__( 'http://', 'dw-mekatron' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-link1', array( 'label' => esc_html__( 'Link 1 Address:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'description' => esc_html__( 'You can use /address to point to a directory, or just put a full link including http://', 'dw-mekatron' ), 'settings' => 'dw-mekatron-hnav-link1', 'type' => 'url', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-linkname2', array( 'default' => esc_html__( 'Link 2', 'dw-mekatron' ), 'sanitize_callback' => 'dw_mekatron_sanitize_html', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-linkname2', array( 'label' => esc_html__( 'Link 2 Name:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-linkname2', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-link2', array( 'default' => esc_html__( 'http://', 'dw-mekatron' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-link2', array( 'label' => esc_html__( 'Link 2 Address:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-link2', 'type' => 'url', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-linkname3', array( 'default' => esc_html__( 'Link 3', 'dw-mekatron' ), 'sanitize_callback' => 'dw_mekatron_sanitize_html', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-linkname3', array( 'label' => esc_html__( 'Link 3 Name:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-linkname3', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-link3', array( 'default' => esc_html__( 'http://', 'dw-mekatron' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-link3', array( 'label' => esc_html__( 'Link 3 Address:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-link3', 'type' => 'url', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-linkname4', array( 'default' => esc_html__( 'Link 4', 'dw-mekatron' ), 'sanitize_callback' => 'dw_mekatron_sanitize_html', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-linkname4', array( 'label' => esc_html__( 'Link 4 Name:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-linkname4', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-link4', array( 'default' => esc_html__( 'http://', 'dw-mekatron' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-link4', array( 'label' => esc_html__( 'Link 4 Address:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-link4', 'type' => 'url', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-linkname5', array( 'default' => esc_html__( 'Link 5', 'dw-mekatron' ), 'sanitize_callback' => 'dw_mekatron_sanitize_html', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-linkname5', array( 'label' => esc_html__( 'Link 5 Name:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-linkname5', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'dw-mekatron-hnav-link5', array( 'default' => esc_html__( 'http://', 'dw-mekatron' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'dw-mekatron-hnav-control-link5', array( 'label' => esc_html__( 'Link 5 Address:', 'dw-mekatron' ), 'section' => 'dw-mekatron-hnav-section', 'settings' => 'dw-mekatron-hnav-link5', 'type' => 'url', ) ) ); } add_action( 'customize_register', 'dw_mekatron_hnav' ); //Social Bar function dw_mekatron_socialbar( $wp_customize ) { $wp_customize->add_section( 'dw_mekatron_socialbar_section', array( 'title' => esc_html__( 'Social Bar', 'dw-mekatron' ), 'description' => esc_html__( 'Add Social Bar Content', 'dw-mekatron' ), 'priority' => null, ) ); //Social Icons $wp_customize->add_setting( 'dw_mekatron_facebook_url', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'dw_mekatron_facebook_url', array( 'label' => esc_html__( 'Facebook Link:', 'dw-mekatron' ), 'description' => esc_html__( '--Fill in address to make icons appear.', 'dw-mekatron' ), 'section' => 'dw_mekatron_socialbar_section', 'setting' => 'dw_mekatron_facebook_url', 'type' => 'url', ) ); $wp_customize->add_setting( 'dw_mekatron_gplus_url', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'dw_mekatron_gplus_url', array( 'label' => esc_html__( 'Google+ Link:', 'dw-mekatron' ), 'section' => 'dw_mekatron_socialbar_section', 'setting' => 'dw_mekatron_gplus_url', 'type' => 'url', ) ); $wp_customize->add_control( 'labels', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Twitter Link:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw_mekatron_socialbar_section', 'input_attrs' => array( 'value' => __( 'Get pro for this feature!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); $wp_customize->add_control( 'labels1', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Linkedin Link:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw_mekatron_socialbar_section', 'input_attrs' => array( 'value' => __( 'Get pro for this feature!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); $wp_customize->add_control( 'labels2', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Instagram Link:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw_mekatron_socialbar_section', 'input_attrs' => array( 'value' => __( 'Get pro for this feature!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); $wp_customize->add_control( 'labels3', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Youtube Link:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw_mekatron_socialbar_section', 'input_attrs' => array( 'value' => __( 'Get pro for this feature!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); $wp_customize->add_control( 'labels4', array( 'type' => 'button', 'settings' => array(), 'label' => __( 'Discord Link:', 'dw-mekatron' ), 'priority' => 10, 'section' => 'dw_mekatron_socialbar_section', 'input_attrs' => array( 'value' => __( 'Get pro for this feature!', 'dw-mekatron' ), 'class' => 'button-secondary', 'onclick' => "window.open('https://www.designwicked.com/premium-mekatron', '_blank')", ), ) ); } add_action( 'customize_register', 'dw_mekatron_socialbar' );