File: /home/zeusxp5/zenoxpressjobs.com/wp-content/plugins/toolbar-extras/includes/themes/items-primer.php
<?php
// includes/themes/items-primer
/**
* Prevent direct access to this file.
*
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Sorry, you are not allowed to access this file directly.' );
}
add_action( 'admin_bar_menu', 'ddw_tbex_themeitems_primer', 100 );
/**
* Items for Theme: Primer (free, by GoDaddy)
*
* @since 1.4.9
*
* @uses ddw_tbex_string_theme_title()
* @uses ddw_tbex_customizer_start()
*
* @param object $admin_bar Object of Toolbar nodes.
*/
function ddw_tbex_themeitems_primer( $admin_bar ) {
/** Theme creative */
$admin_bar->add_node(
array(
'id' => 'theme-creative',
'parent' => 'group-active-theme',
'title' => ddw_tbex_string_theme_title( 'title', 'child' ),
'href' => ddw_tbex_customizer_start(),
'meta' => array(
'target' => ddw_tbex_meta_target(),
'title' => ddw_tbex_string_theme_title( 'attr', 'child' ),
)
)
);
/** Primer customize */
ddw_tbex_item_theme_creative_customize();
} // end function
add_filter( 'tbex_filter_items_theme_customizer_deep', 'ddw_tbex_themeitems_primer_customize' );
/**
* Customize items for Primer Theme
*
* @since 1.4.9
*
* @param array $items Existing array of params for creating Toolbar nodes.
* @return array Tweaked array of params for creating Toolbar nodes.
*/
function ddw_tbex_themeitems_primer_customize( array $items ) {
/** Declare theme's items */
$primer_items = array(
'title' => array(
'type' => 'section',
'title' => __( 'Layout', 'toolbar-extras' ),
'id' => 'primercmz-layout',
),
'colors' => array(
'type' => 'panel',
'title' => __( 'Colors', 'toolbar-extras' ),
'id' => 'primercmz-colors',
),
'fonts' => array(
'type' => 'section',
'title' => __( 'Typography', 'toolbar-extras' ),
'id' => 'primercmz-typography',
),
'header_image' => array(
'type' => 'section',
'title' => __( 'Header Media', 'toolbar-extras' ),
'id' => 'primercmz-header-media',
),
'background_image' => array(
'type' => 'section',
'title' => __( 'Background Image', 'toolbar-extras' ),
'id' => 'primercmz-background-image',
),
);
/** Merge and return with all items */
return array_merge( $items, $primer_items );
} // end function
add_action( 'admin_bar_menu', 'ddw_tbex_themeitems_primer_resources', 120 );
/**
* General resources items for Primer Theme.
* Hook in later to have these items at the bottom.
*
* @since 1.4.9
*
* @uses ddw_tbex_display_items_resources()
* @uses ddw_tbex_resource_item()
*
* @param object $admin_bar Object of Toolbar nodes.
*/
function ddw_tbex_themeitems_primer_resources( $admin_bar ) {
/** Bail early if no resources display active */
if ( ! ddw_tbex_display_items_resources() ) {
return $admin_bar;
}
/** Group: Theme's resources */
$admin_bar->add_group(
array(
'id' => 'group-theme-resources',
'parent' => 'theme-creative',
'meta' => array( 'class' => 'ab-sub-secondary' ),
)
);
ddw_tbex_resource_item(
'support-forum',
'theme-support',
'group-theme-resources',
'https://wordpress.org/support/theme/primer'
);
ddw_tbex_resource_item(
'translations-community',
'theme-translate',
'group-theme-resources',
'https://translate.wordpress.org/projects/wp-themes/primer'
);
ddw_tbex_resource_item(
'github',
'theme-github',
'group-theme-resources',
'https://github.com/godaddy/wp-primer-theme'
);
} // end function