Last active
May 3, 2017 13:04
-
-
Save anastransvelo/6fe59b4981296d2163b233011ce5e582 to your computer and use it in GitHub Desktop.
Pizzaro add Phone Number & Menu in Handheld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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