get( 'Version' );
$productiveminds_base_demo_url = 'https://demo.productiveminds.com';
$productiveminds_base_support_url = 'https://www.productiveminds.com/support';
$productiveminds_base_documentation_url = 'https://www.productiveminds.com/support/docs';
$theme_name = $productive_business_theme_version_obj->get( 'Name' );
$theme_url = $productive_business_theme_version_obj->get( 'ThemeURI' );
$author_url = $productive_business_theme_version_obj->get( 'AuthorURI' );
$theme_demo_url = $productiveminds_base_demo_url . '/' . $productive_business_theme_version_obj->get( 'TextDomain' );
$theme_support_url = $productiveminds_base_support_url;
$theme_documentation_url = $productiveminds_base_documentation_url . '/' . $productive_business_theme_version_obj->get( 'TextDomain' );
$theme_repo_url = 'https://wordpress.org/support/theme/' . $productive_business_theme_version_obj->get( 'TextDomain' ) . '/reviews';
$theme_demo_importer_plugin_url = 'https://wordpress.org/plugins/' . 'productive-demo-importer';
define( 'PRODUCTIVE_BUSINESS_ADMIN_PAGE_REQUEST_URI', 'productive_business_admin_options' );
define( 'PRODUCTIVE_BUSINESS_WOO_SIDEBAR_TEXT', 'is_woo_sidebar' );
define( 'PRODUCTIVE_BUSINESS_OPTION_TAB_1_TITLE', esc_html__( 'About', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_OPTION_TAB_PRO_TITLE', esc_html__( 'Pro Version', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_OPTION_TAB_LICENSE_TITLE', esc_html__( 'License', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_PRODUCT_DOWNLOAD_TYPE', 'product-download' );
define( 'PRODUCTIVE_BUSINESS_THEME_DEVELOPER_NAME', 'productiveminds.com' );
define( 'PRODUCTIVE_BUSINESS_THEME_DEVELOPER_WEBSITE', $author_url );
define( 'PRODUCTIVE_BUSINESS_CURRENT_THEME_NAME', $theme_name );
define( 'PRODUCTIVE_BUSINESS_CURRENT_THEME_TEXT_DOMAIN', $productive_business_theme_version_obj->get( 'TextDomain' ) );
define( 'PRODUCTIVE_BUSINESS_THEME_DEMO_URL', $theme_demo_url );
define( 'PRODUCTIVE_BUSINESS_THEME_SUPPORT_URL', $theme_support_url );
define( 'PRODUCTIVE_BUSINESS_THEME_DOCUMENTATION_URL', $theme_documentation_url );
define( 'PRODUCTIVE_BUSINESS_THEME_DEMO_IMPORTER_PLUGIN_URL', $theme_demo_importer_plugin_url );
define( 'PRODUCTIVE_BUSINESS_THEME_REVIEW_ON_REPO_URL', $theme_repo_url );
define( 'PRODUCTIVE_BUSINESS_THEME_FEATURES_OR_BUY_URL', $theme_url );
define( 'PRODUCTIVE_BUSINESS_HOMEPAGE_USP_IMAGE_REMOTE', PRODUCTIVE_BUSINESS_THEME_BASE_URI . '/assets/images/hero-1.webp' );
define( 'PRODUCTIVE_BUSINESS_OPTION_MENU_TITLE', __( 'Theme Dashboard', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_CURRENT_THEME_NAME_CUSTOMIZER_HOMEPAGE', esc_html__( 'Theme Homepage', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_CURRENT_THEME_NAME_CUSTOMIZER_WOOCOMMERCE', esc_html__( 'Theme WooCommerce', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_RECOMMENDED_PLUGINS_PAGE_TITLE', __( 'Recommended Plugins For Best Experience With ', 'productive-business' ) . PRODUCTIVE_BUSINESS_CURRENT_THEME_NAME );
define( 'PRODUCTIVE_BUSINESS_RECOMMENDED_PLUGINS_MENU_TITLE', __( 'Theme Plugins', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_PRODUCTIVE_PLUGIN_FORMS_TITLE', __( 'Free Newsletter, Contact Us Page and Buttons', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_PRODUCTIVE_PLUGIN_STYLE_TITLE', __( 'Typography and Style Plugin', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_PRODUCTIVE_PLUGIN_DEMO_IMPORTER_TITLE', __( 'Demo Content Importer', 'productive-business' ) );
define( 'PRODUCTIVE_BUSINESS_THE_LOGO_WIDTH_DEFAULT', 160 );
define( 'PRODUCTIVE_BUSINESS_THE_LOGO_WIDTH_MIN', 60 );
define( 'PRODUCTIVE_BUSINESS_THE_LOGO_WIDTH_MAX', 300 );
define( 'PRODUCTIVE_BUSINESS_THE_BANNER_HEIGHT_DEFAULT', 450 );
define( 'PRODUCTIVE_BUSINESS_THE_BANNER_HEIGHT_MIN', 450 );
define( 'PRODUCTIVE_BUSINESS_THE_BANNER_HEIGHT_MAX', 1000 );
define( 'PRODUCTIVE_BUSINESS_THEME_CONTENT_MIN_WIDTH', 700 );
define( 'PRODUCTIVE_BUSINESS_THEME_CONTENT_MAX_WIDTH', 1400 );
define( 'PRODUCTIVE_BUSINESS_THEME_CONTENT_DEFAULT_WIDTH', 1200 );
define( 'PRODUCTIVE_BUSINESS_THEME_CONTENT_CUSTOMIZER_STEPS', 100 );
define( 'PRODUCTIVE_BUSINESS_PLUGIN_ELEMENT_SLUG' , 'element');
define( 'PRODUCTIVE_BUSINESS_PLUGIN_ELEMENT_TAXONOMY_SLUG' , 'element-type');
define( 'PRODUCTIVE_BUSINESS_PLUGIN_ELEMENT_TYPE_SLUG_BUSINESS_FEATURES' , 'features');
define( 'PRODUCTIVE_BUSINESS_PLUGIN_ELEMENT_TYPE_SLUG_BUSINESS_SERVICES' , 'services');
$productive_business_posts_placeholder_image_remote = PRODUCTIVE_BUSINESS_THEME_BASE_URI . '/assets/images/posts-placeholder.webp';
// A global array for theme styles and settings
$global_style_setting = array();
// Ensure to include customiser before WooCommerce includes
require PRODUCTIVE_BUSINESS_THEME_BASE_PATH . '/includes/productive-theme-customiser.php';
/**
* WooCommerce includes
*/
require_once PRODUCTIVE_BUSINESS_THEME_BASE_PATH . '/includes/woocommerce.php';
/**
* Method productiveminds_theme_is_active.
*/
function productiveminds_theme_is_active() {}
/**
* Method productive_business_body_open_action.
*
*/
function productive_business_body_open_action() {
echo '' . __( 'Skip to content', 'productive-business' ) . ' ';
}
add_action( 'productive_business_body_open', 'productive_business_body_open_action' );
/**
* Register sidebar widgets
*/
function productive_business_promindsone_widgets() {
register_sidebar(
array(
'name' => __('Top Callout and Announcement', 'productive-business'),
'id' => 'header_callout',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Homepage Hero (replaces Banner)', 'productive-business'),
'id' => 'homepage_hero_widget',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Homepage Content (above Blog)', 'productive-business'),
'id' => 'homepage_content_widget_top',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Homepage Content (below Blog)', 'productive-business'),
'id' => 'homepage_content_widget_bottom',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Left Sidebar', 'productive-business'),
'id' => 'sidebar_left',
'before_widget' => '',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Right Sidebar', 'productive-business'),
'id' => 'sidebar_right',
'before_widget' => '',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Footer (Left)', 'productive-business'),
'id' => 'footer_left_info',
'before_widget' => '',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('Footer (Right)', 'productive-business'),
'id' => 'footer_right_info',
'before_widget' => '',
'before_title' => '',
'after_title' => ' ',
)
);
register_sidebar(
array(
'name' => __('WooCommerce Sidebar', 'productive-business'),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '',
'after_title' => ' ',
)
);
}
add_action( 'widgets_init', 'productive_business_promindsone_widgets' );
/**
* Method productive_business_body_open.
*
*/
function productive_business_body_open() {
do_action( 'productive_business_body_open' );
}
/**
* Method productive_business_menu_navs.
*/
function productive_business_menu_navs() {
$theme_menus = array(
'primary' => 'Primary (Header Menu)',
'footer_menu' => 'Footer Menu',
);
register_nav_menus( $theme_menus );
}
// hook for productive_business_menus.
add_action( 'init', 'productive_business_menu_navs' );
/**
* Method productive_business_get_placeholder_image.
*
* @return string
*/
function productive_business_get_placeholder_image() {
global $productive_business_posts_placeholder_image_remote;
$productive_business_posts_placeholder_url = '';
$productive_business_posts_placeholder_image_id = productive_business_posts_placeholder_image();
$productive_business_posts_placeholder_url = productive_business_get_attachment_by_thumbnail_id( $productive_business_posts_placeholder_image_id, 'full',
$productive_business_posts_placeholder_image_remote );
return $productive_business_posts_placeholder_url;
}
/**
* Method productive_business_do_placeholder_image.
*/
function productive_business_do_placeholder_image() {
global $productive_business_posts_placeholder_image_remote;
$productive_business_posts_placeholder_url = '';
$productive_business_posts_placeholder_image_id = productive_business_posts_placeholder_image();
$productive_business_posts_placeholder_url = productive_business_get_attachment_by_thumbnail_id( $productive_business_posts_placeholder_image_id, 'full',
$productive_business_posts_placeholder_image_remote );
echo ' ';
}
add_action( 'display_placeholder_image', 'productive_business_do_placeholder_image' );
/**
* Method productive_business_scripts.
*/
function productive_business_scripts() {
global $productive_business_theme_version;
// Per WP Theme team guide - See https://github.com/WPTT/webfont-loader
require_once get_template_directory() . '/includes/wptt-webfont-loader.php';
wp_enqueue_style( 'productive_business_normalize', get_template_directory_uri() . '/libraries/css/normalize.css', array(), $productive_business_theme_version );
if ( !productive_business_is_productive_style_active() && !productive_business_is_productive_style_extra_active() ) {
wp_enqueue_style('productive_business_googlefonts', wptt_get_webfont_url( 'https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&family=Roboto:wght@100;300;400;500;700;900&display=swap' ), array(), $productive_business_theme_version );
}
wp_enqueue_style( 'productive_font_awesome_style', get_template_directory_uri() . '/libraries/fonts/font-awesome-4.7.0/css/font-awesome.min.css', array(), $productive_business_theme_version );
// theme's main css with normalise font as dependencies.
wp_enqueue_style( 'productive_parent_theme_main_css_style', get_template_directory_uri() . '/style.css', array( 'productive_business_normalize' ), $productive_business_theme_version );
wp_style_add_data( 'productive_parent_theme_main_css_style', 'rtl', 'replace' );
// as per number of columns - load only after main css.
if ( productive_business_is_woocommerce_activated() ) {
$number_of_items_per_row = wc_get_default_products_per_row();
if ( 2 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_2.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
} else if ( 3 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_3.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
} else if ( 4 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_4.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
} else if ( 5 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_5.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
} else if ( 6 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_6.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
} else if ( 7 == $number_of_items_per_row ) {
wp_enqueue_style( 'product_archive_css', get_template_directory_uri() . '/assets/css/archive_7.css', array( 'productive_parent_theme_main_css_style' ), $productive_business_theme_version );
}
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
// jquery.
wp_enqueue_script( 'jquery' );
// theme's main JS.
wp_enqueue_script( 'productive_parent_theme_js_handle', get_template_directory_uri() . '/assets/js/theme.js', array(), $productive_business_theme_version, true );
$admin_ajax_php_class = array(
'nav_icon_right' => ' ',
'nav_icon_down' => ' ',
'text_submenu' => __( 'Sub Menu', 'productive-business' ),
);
wp_localize_script(
'productive_parent_theme_js_handle',
'productive_parent_theme_js_handle_name',
$admin_ajax_php_class
);
}
// Default Forms plugin == 10
// Extra Forms plugin == 20
// Parent == 40
add_action( 'wp_enqueue_scripts', 'productive_business_scripts', 40 );
/**
* Load (wp_enqueue_script) admin css * JS files.
*/
function productive_business_admin_scripts() {
global $productive_business_theme_version;
$admin_ajax_php_class = array(
'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
);
wp_enqueue_style( 'productive_business_admin_css', PRODUCTIVE_BUSINESS_THEME_BASE_URI . '/assets/admin/css/admin-style.css', array(), $productive_business_theme_version );
wp_enqueue_script( 'productive_business_admin_js_handle', PRODUCTIVE_BUSINESS_THEME_BASE_URI . '/assets/admin/js/admin-theme-ajax.js', array(), $productive_business_theme_version, true );
wp_localize_script(
'productive_business_admin_js_handle',
'productive_business_admin_js_url_name',
$admin_ajax_php_class
);
}
// hook for productive_business_admin_scripts.
add_action( 'admin_enqueue_scripts', 'productive_business_admin_scripts' );
/**
* Method enable featured image.
*/
function productive_business_setup_theme() {
add_theme_support('post-thumbnails');
add_theme_support('wp-block-styles');
add_theme_support('responsive-embeds');
add_theme_support('custom-logo');
add_theme_support('align-wide');
add_theme_support('title-tag');
add_theme_support('automatic-feed-links');
$args = array(
'style',
'gallery',
'caption',
'script',
'search-form',
'comment-form',
'comment-list',
'navigation-widgets',
);
add_theme_support( 'html5', $args );
/*
* @link https://codex.wordpress.org/Theme_Logo
*/
$logo_width = 125;
$logo_height = 48;
add_theme_support(
'custom-logo',
array(
'height' => $logo_height,
'width' => $logo_width,
'flex-width' => true,
'flex-height' => true,
'unlink-homepage-logo' => false,
)
);
/* TODOs
add_theme_support(
'post-formats',
array(
'link',
'aside',
'gallery',
'image',
'quote',
'status',
'video',
'audio',
'chat',
)
);
Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
Enqueue editor styles.
add_editor_style( '/assets/css/editor-styles.css' );
Add support for Block Styles.
add_theme_support( 'wp-block-styles' );
*/
// Add support for full and wide align images.
add_theme_support( 'align-wide' );
// initiate text-domain.
load_theme_textdomain( 'productive-business', get_template_directory() . '/languages' );
}
// hook for productive_business_setup_theme.
add_action( 'after_setup_theme', 'productive_business_setup_theme' );
/**
* Method productive_business_the_custom_logo
*/
function productive_business_the_custom_logo() {
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
}
}
/**
* Method productive_business_the_meta_description_header.
*/
function productive_business_the_meta_description_header() {
$name = get_bloginfo( 'name' );
$desc = get_bloginfo( 'name' );
if( empty( $desc ) ) {
$desc = $name;
}
echo ' ';
}
add_action( 'wp_head', 'productive_business_the_meta_description_header', 0 );
/**
* Method productive_business_the_pingback_header.
* Adds pingback url auto-discovery header.
*/
function productive_business_the_pingback_header() {
if ( is_singular() && pings_open() ) {
echo ' ';
}
}
add_action( 'wp_head', 'productive_business_the_pingback_header' );
/**
* Method productive_business_get_header_callout.
*
* @param string $class ''.
*/
function productive_business_get_header_callout( $class = '' ) {
if ( is_active_sidebar( 'header_callout' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'header_callout' ) ) {
dynamic_sidebar( 'header_callout' );
}
echo '
';
} else {
echo '';
if ( is_active_sidebar( 'header_callout' ) ) {
dynamic_sidebar( 'header_callout' );
}
echo '
';
}
}
}
add_action( 'display_header_callout', 'productive_business_get_header_callout' );
/**
* Add hooks for the sidebar widgets.
*
* @param string $class css class name to use to wrap the sidebar.
*/
function productive_business_get_homepage_hero_widget( $class = '' ) {
if ( is_active_sidebar( 'homepage_hero_widget' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'homepage_hero_widget' ) ) {
dynamic_sidebar( 'homepage_hero_widget' );
}
echo '
';
} else {
if ( is_active_sidebar( 'homepage_hero_widget' ) ) {
dynamic_sidebar( 'homepage_hero_widget' );
}
}
}
}
// hook for homepage_hero_widget.
add_action( 'display_homepage_hero_widget', 'productive_business_get_homepage_hero_widget' );
/**
* Method productive_business_get_homepage_content_widget_top.
*
* @param string $class ''.
*/
function productive_business_get_homepage_content_widget_top( $class = '' ) {
if ( is_active_sidebar( 'homepage_content_widget_top' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'homepage_content_widget_top' ) ) {
dynamic_sidebar( 'homepage_content_widget_top' );
}
echo '
';
} else {
if ( is_active_sidebar( 'homepage_content_widget_top' ) ) {
dynamic_sidebar( 'homepage_content_widget_top' );
}
}
}
}
// hook for get_homepage_content_widget_top.
add_action( 'display_homepage_content_widget_top', 'productive_business_get_homepage_content_widget_top' );
/**
* Method productive_business_get_homepage_content_widget_bottom.
*
* @param string $class ''.
*/
function productive_business_get_homepage_content_widget_bottom( $class = '' ) {
if ( is_active_sidebar( 'homepage_content_widget_bottom' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'homepage_content_widget_bottom' ) ) {
dynamic_sidebar( 'homepage_content_widget_bottom' );
}
echo '
';
} else {
if ( is_active_sidebar( 'homepage_content_widget_bottom' ) ) {
dynamic_sidebar( 'homepage_content_widget_bottom' );
}
}
}
}
// hook for get_homepage_content_widget_bottom.
add_action( 'display_homepage_content_widget_bottom', 'productive_business_get_homepage_content_widget_bottom' );
/**
* Method productive_business_get_left_sidebar_smallscreen_toggle.
*
* @param string $class ''.
*/
function productive_business_get_left_sidebar_smallscreen_toggle( ) {
echo '';
}
add_action( 'display_sidebar_left_smallscreen_toggle', 'productive_business_get_left_sidebar_smallscreen_toggle' );
/**
* Method productive_business_get_left_sidebar.
*
* @param string $class ''.
*/
function productive_business_get_left_sidebar( $class = '' ) {
if ( is_active_sidebar( 'sidebar_left' ) ) {
do_action( 'display_sidebar_left_smallscreen_toggle');
if ( '' != $class ) {
echo '';
} else {
echo '';
}
}
}
// hook for sidebar_left.
add_action( 'display_sidebar_left', 'productive_business_get_left_sidebar' );
/**
* Method productive_business_get_sidebar_right.
*
* @param string $class ''.
*/
function productive_business_get_sidebar_right( $class = '' ) {
if ( is_active_sidebar( 'sidebar_right' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'sidebar_right' ) ) {
dynamic_sidebar( 'sidebar_right' );
}
echo ' ';
} else {
echo '';
if ( is_active_sidebar( 'sidebar_right' ) ) {
dynamic_sidebar( 'sidebar_right' );
}
echo ' ';
}
}
}
// hook for sidebar_right.
add_action( 'display_sidebar_right', 'productive_business_get_sidebar_right' );
/**
* Method productive_business_get_footer_left_info.
*
* @param string $class ''.
*/
function productive_business_get_footer_left_info( $class = '' ) {
if ( is_active_sidebar( 'footer_left_info' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'footer_left_info' ) ) {
dynamic_sidebar( 'footer_left_info' );
}
echo ' ';
} else {
echo '';
if ( is_active_sidebar( 'footer_left_info' ) ) {
dynamic_sidebar( 'footer_left_info' );
}
echo ' ';
}
}
}
// hook for footer_left_info.
add_action( 'display_footer_left_info', 'productive_business_get_footer_left_info' );
/**
* Method productive_business_get_footer_right_info.
*
* @param string $class ''.
*/
function productive_business_get_footer_right_info( $class = '' ) {
if ( is_active_sidebar( 'footer_right_info' ) ) {
if ( '' != $class ) {
echo '';
if ( is_active_sidebar( 'footer_right_info' ) ) {
dynamic_sidebar( 'footer_right_info' );
}
echo ' ';
} else {
echo '';
if ( is_active_sidebar( 'footer_right_info' ) ) {
dynamic_sidebar( 'footer_right_info' );
}
echo ' ';
}
}
}
// hook for footer_right_info.
add_action( 'display_footer_right_info', 'productive_business_get_footer_right_info' );
/**
* Method productive_business_get_site_posts.
*
* @param number $number_of_posts ''.
*
* @param string $post_type ''.
*
* @return WP_Post[]|number[]
*/
function productive_business_get_site_posts( $number_of_posts = 10, $post_type = 'post' ) {
$args = array(
'numberposts' => $number_of_posts,
'post_type' => $post_type,
'suppress_filters' => 0,
);
return get_posts( $args );
}
/**
* Add hook to display search box in the header.
*
* @param string $class ''.
*/
function productive_business_get_productive_business_header_nav( $class = '' ) {
if ( '' != $class ) {
echo '';
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu' => 'promindsone-header-nav',
'menu_id' => 'promindsone-header-nav',
'container' => 'div',
'menu_class' => 'header-navbar-nav',
'containder-class' => 'promindsone-header-nav',
)
);
echo '
';
} else {
echo '';
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu' => 'promindsone-header-nav',
'menu_id' => 'promindsone-header-nav',
'container' => 'div',
'menu_class' => 'header-navbar-nav',
'containder-class' => 'promindsone-header-nav',
)
);
echo '
';
}
}
// hook for header_nav form.
add_action( 'display_productive_business_header_nav', 'productive_business_get_productive_business_header_nav' );
/**
* Method productive_business_get_items_per_row_to_display.
*
* @return number
*/
function productive_business_get_items_per_row_to_display() {
return productive_business_items_per_row_to_display();
}
add_action( 'display_items_per_row_to_display', 'productive_business_get_items_per_row_to_display' );
/**
* Method productive_business_get_unique_id.
*
* @param string $prefix ''.
*
* @return string
*/
function productive_business_get_unique_id( $prefix = '' ) {
if ( function_exists( 'wp_unique_id' ) ) {
return wp_unique_id( $prefix );
} else {
static $id_counter;
return $prefix . (string) ++$id_counter;
}
}
add_action( 'display_unique_id', 'productive_business_get_unique_id', 1 );
/**
* Method productive_business_inhouse_full_width_video
*/
function productive_business_inhouse_full_width_video( $html ) {
return '' . $html . '
';
}
// hook for productive_business_inhouse_full_width_video.
add_filter( 'embed_oembed_html', 'productive_business_inhouse_full_width_video', 1, 2 );
/**
* Method productive_business_is_blog_category_page.
* *
* @return boolean
*/
function productive_business_is_blog_category_page() {
if (is_category()) {
return true;
}
return false;
}
/**
* Method productive_business_get_theme_mod_bg_image_home
*/
function productive_business_get_attachment_by_thumbnail_id($attachment_id, $type = 'full',
$default_image = PRODUCTIVE_BUSINESS_HOMEPAGE_USP_IMAGE_REMOTE) {
$productive_business_homepage_usp_image = $default_image;
if ( $attachment_id ) {
$attachment_url = wp_get_attachment_url( $attachment_id, $type );
if ( !empty( trim($attachment_url)) ) {
$productive_business_homepage_usp_image = $attachment_url;
}
}
return $productive_business_homepage_usp_image;
}
if ( ! function_exists( 'productive_business_the_posts_navigation' ) ) {
/**
* Method for productive_business_the_posts_navigation
*/
function productive_business_the_posts_navigation() {
the_posts_pagination(
array(
'prev_text' => sprintf(
'%s %s ',
' ',
esc_html__( 'Newer ', 'productive-business' )
),
'next_text' => sprintf(
'%s %s',
esc_html__( 'Older', 'productive-business' ),
' ',
),
'screen_reader_text' => __( 'Page Content Navigation ', 'productive-business' ),
'class' => 'productive_business_pagination_nav',
)
);
}
}
if ( ! function_exists( 'productive_business_the_posts_categories_link' ) ) {
/**
* Method for productive_business_the_posts_categories_link
*/
function productive_business_the_posts_categories_link($post_id, $demarcator = ', ') {
$categories = get_the_category($post_id);
$posts_no = 1;
$cat_links = '';
$total_cats = count($categories);
if ( ! empty( $categories ) ) {
foreach( $categories as $category ) {
$multi_cat = ' ';
if ( $posts_no < $total_cats ) {
$multi_cat = $demarcator;
}
$cat_links .= '' . esc_html( $category->name ) . ' ' . $multi_cat;
$posts_no++;
}
}
return $cat_links;
}
}
require PRODUCTIVE_BUSINESS_THEME_BASE_PATH . '/includes/productive-theme-customiser-inline.php';
require_once PRODUCTIVE_BUSINESS_THEME_BASE_PATH . '/includes/default.php';
/* ======================== start STANDARD ======================== */
require PRODUCTIVE_BUSINESS_THEME_BASE_PATH . '/standard/functions-standard.php';
/* ======================== end STANDARD ======================== */