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
| <?php | |
| WP_Route::get('flights', 'listFlights'); | |
| WP_Route::post('flights/{flight}', array('FlightController', 'singleFlight')); | |
| function listFlights(){ | |
| // Your Code Here | |
| } | |
| Class FlightController{ |
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
| <?php | |
| WP_Route::get('flights/{flight}', 'singleFlight'); | |
| // http://example.com/flights/1 | |
| function singleFlight($flight){ | |
| echo $flight; // 1 | |
| // Your Code Here! |
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
| <?php | |
| WP_Route::get('flights', 'listFlights'); | |
| // http://example.com/flights | |
| function listFlights(){ | |
| // Your Code Here! | |
| } |
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
| <?php | |
| Class ExampleCronEvent extends WP_Cron{ | |
| public $every = [ | |
| 'seconds' => 30, | |
| 'minutes' => 15, | |
| 'hours' => 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
| <?php | |
| Class ExampleAction extends WP_AJAX{ | |
| protected $action = 'example-action'; | |
| protected function run(){ | |
| if($this->has('name')){ | |
| update_option('name', $this->get('name')); |
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
| <?php | |
| Class Product extends WP_Model{ | |
| public $postType = 'product'; | |
| public $attributes = [ | |
| 'color', | |
| 'weight' | |
| ]; | |
| } | |
| Product::register(); |
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
| <?php | |
| Class ContactFormAction extends WP_AJAX{ | |
| protected $action = 'contat-form'; | |
| protected function run(){ | |
| WP_Mail::init() | |
| ->to('anthonybudd@gmail.com') |
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
| <h3>You have a new contact from enquirey!</h3><br> | |
| <p> | |
| <strong>Name:</strong><?= $name ?> | |
| </p> | |
| <p> | |
| <strong>email:</strong> | |
| <a href="mailto:<?= $email ?>"><?= $email ?></a> | |
| </p> |
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
| #!/bin/bash | |
| USER="root" | |
| PASSWORD="root" | |
| OUTPUT="/Users/anthonybudd/sql/backup" | |
| databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
| for db in $databases; do | |
| if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then |
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
| #!/bin/bash | |
| rm -rf /home/bitnami/www/demo.gdprplug.in | |
| cp -a /home/bitnami/demo.gdprplug.in /home/bitnami/www/demo.gdprplug.in | |
| /opt/bitnami/mysql/bin/mysql -u root --password=YOUR_MYSQL_PASSWORD demo_gdprplug_in < /home/bitnami/export.sql |