'Big Dot Shortcodes', 'slug'=> 'big_dot_shortcodes', 'source'=> 'http://thebig.co/downloads/big-dot-shortcodes.zip', 'required' => true, ), array('name'=> 'Fast Secure Contact Form','slug'=> 'si-contact-form','required' => true,), array('name'=> 'Easy Google Fonts','slug'=> 'easy-google-fonts','required' => true,), ); $config = array('id'=> 'big-dot-2-0','default_path' => '','menu'=> 'tgmpa-install-plugins','has_notices' => true,'dismissable' => true,'dismiss_msg' => '','is_automatic' => false,'message'=> ''); tgmpa( $plugins, $config ); } function filter_ptags_on_images($content){ return preg_replace('/

\\s*?(<\\/a>|)?\\s*<\\/p>/s', '\1', $content); } add_filter('the_content', 'filter_ptags_on_images'); function excerpt_ellipse($text) { return str_replace('[…]', ' ...read more', $text); } add_filter('get_the_excerpt', 'excerpt_ellipse'); function the_content_filter($content) { $block = join("|",array("fullwidth", "imageframe", "imageframe2", "icon", "halfwidthleft", "halfwidthright", "quarterwidthleft", "quarterwidthright", "blogmain", "blogsidebar", "cta")); $rep = preg_replace("/(

)?\[($block)(\s[^\]]+)?\](<\/p>|
)?/","[$2$3]",$content); $rep = preg_replace("/(

)?\[\/($block)](<\/p>|
)?/","[/$2]",$rep); return $rep; } add_filter("the_content", "the_content_filter"); // Post thumbnail support add_theme_support( 'post-thumbnails' ); // Shortcodes //require get_template_directory() . '/shortcodes.php'; /** * Register our sidebars and widgetized areas. * */ function bigdot_widgets_init() { register_sidebar( array( 'name' => 'Blog Sidebar', 'id' => 'home_right_1', 'before_widget' => '

', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name'=> 'Footer Column 1', 'id' => 'footer_column_1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name'=> 'Footer Column 2', 'id' => 'footer_column_2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name'=> 'WooCommerce', 'id' => 'woocommerce_sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'bigdot_widgets_init', 'woocommerce_sidebar' ); add_theme_support( 'title-tag' ); add_theme_support( 'custom-background' ); add_theme_support( 'custom-header' ); // Custom settings // function custom_settings_add_menu() { // add_theme_page( 'Social Icons', 'Social Icons', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99); // } // add_action( 'admin_menu', 'custom_settings_add_menu' ); /* Create Custom Global Settings // function custom_settings_page() { ?> //
//

Social Icons

//
// //
//
// // // // // // // // // 'menu_item_parent', 'id' => 'db_id' ); function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent\n"; } function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; /* Add active class */ if(in_array('current-menu-item', $classes)) { $classes[] = 'active'; unset($classes['current-menu-item']); } /* Check for children */ $children = get_posts(array('post_type' => 'nav_menu_item', 'nopaging' => true, 'numberposts' => 1, 'meta_key' =>'_menu_item_menu_item_parent', 'meta_value' => $item->ID)); if (!empty($children)) { $classes[] = 'has-sub'; } $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= $indent . ''; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= ''; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } function end_el( &$output, $item, $depth = 0, $args = array() ) { $output .= "\n"; } } // Declaring site logo support require get_template_directory() . '/customizer.php'; // Add Google Font function wpb_add_google_fonts() { wp_enqueue_script('jquery'); wp_enqueue_style( 'wpb-google-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:300,600', false ); } add_action( 'wp_enqueue_scripts', 'wpb_add_google_fonts' ); // WooCommerce Support add_action( 'after_setup_theme', 'woocommerce_support' ); function woocommerce_support() { add_theme_support( 'woocommerce' ); } add_action('customize_register', 'thebig_add_social_sites_customizer'); function thebig_add_social_sites_customizer($wp_customize) { $wp_customize->add_section( 'my_social_settings', array( 'title' => __('Social Media Icons', 'big-dot-2-0'), 'priority' => 35, ) ); $priority = 5; $wp_customize->add_setting( "twitter", array('type'=> 'theme_mod','capability'=> 'edit_theme_options','sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( "twitter", array('label'=> __( "Twitter Url:", 'big-dot-2-0' ),'section' => 'my_social_settings','type'=> 'text','priority' => $priority) ); $priority = $priority + 5; $wp_customize->add_setting( "facebook", array('type'=> 'theme_mod','capability'=> 'edit_theme_options','sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( "facebook", array('label'=> __( "Facebook Url:", 'big-dot-2-0' ),'section' => 'my_social_settings','type'=> 'text','priority' => $priority) ); $priority = $priority + 5; $wp_customize->add_setting( "google-plus", array('type'=> 'theme_mod','capability'=> 'edit_theme_options','sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( "google-plus", array('label'=> __( "Google Plus Url:", 'big-dot-2-0' ),'section' => 'my_social_settings','type'=> 'text','priority' => $priority) ); $priority = $priority + 5; $wp_customize->add_setting( "linkedin", array('type'=> 'theme_mod','capability'=> 'edit_theme_options','sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( "linkedin", array('label'=> __( "Linkedin Url:", 'big-dot-2-0' ),'section' => 'my_social_settings','type'=> 'text','priority' => $priority) ); $priority = $priority + 5; }