This file contains hidden or 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 discount total to order meta. | |
update_post_meta( $order_id, '_cart_discount', $coupon_discount ); | |
// Subtract discount from order total meta. | |
update_post_meta( $order_id, '_order_total', get_post_meta( $order_id, '_order_total') - $coupon_discount ); | |
// Update coupon meta with user ID that used the coupon. | |
update_post_meta( $coupon_post_id, '_used_by', $user_id); | |
// Update coupon meta to increase usage count by 1. | |
update_post_meta( $coupon_post_id, 'usage_count', get_post_meta( $coupon_post_id, 'usage_count' ) + 1 ); | |
// Add coupon as an order item to the order. | |
woocommerce_add_order_item( $order_id, array( |
This file contains hidden or 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
{ | |
"rules": [{ | |
"class": "ItalicRule", | |
"selector": "cite" | |
}] | |
} |
This file contains hidden or 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 | |
/** | |
* The Template for displaying all single listing posts | |
* | |
* @package WP Listings | |
* @since 0.1.0 | |
*/ | |
add_action('wp_enqueue_scripts', 'enqueue_single_listing_scripts'); | |
function enqueue_single_listing_scripts() { |
This file contains hidden or 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 | |
/* | |
* Filter default global settings and add our own | |
*/ | |
add_filter( 'fl_builder_register_settings_form', 'tk_designer_register_global_settings_form', 10, 2 ); | |
function tk_designer_register_global_settings_form($form, $id) { | |
if ( 'global' == $id ) { | |
$newform = |
This file contains hidden or 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 | |
//* Template Name: Archive | |
//* Remove standard post content output | |
remove_action( 'equity_entry_content', 'equity_do_post_content' ); | |
add_action( 'equity_post_content', 'equity_page_archive_content' ); | |
/** | |
* This function outputs sitemap-esque columns displaying all pages, | |
* categories, authors, monthly archives, and recent posts. |
This file contains hidden or 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( 'http_request_timeout', 'increase_http_timeout'); | |
function increase_http_timeout() { | |
$timeout = 1800; | |
return $timeout; | |
} |
This file contains hidden or 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 | |
function update_myplugin() { | |
// Get current version number | |
require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
$version = get_plugin_data(WPMU_PLUGIN_DIR .'/myplugin.php'); | |
// Check if current version is latest | |
if($version['Version'] < 1.0) { | |
// Use wp_remote_get to fetch the data and store it to a file | |
$response = wp_remote_get('https://s3.amazonaws.com/path/to/zipfile/myplugin.zip', array( 'stream' => true, 'filename' => WPMU_PLUGIN_DIR . '/myplugin.zip') ); |
This file contains hidden or 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
/** Adjust title area size **/ | |
add_filter( 'equity_attr_title-area', 'custom_equity_attributes_title_area' ); | |
function custom_equity_attributes_title_area( $attributes ) { | |
$attributes['class'] .= ' columns small-12 large-5'; | |
return $attributes; | |
} |
This file contains hidden or 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('equity_idx_api_domain', 'my_domain_spoof'); | |
function my_domain_spoof() { | |
$domain = 'http://www.THEIDXDOMAIN.com'; | |
return $domain; | |
} |
This file contains hidden or 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
[row] | |
[column medium="6" large="3"] | |
[iconbox type="3" icon="fa-search" heading="Buy With Us" url="http://curbappeal.idxbroker.com/idx/search/basic" ]Search homes by us[/iconbox] | |
[/column] | |
[column medium="6" large="3"] | |
[iconbox type="3" icon="fa-envelope" heading="Listings by Email" url="http://curbappeal.idxbroker.com/idx/usersignup" ]Listing updates sent to your inbox[/iconbox] | |
[/column] | |
[column medium="6" large="3"] | |
[iconbox type="3" icon="fa-bar-chart" heading="Home Valuation" url="http://curbappeal.idxbroker.com/idx/homevaluation" ]What is your home worth?[/iconbox] | |
[/column] |