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', apply_filters('bizzboss_custom_background_args', array( 'default-color' => 'f5f5f5', ))); // Add support for featured content. add_theme_support('featured-content', array( 'featured_content_filter' => 'bizzboss_get_featured_posts', 'max_posts' => 6, )); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false'); /* slug setup */ add_theme_support('title-tag'); } endif; // bizzboss_setup add_action('after_setup_theme', 'bizzboss_setup'); /** * Register OpenSans Google font for bizzboss. */ function bizzboss_font_url() { $bizzboss_font_url = ''; /* * Translators: If there are characters in your language that are not supported * by OpenSans, translate this to 'off'. Do not translate into your own language. */ if ('off' !== _x('on', 'OpenSans font: on or off', 'bizzboss')) { $bizzboss_font_url = add_query_arg('family', urlencode('OpenSans:300,400,700,900,300italic,400italic,700italic'), "//fonts.googleapis.com/css?family=Open+Sans"); } return $bizzboss_font_url; } /* * 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 ); } /* * Remove Dots From the post excerpt */ function bizzboss_excerpt_more( $more ) { return ''; } add_filter('excerpt_more', 'bizzboss_excerpt_more'); /* * Change excerpt legth */ function bizzboss_excerpt_length( $length ) { return 15; } add_filter( 'excerpt_length', 'bizzboss_excerpt_length', 999 ); require_once (dirname(__FILE__) . '/functions/class-tgm-activation.php'); 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' => 'Meta Slider', 'slug' => 'ml-slider', 'required' => false, ), array( 'name' => 'Page Builder by SiteOrigin', 'slug' => 'siteorigin-panels', 'required' => false, ), array( 'name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false, ), array( 'name' => 'SiteOrigin Widgets Bundle', '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 ); } } /* * * 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'; require get_template_directory() . '/functions/custom-header.php'; /* * * Bizzboss Widgets ** */ require get_template_directory() . '/functions/bizzboss-widgets.php'; ?>