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 | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
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 | |
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
* Open your site’s wp-config file and add | |
* define( 'WC_REMOVE_ALL_DATA', true); | |
* on its own line above the | |
* That’s all, stop editing! Happy blogging. line. | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
define( 'WC_REMOVE_ALL_DATA', 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
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_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 | |
/** | |
* Plugin Name: Custom API | |
* Plugin URI: http://chrushingit.com | |
* Description: Crushing it! | |
* Version: 1.0 | |
* Author: Art Vandelay | |
* Author URI: http://watch-learn.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
<?php | |
<? | |
// Hooks only for version 5 only, may be for previous version also works | |
if (!defined('WPCF7_VERSION') OR intval(WPCF7_VERSION) !== 5) | |
{ | |
return; | |
} | |
add_filter( 'wpcf7_validate_text', 'wpcf7_text_allowed_chars_validation_filter', 11, 2 ); | |
add_filter( 'wpcf7_validate_text*', 'wpcf7_text_allowed_chars_validation_filter', 11, 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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
body{ | |
background-color: #dfdfdf; | |
} | |
.box { | |
display: block; | |
width: 800px; |
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: Installed Plugin Details | |
* Description: Show a "Details" link for installed plugins to view information from the WordPress.org plugin directory. | |
* Version: 1.0.0 | |
* Author: Blazer Six | |
* Author URI: http://www.blazersix.com/ | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* |
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: Custom API | |
* Plugin URI: http://chrushingit.com | |
* Description: Crushing it! | |
* Version: 1.0 | |
* Author: Art Vandelay | |
* Author URI: http://watch-learn.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
<?php | |
$cmb->add_field( array( | |
'name' => __( 'Postive numbers', 'theme-domain' ), | |
'desc' => __( 'Numbers only', 'msft-newscenter' ), | |
'id' => $prefix . 'number', | |
'type' => 'text', | |
'attributes' => array( | |
'type' => 'number', | |
'pattern' => '\d*', |
OlderNewer