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
img.gform_ajax_spinner { | |
position: fixed !important; | |
z-index: 999999; | |
left: 0; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
display: block !important; | |
overflow: hidden !important; | |
width: 100% !important; |
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 | |
/** | |
* set the stock status for all products in your WooCommerce store | |
* @return void | |
*/ | |
function woocommerce_update_stock_status(){ | |
global $wpdb; | |
// set all status for products with 0 or less stocked quantity |
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 sku on woocommerce product editor >> general tab | |
add_action( 'woocommerce_product_options_general_product_data', 'add_the_sku_to_general_product_field' ); | |
function add_the_sku_to_general_product_field() { | |
global $post; | |
$product_sku = get_post_meta( $post->ID, '_sku', true ); | |
?> | |
<div class="options_group"> | |
<p class="form-field _sku_field "> |
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 | |
// rewrite the tribe event featured image on single event view templates with a custom size | |
function custom_tribe_event_featured_image( $featured_image ){ | |
if( is_single() ){ | |
$post_id = get_the_ID(); | |
$size = 'hbgm-news-full'; | |
$image_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size ); | |
$featured_image = ''; | |
if ( !empty( $image_src ) ) { |
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 | |
/** | |
* Reset the slugs on a particular post type to use the default sanitized slugs | |
* @param string $post_type filter by post type | |
* @param int $offset set the paginated post to start | |
* @param boolean $force_guid_update * WARNING * never enable this | |
* | |
* @example add the following code into your theme's functions.php file, ensure |
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 | |
/** | |
* implement a filter hook by replacing the original echo in | |
* serieslistings.php lines 621, 727 | |
* ajaxlink.php lines 632, 746 | |
*/ | |
echo stripslashes($enmse_singlemessage->embed_code); | |
// with the new filter |
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
SELECT t1.entity_id, t2.post_id, t2.post_title, t1.value, t3.address, t3.street, t3.city, t3.state, t3.zip, t4.phone, t4.mobile, t4.fax, t4.email, t4.website, DATE_FORMAT(FROM_UNIXTIME(t5.edited_at), "%Y-%m-%d") | |
FROM wp_sabai_entity_field_content_body as t1 | |
LEFT JOIN wp_sabai_content_post as t2 | |
ON t1.entity_id = t2.post_id | |
LEFT JOIN wp_sabai_entity_field_directory_location as t3 | |
ON t1.entity_id = t3.entity_id | |
LEFT JOIN wp_sabai_entity_field_directory_contact as t4 | |
ON t1.entity_id = t4.entity_id | |
LEFT JOIN wp_sabai_entity_field_content_activity as t5 | |
ON t1.entity_id = t5.entity_id |
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 | |
// if product is already in global space | |
global $product; | |
// or fetch product attributes by ID | |
if( empty( $product->id ) ){ | |
$wc_pf = new WC_Product_Factory(); | |
$product = $wc_pf->get_product($id); | |
} |
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
$0=10 | |
$1=255 | |
$2=0 | |
$3=3 | |
$4=0 | |
$5=0 | |
$6=0 | |
$10=115 | |
$11=0.020 | |
$12=0.002 |
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_shortcode('sabai-directory-dashboard', 'sabai_directory_dashboard_get_shortcode'); | |
function sabai_directory_dashboard_get_shortcode($atts, $content, $tag){ | |
$platform = get_sabai_platform(); | |
$path = $platform->getSabai()->getAddon('Directory')->getSlug('dashboard'); | |
return $platform->shortcode($path, (array)$atts, $content); | |
} |