Following line does't have /products.* page. This tells Nginx to cache all product pages by default.
Idea is fast loading product pages will improve scalability of a store and also conversion.
| <?php | |
| add_filter( | |
| 'jet-form-builder/security/csrf-token/datetime-limit', | |
| /** @var \DateTimeImmutable $datetime */ | |
| function ( $datetime ) { | 
Following line does't have /products.* page. This tells Nginx to cache all product pages by default.
Idea is fast loading product pages will improve scalability of a store and also conversion.
| /* | |
| Uploading images is a two step process (from https://github.com/WP-API/WP-API/issues/1768#issuecomment-160540932): | |
| POST the data to /wp/v2/media - this can either be as the request body, or in multipart format. This will upload the file, and give you a 201 Created response with a Location header. This header points to the post object for the attachment that has just been created. | |
| PUT the post data to the endpoint returned in the Location header (which will look something like /wp/v2/media/{id}). | |
| I do step 2 (PUT), if POST is a success, in myDropzone.on("success", function(file, response){} | |
| */ | |
| // dropzoneWordpressRestApiForm is the configuration for the element that has an id attribute | 
| <?php | |
| require dirname(__FILE__).'/wp-blog-header.php'; | |
| $wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
| $wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); | 
| <?php | |
| /* | |
| * dl-file.php | |
| * | |
| * Protect uploaded files with login. | |
| * | |
| * @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
| * | |
| * @author hakre <http://hakre.wordpress.com/> | |
| * @license GPL-3.0+ |