esc_html__('Menu Top', 'seo' ) )); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); add_theme_support( 'custom-background', apply_filters( 'seo_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'seo_setup' ); function seo_content_width() { $GLOBALS['content_width'] = apply_filters( 'seo_content_width', 640 ); } add_action( 'after_setup_theme', 'seo_content_width', 0 ); add_theme_support( 'woocommerce' ); /* ---------------------------------------------------------------------- Register widget area. ---------------------------------------------------------------------- */ function seo_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'seo' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 1', 'seo' ), 'id' => 'footer-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 2', 'seo' ), 'id' => 'footer-2', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 3', 'seo' ), 'id' => 'footer-3', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 4', 'seo' ), 'id' => 'footer-4', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'seo_widgets_init' ); /* ---------------------------------------------------------------------- Enqueue scripts and styles ---------------------------------------------------------------------- */ function seo_scripts() { wp_enqueue_style( 'seo-style', get_stylesheet_uri() ); wp_enqueue_script( 'seo-smoothup', get_template_directory_uri() . '/js/smoothscroll.js', array( 'jquery' ), '', true ); wp_enqueue_script( 'seo-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'seo-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_enqueue_script( 'seo_script.js', '//code.jquery.com/jquery-2.1.4.min.js', array('jquery') ); function seo_add_editor_styles() { add_editor_style( get_template_directory_uri() . '/style.css' ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'seo_scripts' ); function seo_admin_theme_style() { wp_enqueue_style('seo-admin-theme', get_template_directory_uri() . '/css/wp-admin.css'); } add_action('admin_enqueue_scripts', 'seo_admin_theme_style'); /* ---------------------------------------------------------------------- Include ---------------------------------------------------------------------- */ require get_template_directory() . '/inc/custom-header.php'; require get_template_directory() . '/inc/template-tags.php'; require get_template_directory() . '/inc/extras.php'; require get_template_directory() . '/inc/customizer.php'; require get_template_directory() . '/inc/jetpack.php'; /* ---------------------------------------------------------------------- SEO Customize ---------------------------------------------------------------------- */ function seo_mytheme_customize_register( $wp_customize ) { function seo_wpse_excerpt_more( $more ) { return ' ' . __('Read More', 'seo') . ''; } add_filter( 'excerpt_more', 'seo_wpse_excerpt_more' ); } add_action( 'customize_register', 'seo_mytheme_customize_register' ); /* ---------------------------------------------------------------------- Back to top ---------------------------------------------------------------------- */ function seo_back_to_top() { echo 'Back to Top'; } add_action( 'wp_head', 'seo_back_to_top_style' ); function seo_back_to_top_style() { echo ''; } add_action( 'wp_footer', 'seo_back_to_top_script' ); function seo_back_to_top_script() { echo ''; } function seo_top () { echo ' '; } /********************************************************************************************************* * Pagination. **********************************************************************************************************/ if ( ! function_exists( 'seo_pagination' ) ) : function seo_pagination() { global $wp_query; $current = max( 1, get_query_var('paged') ); $big = 324424442; $pagination_return = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => $current, 'total' => $wp_query->max_num_pages, 'next_text' => '»', 'prev_text' => '«' ) ); if ( ! empty( $pagination_return ) ) { echo ''; } } endif; $seo_page = array( 'before' => '

' . __( 'Pages:', 'seo' ), 'after' => '

', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' ', 'nextpagelink' => __( 'Next', 'seo' ), 'previouspagelink' => __( 'Previous', 'seo' ), 'pagelink' => '%', 'echo' => 1 ); wp_link_pages( $seo_page); /********************************************************************************************************* * Add a widget to the dashboard **********************************************************************************************************/ add_action( 'wp_dashboard_setup', 'seo_add_dashboard_widgets' ); /** * Create the function to output the contents of our Dashboard Widget. */ function seo_dashboard_widget_function() { // Display whatever it is you want to show. echo '
'; } function seo_add_dashboard_widgets() { wp_add_dashboard_widget( 'seo_dashboard_widget', 'Read More About SEOS MUSIC', 'seo_dashboard_widget_function' ); // Globalize the metaboxes array, this holds all the widgets for wp-admin global $wp_meta_boxes; // Get the regular dashboard widgets array // (which has our new widget already but at the end) $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core']; // Backup and delete our new dashboard widget from the end of the array $example_widget_backup = array( 'seo_dashboard_widget' => $normal_dashboard['seo_dashboard_widget'] ); unset( $normal_dashboard['seo_dashboard_widget'] ); // Merge the two arrays together so our widget is at the beginning $sorted_dashboard = array_merge( $example_widget_backup, $normal_dashboard ); // Save the sorted array back into the original metaboxes $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; }