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 | |
add_action( 'set_object_terms', 'auto_set_parent_terms', 9999, 6 ); | |
/** | |
* Automatically set/assign parent taxonomy terms to posts | |
* | |
* This function will automatically set parent taxonomy terms whenever terms are set on a post, | |
* with the option to configure specific post types, and/or taxonomies. | |
* |
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 | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://developer.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
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
.ion-alert-circled:before { | |
background-image: url( "data:image/svg+xml;charset=utf8,%3C%21--%20Generated%20by%20IcoMoon.io%20--%3E%0A%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%0A%3Ctitle%3Eion-alert-circled%3C%2Ftitle%3E%0A%3Cpath%20d%3D%22M27.813%2026.375c0.188%200.313%200.313%200.813%200.125%201.125s-0.5%200.5-0.875%200.5h-26.125c-0.375%200-0.688-0.188-0.875-0.5s-0.063-0.813%200.125-1.125l12.938-21.813c0.188-0.313%200.5-0.563%200.875-0.563s0.688%200.25%200.875%200.563zM16%2025v-3h-4v3h4zM16%2020v-9h-4v9h4z%22%3E%3C%2Fpath%3E%0A%3C%2Fsvg%3E%0A" ); | |
} | |
.ion-alert:before { | |
background-image: url( "data:image/svg+xml;charset=utf8,%3C%21--%20Generated%20by%20IcoMoon.io%20--%3E%0A%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D%2232%22%20viewBox%3D%220%200%208%2032%22%3E%0A%3Ctitle%3Eion-alert%3C%2Ftitle%3E%0A%3Cpath%20d%3D%22M8%2030h- |
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 | |
/** | |
* WC Meta Data ~ How to do this in WooCommerce 3 ? | |
* | |
* @link https://stackoverflow.com/questions/45540351/woocommerce-3-crud-how-to-do-this | |
* | |
* @link https://github.com/woocommerce/woocommerce/wiki/CRUD-Objects-in-3.0 | |
*/ | |
add_action( 'plugins_loaded', function() { | |
if ( ! class_exists( 'WooCommerce' ) ) { |
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
/** | |
* Filter by labels. | |
* | |
* @since 2.0.0 | |
*/ | |
(function( window, undefined ) { | |
window.wp = window.wp || {}; | |
var document = window.document; |
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 | |
// Change the data of a listing to add logo. | |
add_filter( 'listify_get_listing_to_array', function( $data, $listing ) { | |
$data['myLogoURL'] = esc_url( $listing->get_company_logo() ); | |
return $data; | |
}, 10, 2 ); | |
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 | |
// Remove Category: | |
remove_action( 'single_job_listing_meta_start', 'listify_the_listing_category', 30 ); | |
// Use Custom Category: | |
add_action( 'single_job_listing_meta_start', function() { | |
$cats = get_the_term_list( | |
get_post()->ID, | |
'job_listing_category', | |
'<span>', |
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 | |
/** | |
* Plugin Name: Listify - Custom Single Listing Hero Button | |
*/ | |
function custom_listify_single_job_listing_actions_after() { | |
global $post; | |
// Get URL. | |
$url = get_post_meta( $post->ID, 'your_custom_meta_key', true ); |
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 | |
/** | |
* Google API tester. | |
*/ | |
function my_gmaps_key_test( $key ) { | |
$url = add_query_arg( $args = array( | |
'address' => 'Genbu Media', | |
), 'https://maps.googleapis.com/maps/api/geocode/json' ); |
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 | |
/** | |
* Remove Rating Display if No Rating Exists Yet | |
* | |
* @link https://secure.helpscout.net/conversation/425117562/121662/ | |
*/ | |
add_action( 'init', function() { | |
// Remove Rating in Card if Empty. |