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
<?php | |
// Loads FontAwesome & assigns dashicon prefixed classes to correspond to FontAwesome 5 (free) fallbacks. | |
// This allows 'dashicons-' to be used when declaring custom post type icons. | |
// Added padding-top tweak to align better | |
// Pick your icon here: https://fontawesome.com/icons (make sure to search 'Free' icons) | |
function font_awesome_icons(){ | |
echo '<link href="//use.fontawesome.com/releases/v5.5.0/css/all.css" rel="stylesheet"> | |
<style> | |
.dashicons-before:before { font-family: dashicons, "Font Awesome 5 Free"; } | |
.dashicons-calendar-plus:before { padding-top:4px !important; content: "\f271"; } |
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
function if_page_or_ancestor_page_is($page_slug = NULL) | |
{ | |
$is_page = false; | |
if (is_page()) { | |
global $post; | |
/* Get an array of Ancestors and Parents if they exist */ | |
$parents = get_post_ancestors($post->ID); | |
$all_pages = array_reverse(array_merge($parents, array($post->ID))); |