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
--- /Users/johnmont/Downloads/shoestrap-extras-pack/includes/cmf/init.php 2015-01-19 13:30:17.000000000 -0800 | |
+++ /Users/johnmont/Downloads/shoestrap-extras-pack/includes/cmf/init.new.php 2015-01-19 13:27:48.000000000 -0800 | |
@@ -889,13 +889,13 @@ | |
if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) { | |
// Windows | |
$content_dir = str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR ); | |
- $content_url = str_replace( $content_dir, WP_CONTENT_URL, dirname(__FILE__) ); | |
+ $content_url = str_replace( $content_dir, content_url(), dirname(__FILE__) ); | |
$cmb_url = str_replace( DIRECTORY_SEPARATOR, '/', $content_url ); | |
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
## Action as added by Pencil Unread Plugin | |
//mark as read | |
add_action('bbp_template_after_pagination_loop', array(&$this,"mark_as_read_single_forum_link")); | |
## Attempted remove action in my functions file, but it doesn't get removed | |
remove_action('bbp_template_after_pagination_loop', array("bbP_Pencil_Unread","mark_as_read_single_forum_link")); | |
## A look a the filter, where you see it was set by the plugin. Just not sure how to reference it. |
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
// set the variable $instagram_data to the data previously stored as a transient. | |
// if the transient has expired or there is not data, the variable will be empty. | |
$instagram_data = get_transient('myprefix_instagram_data'); | |
// if the variable is empty, we need to get the new data from instagram | |
// But if it is not empty, it will skip all the steps inside this loop, saving time. | |
if ( !$instagram_data ) { |
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
add_action( 'plugins_loaded', 'my_overrides'); | |
function my_overrides() { | |
add_action( 'woocommerce_saved_order_items','my_function_one' ); | |
add_action( 'woocommerce_checkout_order_processed', 'my_function_two' ); | |
} |
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
add_action( 'wp_ajax_my_ajax_function_', 'my_ajax_function' ); | |
function my_ajax_function() { | |
$mystuff = $_POST['stuff']; | |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { | |
set_transient('fx_mystuff' , $mystuff, '0'); | |
} | |
die(); | |
} |
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
## Based upon code from https://calebburks.com/conditionally-showhide-woocommerce-checkout-fields/ | |
function fx_category_is_in_the_cart() { | |
// Add the category slugs here that you want to have the fields removed for | |
$categories = array( 'clothing', 'posters' ); | |
// Products currently in the cart | |
$cart_ids = array(); |
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
curl -o /dev/null -w 'lookup: %{time_namelookup}\nconnect: %{time_connect}\nsslconnect: %{time_appconnect}\nTTFB: %{time_starttransfer}\ntotal: %{time_total}\n' 'https://www.yourserver.com' |
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
add_filter( 'woocommerce_default_address_fields' , 'fx_free', 99999 ); | |
function fx_free( $fields ) { | |
$fields['address_1']['required'] = false; | |
$fields['address_2']['required'] = false; | |
$fields['city']['required'] = false; | |
$fields['state']['required'] = false; | |
$fields['postcode']['required'] = false; |