/**
 * social_menu_icons
 *
 * Adds the social icons to the social menu.
 *
 * @param $menu_items
 * @param $args
 *
 * @return mixed
 */
function social_menu_icons($menu_items, $args)
{
    if ('social' === $args->menu->slug) {
        foreach ($menu_items as $item_key => $menu_item) {
            $title = $menu_item->title;
            $slug = str_replace([' ', '&'], ['-', 'and'], strtolower($title));
            $icon = CNP\Utility::get_svg_icon('icon-' . $slug);
            $menu_items[$item_key]->title = '<span class="icon-wrapper">' . $icon . '</span><span class="title">' . $title . '</span>';
        }
    }
    return $menu_items;
}
Exemplo n.º 2
0
?>
 role="document">
				<?php 
do_action('cnp_before_main_div');
do_action(CNP\get_action('cnp_before_main_div'));
?>
				<div <?php 
CNP\Utility::echo_classes(['main'], 'cnp_main_div');
?>
>
					<?php 
do_action('cnp_before_content_div');
do_action(CNP\get_action('before_content_div'));
?>
					<div <?php 
CNP\Utility::echo_classes(['content'], 'cnp_content_div');
?>
><?php 
include_once CNP\template_path();
?>
</div><!-- /.content -->
					<?php 
do_action(CNP\get_action('after_content_div'));
do_action('cnp_after_content_div');
?>
				</div><!-- /.main -->
				<?php 
do_action('cnp_after_main_div');
do_action(CNP\get_action('cnp_after_main_div'));
?>
			</div><!-- /.wrapper -->
<?php

$field_names = ['street_address', 'city', 'state', 'zip_code'];
$address_data = CNP\Utility::get_acf_fields_as_array($field_names, true);
$footer_args = ['name' => 'footer', 'structure' => ['bottom' => ['children' => ['copyright', 'nav-social']], 'copyright' => ['parts' => ['copyright-date' => ['content' => '&copy; Copyright ' . date('Y') . '<br class="show-for-small-only" /> ' . get_bloginfo('site_name')], 'copyright-menu' => ['atom' => 'Menu', 'menu-args' => ['theme_location' => 'copyright']]]], 'nav-social' => ['atom' => 'Menu', 'menu-args' => ['theme_location' => 'social'], 'class' => ['nav-social']]]];
<?php

if (function_exists('HAG_Breadcrumbs')) {
    $wrapper_class = CNP\Utility::get_classes('breadcrumbs', 'cnp_breadcrumbs_wrapper');
    $crumb_class = CNP\Utility::get_classes('crumb', 'cnp_breadcrumbs_crumb');
    $args = array('prefix' => '', 'home_show' => true, 'wrapper_element' => 'div', 'wrapper_class' => $wrapper_class, 'wrapper_id' => '', 'crumb_element' => 'span', 'crumb_class' => $crumb_class, 'separator' => '<span class="interior__breadcrumbs-sep">></span>', 'last_link' => false, 'echo' => true);
    HAG_Breadcrumbs($args);
}
<?php

// $logo    = file_get_contents( get_template_directory() . '/assets/img/logo.svg' );
$logo = '';
$navicon = CNP\Utility::get_svg_icon('icon-ion-navicon');
$masthead_args = ['name' => 'masthead', 'tag' => 'header', 'structure' => ['row-support' => ['class' => ['hide-for-small-only'], 'children' => ['nav-secondary', 'nav-social', 'search'], 'sibling' => 'row-primary'], 'nav-secondary' => ['atom' => 'Menu', 'menu-args' => ['theme_location' => 'secondary']], 'nav-social' => ['class' => ['nav-social'], 'atom' => 'Menu', 'menu-args' => ['theme_location' => 'social']], 'search' => ['content' => get_search_form(false)], 'row-primary' => ['children' => ['logo', 'navs-toggle', 'navs']], 'logo' => ['parts' => ['logo-title' => ['class' => ['show-for-sr'], 'content' => get_bloginfo('sitetitle')], 'logo-mark' => $logo, 'logo-link' => ['atom' => 'FrontPageLink'], 'logo-print' => ['class' => ['show-block-for-print'], 'content' => $logo]]], 'navs-toggle' => ['atom' => 'Link', 'href' => '#', 'attributes' => ['class' => ['hide-for-medium'], 'data-toggle-class' => 'menu-open', 'data-toggle-target' => 'body'], 'content' => '<div class="show-for-sr">Open Menu</div><div class="icon-wrapper">' . $navicon . '</div>'], 'navs' => ['children' => ['nav-primary']], 'nav-primary' => ['atom' => 'Menu', 'menu-args' => ['theme_location' => 'primary']]]];
$masthead = new CNP\OrganismTemplate($masthead_args);
$masthead->get_markup();
if ('' !== $masthead->markup) {
    echo $masthead->markup;
}
<div <?php 
CNP\Utility::echo_classes(['sidebar', 'column'], 'cnp_sidebar_div_classes');
?>
>
	<div <?php 
CNP\Utility::echo_classes('sidebar__inside', 'cnp_sidebar_inside_div_classes');
?>
>
		<?php 
do_action('cnp_sidebar_widgets');
do_action(CNP\get_action('cnp_sidebar_widgets'));
?>
	</div>
</div><!-- sidebar -->