Skip to content

Instantly share code, notes, and snippets.

@anastransvelo
Last active May 3, 2017 13:04
Show Gist options
  • Save anastransvelo/6fe59b4981296d2163b233011ce5e582 to your computer and use it in GitHub Desktop.
Save anastransvelo/6fe59b4981296d2163b233011ce5e582 to your computer and use it in GitHub Desktop.
Pizzaro add Phone Number & Menu in Handheld
add_filter( 'pizzaro_handheld_footer_bar_links', 'pz_child_handheld_footer_bar_links' );
function pz_child_handheld_footer_bar_links( $links ) {
$links = array(
'phone-number' => array(
'priority' => 10,
'callback' => 'pz_child_handheld_footer_bar_phone_link',
),
'shop-link' => array(
'priority' => 20,
'callback' => 'pz_child_handheld_footer_bar_shop_link',
),
'cart' => array(
'priority' => 30,
'callback' => 'pizzaro_handheld_footer_bar_cart_link',
),
);
return $links;
}
function pz_child_handheld_footer_bar_phone_link() {
?>
<a class="phone-number" href="tel:14123815500" title="<?php esc_attr_e( 'Call', 'pizzaro' ); ?>"></a>
<?php
}
function pz_child_handheld_footer_bar_shop_link() {
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
?>
<a class="shop-link" href="<?php echo esc_url( $shop_page_url ); ?>" title="<?php esc_attr_e( 'Menu', 'pizzaro' ); ?>"></a>
<?php
}
.pizzaro-handheld-footer-bar ul li.phone-number > a:before {
content: "\f095";
}
.pizzaro-handheld-footer-bar ul li.shop-link > a:before {
content: "\f03a";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment