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
| {"generator":"Code Snippets v2.14.0","date_created":"2020-03-19 17:43","snippets":[{"name":"Connect Contact Form 7 form with Benchmark Email contact list","desc":"Connects a Contact Form 7 form with a Benchmark Email contact list.","scope":"front-end","code":"\/\/ Hook Into CF7 Submissions\nadd_action( 'wpcf7_submit', function( $instance, $result ) {\n\n\t\/\/ Settings\n\t$cf7_form_id = 56;\n\t$benchmark_list_id = 15838208;\n\n\t\/\/ Limit To Form\n\tif( $instance->id !== $cf7_form_id ) { return; }\n\n\t\/\/ Ensure Benchmark Email Lite Is Active\n\tif( ! class_exists( 'wpbme_api' ) ) { return; }\n\n\t\/\/ Build Body\n\t$body = [\n\t\t'Data' => [\n\n\t\t\t\/\/ Main Fields\n\t\t\t'Email' => isset( $_POST['your-email'] ) ? $_POST['your-email'] : '',\n\t\t\t'FirstName' => isset( $_POST['first-name'] ) ? $_POST['first-name'] : '',\n\t\t\t'LastName' => isset( $_POST['last-name'] ) ? $_POST['last-name'] : '',\n\n\t\t\t\/\/ Contact Fields\n\t\t\t'Field1' => isset( $_POST['address'] ) ? $_POST['address'] : '',\n\t\t\ |
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
| <script type="text/javascript"> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| document.querySelectorAll('div.ccom_monitoring_task') | |
| .forEach(function(taskDiv) { | |
| taskDiv.innerHTML = '<img decoding="async" alt="spinner" src="/wp-includes/images/wpspin.gif">'; | |
| let task = taskDiv.getAttribute('data-task'); |
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
| SELECT * FROM wp_posts | |
| WHERE post_type = 'shop_order' | |
| AND post_status IN( 'wc-cancelled', 'wc-completed', 'wc-failed', 'wc-pending' ) | |
| AND post_date < CURDATE() - INTERVAL 100 DAY | |
| ORDER BY ID DESC; |
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
| SELECT meta_key, count( meta_key ) | |
| FROM wp_usermeta | |
| GROUP BY meta_key | |
| ORDER BY count( meta_key ) DESC | |
| LIMIT 50; |
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
| SKU | Parent | Type | Name | Regular price | Attribute 1 name | Attribute 1 value(s) | Attribute 1 visible | Attribute 1 global | |
|---|---|---|---|---|---|---|---|---|---|
| TEST001 | variable | Product | Size | S,M,L,XL,2XL | 0 | 1 | |||
| TEST001-2XL | TEST001 | variation | 9.99 | Size | 2XL | 1 | 1 | ||
| TEST001-XL | TEST001 | variation | 9.99 | Size | XL | 1 | 1 | ||
| TEST001-L | TEST001 | variation | 9.99 | Size | L | 1 | 1 | ||
| TEST001-M | TEST001 | variation | 9.99 | Size | M | 1 | 1 | ||
| TEST001-S | TEST001 | variation | 9.99 | Size | S | 1 | 1 |
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
| # DEFAULT OFF | |
| #LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so | |
| # REQUIRED | |
| LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so | |
| # DEFAULT OFF | |
| #LoadModule mpm_worker_module lib/httpd/modules/mod_mpm_worker.so | |
| # DISABLED |
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
| SELECT | |
| 'Autoload KB' as name, ROUND( SUM( LENGTH( option_value ) ) / 1024 ) as size, null as autoload | |
| FROM wp_options | |
| WHERE autoload = 'yes' | |
| UNION | |
| SELECT 'Autoload count', count( * ), null as autoload | |
| FROM wp_options | |
| WHERE autoload = 'yes' | |
| UNION ( | |
| SELECT option_name, length( option_value ), autoload |
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
| SELECT meta_key, count( meta_key ) | |
| FROM wp_postmeta | |
| GROUP BY `meta_key` | |
| ORDER BY count( meta_key ) DESC | |
| LIMIT 50; |
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
| SELECT post_type, count( post_type ) | |
| FROM wp_posts | |
| GROUP BY post_type | |
| ORDER BY count( post_type ) DESC | |
| LIMIT 50; |
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
| SELECT CONCAT( 'ALTER TABLE ', TABLE_NAME, ' ENGINE=InnoDB;' ) | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE ENGINE = 'MyISAM' | |
| AND table_schema = 'database-name-here'; |