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('[email protected]') |
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 |
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 | |
function explicitPermissionGrantedCallback($user){ | |
if(!is_null($user)){ | |
var_dump($user); // WP_User | |
echo $user->user_nicename . 'has just just given permission'; | |
}else{ | |
// User is not logged in. | |
} |
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
<!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
....... | |
<?php if(@call_user_func('hasUserGivenPermissionFor', 'google-analytics')): ?> | |
<!-- Google Analytics --> | |
<script> |
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 | |
$array = ['quick', 'fox']; | |
$string = 'the quick brown fox jumps over the lazy dog'; | |
if(in_array(1,array_map(function($e)use($string){return(strpos($string, $e)!== FALSE)?1:0;},$array))){ | |
echo "The string contains an element in the array."; | |
} |
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 | |
$salary = 60000; | |
$oneMonth = ($salary / 12); | |
$twoMonths = ($salary / 6); | |
$halfMonth = ($salary / 24); | |
$monthlyCommission = 10000; |
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
<form action="<?= admin_url('/admin-ajax.php') ?>" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name="action" value="register"> | |
<input type="email" name="email" value=""> | |
<input type="password" name="password" value=""> | |
</form> | |
<?php if(isset($_GET['suceess'])): ?> | |
<p>succesfil blah blah blah</p> | |
<?php enif; ?> |