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
jQuery( document ).ready(function() { | |
var affLinks = []; | |
jQuery('a').each(function() { | |
if (jQuery(this).is('[href*="wclink"]')) { | |
affLinks.push( jQuery(this).attr('href') ); | |
} | |
}); | |
console.log( affLinks ); |
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 create_custom_comments_rest_routes() { | |
// Custom Comments. | |
$controller = new WP_REST_Custom_Comments_Controller(); | |
$controller->register_routes(); | |
} | |
add_action( 'rest_api_init', 'create_custom_comments_rest_routes' ); | |
class WP_REST_Custom_Comments_Controller extends WP_REST_Comments_Controller { |
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
// Loop recipes and cooking posts | |
$recipe_args = array( | |
'post_type' => array( 'recipe' ), | |
'post_status' => 'publish', | |
'posts_per_page' => 4, | |
'fields' => 'ids', // Only fetch the post_ids here. | |
); | |
// Run the recipe query. | |
$recipe_query = new WP_Query( $recipe_args); |
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 | |
/** | |
* Plugin Name: Send Reads to Master | |
* Description: Suggested fix for backend replication lag | |
* Author: WP Engine | |
* Version: 0.2 | |
* | |
*/ | |
if ( is_admin() ) { |
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
{ | |
"request": { | |
"pageUrl": "http://www.walgreens.com/store/c/ology-sunscreen-lotion-spf-50/ID=prod6210342-product", | |
"api": "product", | |
"version": 3 | |
}, | |
"objects": [ | |
{ | |
"text": "I Choose to Live Well, Therefore I Choose Ology™.\nBroad Spectrum SPF 50\nOxybenzone Free\nUVA/UVB Protection\nWater Resistant (80 Minutes)\nNo Added Fragrance\nParaben & Dye Free\nHelps prevent sunburn. If used as directed with other sun protection measures (see warnings), decreases the risk of skin cancer and early skin aging caused by the sun.\nEndorsed by: Healthy Child Healthy World® - Creating Healthy Environments for Children.\nQuestions or comments? 1-800-925-4733\n100% Satisfaction guaranteed with all Walgreens products or your money back.\nApply liberally 15 minutes before sun exposure.\nReapply: After 80 minutes of swimming or sweating; immediately after towel drying; at least every 2 hours.\nChildren under 6 months of age: Ask a doctor.\nProtect this product from excessive heat and direct sun.\n©2013 |
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
{ | |
"require": { | |
"wp-coding-standards/wpcs": "dev-develop" | |
}, | |
"scripts": { | |
"post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs", | |
"post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs" | |
} | |
} |
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
Show hidden characters
{ | |
"boss": true, | |
"curly": true, | |
"eqeqeq": true, | |
"eqnull": true, | |
"es3": true, | |
"expr": true, | |
"immed": true, | |
"noarg": true, | |
"onevar": true, |
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
<logging> | |
<log type="coverage-html" target="coverage" title="PHPUnit" | |
charset="UTF-8" yui="true" highlight="true" /> | |
</logging> |
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
/** | |
* Register and load JavaScript files. | |
* | |
* Includes 'settings' array based on query parameters. | |
* | |
* @since 1.0. | |
* | |
* @see wp_enqueue_script() | |
* @see wp_localize_script() | |
*/ |
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
'self' => | |
array(1) { | |
[0] => | |
array(2) { | |
'href' => | |
string(42) "http://example.org/?json_route=/wp/posts/9" | |
'attributes' => | |
array(0) { | |
} | |
} |
NewerOlder