The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| # | |
| # This script is executed from a terminal prompt at the root of your MainWP WordPress website | |
| # | |
| # Execute MainWP CLI command to generate a list of all configured sites in MainWP | |
| # Pipe output through filter to remove columns 3 and 4 of output. These columns hold the 2 digit site number. Adjust if more than 99 sites. | |
| # Pipe that output to get rid of the comment lines in the site listing. | |
| # Pipe that output through the SED editor inserting the security scan command at the beginning of the line | |
| # Send everything to a shell script to be executed. | |
| wp mainwp sites | cut -c3-4 | grep -E '([0-9]|[0-9][0-9])' | sed 's/^/wp mainwp-sucuri scan /' > sec-scan-auto.sh | |
| # |
| deny from all |
| <?php | |
| define( 'WP_DEBUG', true ); | |
| define( 'WP_DEBUG_LOG', true ); | |
| define( 'WP_DEBUG_DISPLAY', true ); | |
| @ini_set( 'display_errors', 1 ); | |
| define( 'SCRIPT_DEBUG', true ); | |
| define( 'SAVEQUERIES', true ); |
| /* Added to remove outline on any clicked div when displyed in IE 11 */ | |
| @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
| /* IE10+ CSS styles go here */ | |
| :focus { | |
| outline: none; | |
| } | |
| } |
| <? | |
| phpinfo(); | |
| ?> |
| /** | |
| * Never worry about cache again! | |
| */ | |
| function my_load_scripts($hook) { | |
| // create my own version codes | |
| $my_js_ver = date("ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'js/custom.js' )); | |
| $my_css_ver = date("ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )); | |
| // |
| <?php | |
| /** | |
| * ----- Add comment AFTER submit button on ALL Gravity Forms forms. | |
| * @link https://docs.gravityforms.com/gform_submit_button/#2-add-text-after-the-button- | |
| */ | |
| // Add consent statment after Submit button | |
| add_filter( 'gform_submit_button', 'add_paragraph_below_submit', 10, 2 ); | |
| function add_paragraph_below_submit( $button, $form ) { | |
| return $button .= "<p>By filling out this form, I acknowledge that I have read, consent to, and agree to be bound by, the terms of our <a href=\"/company/privacy-statement/\" target=\"_blank\">Privacy Policy</a>.</p>"; |
| # Load media files from production server if they don't exist locally | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
| RewriteRule ^(.*)$ https://<insert-production-sitedomain>/$1 [QSA,L] | |
| </IfModule> | |
| # Sep 2018 - Simplified using css-tricks.com recommendation | |
| # Feb 2018 - verified working on local by flywheel |