'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*?( )?\[($block)(\s[^\]]+)?\](<\/p>| )?\[\/($block)](<\/p>|
)?/","[$2$3]",$content);
$rep = preg_replace("/(
)?/","[/$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_title' => '
',
) );
register_sidebar(array(
'name'=> 'Footer Column 1',
'id' => 'footer_column_1',
'before_widget' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=> 'Footer Column 2',
'id' => 'footer_column_2',
'before_widget' => '',
'after_title' => '
',
));
register_sidebar(array(
'name'=> 'WooCommerce',
'id' => 'woocommerce_sidebar',
'before_widget' => '',
'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
//
// \n";
}
function end_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "$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 . '