Search and Replace in VSCode, change PHP array for object.
Activate Use Regular Expression
SEARCH:
($row)["(.+?)"]
| <?php | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| if ( ! class_exists( 'WC_KIA_Class_Email', false ) ) : | |
| /** | |
| * A custom Order WooCommerce Email class | |
| * | |
| * @since 0.1 | |
| * @extends \WC_Email |
| #!/bin/bash | |
| # CSDev | |
| # Inspired in https://github.com/yamingd/gist/wiki/backup-mysql-and-commit-to-git | |
| # Requirement: Configure user & password | |
| # mysql_config_editor set --login-path=local --host=localhost --user=$DBUSERNAME --password | |
| # Backup mysql, weekly overwrite | |
| NOW=$(date +"%u%a") |
https://devanswers.co/configure-sftp-web-server-document-root/
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.
/etc/ssh/sshd_config and make sure to add the following at the end of the file:| <?php | |
| /** | |
| * Proptotype | |
| */ | |
| namespace DoggieRescue\Notices; | |
| class AdminNotice { | |
| public static function process_messages() { | |
| $notice = self::get_admin_message(); | |
| if ( ! empty( $notice ) && is_array( $notice ) ) { |
| <?php | |
| //Display Fields | |
| add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 3 ); | |
| //JS to add fields for new variations | |
| add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
| //Save variation fields | |
| add_action( 'woocommerce_process_product_meta_variable', 'save_variable_fields', 10, 1 ); | |
| /** |
| Add to header or function file: | |
| <?php | |
| // URL Segments and Master ID | |
| // | |
| // Segment Variables: $GLOBALS['segment']['1'], $GLOBALS['segment']['2'], etc. | |
| // Master ID Variable: $GLOBALS['master_id'] | |
| global $segment; | |
| global $master_id; |
| $black: #22292f; | |
| $grey-darkest: #3d4852; | |
| $grey-darker: #606f7b; | |
| $grey-dark: #8795a1; | |
| $grey: #b8c2cc; | |
| $grey-light: #dae1e7; | |
| $grey-lighter: #f1f5f8; | |
| $grey-lightest: #f8fafc; | |
| $white: #fff; | |
| $red-darkest : #3b0d0c; |