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 | |
| /** | |
| * WooCommerce Batch API Test Script with PHP-SPX Profiling Support | |
| * | |
| * This script tests the WooCommerce batch endpoint for products with images | |
| * to help identify performance issues as described in GitHub issue #26029 | |
| * | |
| * Usage: | |
| * 1. Configure your WooCommerce credentials below | |
| * 2. Run with php-spx: SPX_ENABLED=1 SPX_KEY=dev php woocommerce_batch_test.php |
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 | |
| define( 'lift_comment_facet_version', 1 ); | |
| add_action( 'init', function() { | |
| if ( class_exists( 'Lift_Search' ) ) { | |
| //field name, field type | |
| $comment_field = liftField( 'comment_count', 'uint' ) | |
| //add field to parse_request handling so it gets passed to the global WP_Query | |
| ->addRequestVars( 'comment_count' ) | |
| //set the delegate for adding the field value to the document sent to CS |
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 | |
| /** | |
| * A WordPress api to (try) kick off globally singleton actions. It will lock the action | |
| * to hopefully prevent other requests from kicking off the same action. This is highly | |
| * based off of Mark Jaquith's NSA_Action_Update_Server @author markjaquith (https://gist.github.com/1149945) | |
| * | |
| */ | |