Reminder Notes on how you set this up.
- Spin up a new Droplet using a Docker image under “One Click Apps”
- Shell into Droplet.
| <?php | |
| /** | |
| * SPAM filtering function | |
| * | |
| * @param string[] $result Current Result. Contains two keys 'is_valid' and 'message'. | |
| * @param mixed $value Field value -could be string or string[]. | |
| * @param array $form Form Entity. | |
| * @param array $field Field Entity. | |
| * | |
| * @return array |
| <?php | |
| require_once 'wp-config.php'; | |
| print 'Starting Image De-duper' . "\n"; | |
| global $table_prefix; | |
| $host = DB_HOST; | |
| $user = DB_USER; |
| <IfModule mod_expires.c> | |
| ExpiresActive on | |
| ExpiresDefault "access plus 1 month" | |
| # CSS | |
| ExpiresByType text/css "access plus 1 year" | |
| # Data interchange | |
| ExpiresByType application/json "access plus 0 seconds" | |
| ExpiresByType application/xml "access plus 0 seconds" |
| <?php | |
| function my_theme_get_version() { | |
| return filemtime( get_template_directory() . '/assets/styles/main.css' ); | |
| } | |
| function my_theme_setup_styles() { | |
| wp_register_style( | |
| 'main', | |
| get_template_directory_uri() . '/assets/styles/main.css', |
| <?php | |
| /** | |
| * Function Add "Specific Category" Selector to ACF Interface | |
| * | |
| * @param array $choices Existing choices. | |
| * | |
| * @return array Updated choices. | |
| */ | |
| function esc_acf_location_rule_post_category( $choices ): array { | |
| $choices['Forms']['specific_category'] = __( 'Specific Category', 'esc' ); |
| <code_scheme name="Magento 2" version="173"> | |
| <PHPCodeStyleSettings> | |
| <option name="ALIGN_KEY_VALUE_PAIRS" value="true" /> | |
| <option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" /> | |
| <option name="ALIGN_PHPDOC_COMMENTS" value="true" /> | |
| <option name="ALIGN_ASSIGNMENTS" value="true" /> | |
| <option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" /> | |
| <option name="PHPDOC_WRAP_LONG_LINES" value="true" /> | |
| <option name="LOWER_CASE_BOOLEAN_CONST" value="true" /> | |
| <option name="LOWER_CASE_NULL_CONST" value="true" /> |
| sudo npm cache clean -f | |
| sudo npm install -g n | |
| sudo n stable |