for posts and comments. add_theme_support('automatic-feed-links'); add_theme_support( 'custom-logo', array( 'height' => 240, 'width' => 240, 'flex-height' => true, ) ); // register menu register_nav_menus(array( 'primary' => __('Top Header Menu', 'bizzboss'), 'secondary' => __('Top Secondary Menu', 'bizzboss'), )); // Featured image support add_theme_support('post-thumbnails'); add_image_size('bizzboss-thumbnail-image', 410, 215, true); // Switch default core markup for search form, comment form, and commen, to output valid HTML5. add_theme_support('html5', array('search-form', 'comment-form', 'comment-list')); add_theme_support('custom-background', array('default-color' => 'f5f5f5')); add_theme_support('custom-header', array('default-color' => '019779')); /* slug setup */ add_theme_support('title-tag'); //Avctivate all widgets function bizzboss_filter_active_widgets($active){ //Custom Widgets $active['blog-post-widget'] = true; $active['key-feature-widget'] = true; //Bundled Widgets $active['video'] = true; $active['testimonial'] = true; $active['taxonomy'] = true; $active['social-media-buttons'] = true; $active['simple-masonry'] = true; $active['slider'] = true; $active['cta'] = true; $active['contact'] = true; $active['features'] = true; $active['headline'] = true; $active['hero'] = true; $active['icon'] = true; $active['image-grid'] = true; $active['price-table'] = true; $active['layout-slider'] = true; return $active; } add_filter('siteorigin_widgets_active_widgets', 'bizzboss_filter_active_widgets'); } endif; // bizzboss_setup add_action('after_setup_theme', 'bizzboss_setup'); /* * Sanitize call-back fnction */ function bizzboss_sanitize_text($input) { return wp_kses_post( force_balance_tags( $input ) ); } function bizzboss_sanitize_radio($input) { return sanitize_text_field( $input ); } /* * Change excerpt legth */ add_filter( 'excerpt_length', 'bizzboss_excerpt_length', 999 ); function bizzboss_excerpt_length( $length ) { return 15; } add_action( 'tgmpa_register', 'bizzboss_action_tgmpa_register_blogim_register_required_plugins' ); function bizzboss_action_tgmpa_register_blogim_register_required_plugins() { if(class_exists('TGM_Plugin_Activation')) { $plugins = array( array( 'name' => __('Page Builder by SiteOrigin', 'bizzboss'), 'slug' => 'siteorigin-panels', 'required' => false, ), array( 'name' => __('SiteOrigin Widgets Bundle','bizzboss'), 'slug' => 'so-widgets-bundle', 'required' => false, ), ); $config = array( 'default_path' => '', 'menu' => 'bizzboss-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', 'strings' => array( 'page_title' => __( 'Install Required Plugins', 'bizzboss' ), 'menu_title' => __( 'Install Plugins', 'bizzboss' ), 'installing' => __( 'Installing Plugin: %s', 'bizzboss' ), 'oops' => __( 'Something went wrong with the plugin API.', 'bizzboss' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.','bizzboss' ), 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.','bizzboss' ), 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.','bizzboss' ), 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.','bizzboss' ), 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.','bizzboss' ), 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.','bizzboss' ), 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.','bizzboss' ), 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.','bizzboss' ), 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins','bizzboss' ), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins','bizzboss' ), 'return' => __( 'Return to Required Plugins Installer', 'bizzboss' ), 'plugin_activated' => __( 'Plugin activated successfully.', 'bizzboss' ), 'complete' => __( 'All plugins installed and activated successfully. %s', 'bizzboss' ), 'nag_type' => 'updated' ) ); bizzboss( $plugins, $config ); } } /* * * Load TGM Library classes ** */ require_once (dirname(__FILE__) . '/functions/class-tgm-activation.php'); /* * * Theme Default Setup ** */ require get_template_directory() . '/functions/theme-default-setup.php'; /* * * Enqueue css and js files ** */ require get_template_directory() . '/functions/enqueue-files.php'; /* * * Theme Customization ** */ require get_template_directory() . '/functions/theme-customization.php'; // Changing the_excerpt() default functionality function bizzboss_allowedtags() { // Add custom tags to this string return '