The raw code to allow Icon Block plugin to scan a theme for icons.
Uses https://wordpress.org/plugins/icon-block/
Place svgs in the mai/icons directory.
Categories will be automatically generated from the directory structure.
Example:
The raw code to allow Icon Block plugin to scan a theme for icons.
Uses https://wordpress.org/plugins/icon-block/
Place svgs in the mai/icons directory.
Categories will be automatically generated from the directory structure.
Example:
| <?php | |
| // Prevent direct file access. | |
| defined( 'ABSPATH' ) || die; | |
| /** | |
| * The main plugin class. | |
| * | |
| * @version 0.2.0 | |
| * |
| <?php | |
| // Prevent direct file access. | |
| defined( 'ABSPATH' ) || die; | |
| /** | |
| * Add MSN News feed. | |
| * Flush permalinks after adding this feed. | |
| * | |
| * @return void |
| <?php | |
| add_action( 'genesis_before_loop', 'spears_do_resource_term_links' ); | |
| function spears_do_resource_term_links() { | |
| // Show Custom Taxonomy | |
| $args = array( 'taxonomy' => 'resource_type' ); | |
| $terms = get_terms('resource_type', $args); |
| <?php | |
| $language = wp_get_post_terms($post->ID, 'ft_language'); | |
| if( $language ) { | |
| echo get_the_term_list( $post->ID, 'ft_language', '<li><span class="detail">Languages:</span>', ', ', '</li>' ); | |
| } |
| <?php | |
| /** | |
| * Check if user is logged in and is post author | |
| * Setup functions for front end post editing | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/front-end-post-editing-with-acf-pro/ | |
| * @uses Advanced Custom Fields Pro | |
| * @uses Sidr | |
| */ |
| <?php | |
| /** | |
| * Filter WP 'Edit Post' link to go to front end /edit-post/ page | |
| * | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/front-end-post-editing-with-caldera-forms/ | |
| * @return string url to front end for with query arg source post ID ( ?post_id=123 ) | |
| */ | |
| add_filter( 'get_edit_post_link', 'tsm_edit_post_link', 10, 1 ); |
| <?php | |
| /** | |
| * Get the specified metadata value for the term or from | |
| * one of it's parent terms. | |
| * | |
| * @param WP_Term $term Term object | |
| * @param string $key The meta key to retrieve. | |
| * @param bool $check_enabled Whether to check if custom archive settings are enabled. | |
| * |
| <?php | |
| // Exit if accessed directly. | |
| if ( ! defined( 'ABSPATH' ) ) exit; | |
| if ( ! class_exists( 'Mai_WooCommerce_Account_Tab' ) ): | |
| /** | |
| * A class to create new WooCommerce account tabs. | |
| * | |
| * @version 0.1.0 |