- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
- Ultimate Code Generator - https://webcode.tools/
| /* inspired from https://github.com/Yoast/wpseo-woocommerce/blob/trunk/js/src/yoastseo-woo-replacevars.js */ | |
| /* global jQuery, YoastSEO, app, globals YoastACFAnalysisConfig */ | |
| var pluginName = "additionalVariablePlugin"; | |
| var ReplaceVar = window.YoastReplaceVarPlugin && window.YoastReplaceVarPlugin.ReplaceVar; | |
| var placeholders = {}; | |
| var modifiableFields = [ | |
| "content", | |
| "title", |
| CREATE TABLE `makers` ( | |
| `id` int(10) unsigned NOT NULL, | |
| `name` varchar(255) NOT NULL, | |
| `description` varchar(255) NOT NULL, | |
| `created_at` datetime NOT NULL, | |
| `updated_at` datetime NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
| -- |
WoCommerce Subscriptions processes automatic renewal payments via the following flow:
- its scheduling system, Action Scheduler, will run every minute and find any
woocommerce_scheduled_subscription_paymentactions scheduled to run now or within the last minute - if there are
woocommerce_scheduled_subscription_paymentactions scheduled for anytime before now, Action Scheduler will grab a batch of those actions and begin processing them (which just means triggeringdo_action( 'scheduled_subscription_payment', $subscription_id )for any 3rd party code to handle) - Subscriptions attaches two important functions as callbacks on the
'woocommerce_scheduled_subscription_payment'hook to process renewal for that subscription when it is called: WC_Subscriptions_Manager::prepare_renewal(), which is responsible for
| <?php | |
| // Stolen from: http://www.holisticsystems.co.uk/blog/?p=931 | |
| // Modified to work using mysqli | |
| $server = 'localhost'; | |
| $username = 'root'; | |
| $password = 'root'; | |
| $database = 'ojs'; | |
| $new_charset = 'utf8'; | |
| $new_collation = 'utf8_unicode_ci'; |
| $("form :input").each(function(index, elem) { | |
| var eId = $(elem).attr("id"); | |
| var label = null; | |
| if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
| $(elem).attr("placeholder", $(label).html()); | |
| $(label).remove(); | |
| } | |
| }); |
PHP handling on apache is done via modules of one sort or another, and running multiple version is problematic on a single instance. The solution is to run two instances of apache on the same machine. This allows one instance to run PHP 7 (the default on 16.04), and another can run PHP 5. Since normal http/https is on ports 80 and 443, the second instance will run on ports 81 and 444. Since it is running on the same machine, all file system and database access is the exact same.
All the commands herein have to be run as root, or with sudo prefixed to the command.
-
Read /usr/share/doc/apache2/README.multiple-instances
-
Run
sh ./setup-instance php5from/usr/share/doc/apache2/examples, wherephp5is the suffix for the second site; all commands for the second site will have that suffix. This will keep all of the same configuration for all sites on the new instance, including SSL certif
| <?php | |
| /** | |
| * Controller file for Lotus Drupal 8 module. | |
| * Place this file in src/Controller folder inside the lotus module folder | |
| **/ | |
| namespace Drupal\lotus\Controller; | |
| use Drupal\Core\Controller\ControllerBase; | |
| class HelloController extends ControllerBase { |
| // To turn on JS Aggregation | |
| drush vset preprocess_js 1 --yes | |
| // To clear all Cache | |
| drush cc all | |
| // To disable JS Aggregation | |
| drush vset preprocess_js 0 --yes | |
| // To clear cache of JS and CSS only |