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 | |
// Source: http://stackoverflow.com/a/25749714 | |
if (empty($_GET['pass'])) { die('error'); } | |
// your config | |
$filename = 'yourGigaByteDump.sql'; | |
$dbHost = 'localhost'; | |
$dbUser = 'user'; | |
$dbPass = '__pass__'; | |
$dbName = 'dbname'; |
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 has_an_active_subscriber( $product_id = null ){ | |
// Empty array to store ALL existing Subscription PRODUCTS | |
$products_arr = array(); | |
$products_subscr = get_posts( array( | |
'numberposts' => -1, | |
'post_status' => 'publish', |
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
[Desktop Entry] | |
Comment=Start and Stop XAMPP | |
Name=XAMPP Control Panel | |
Exec=gksudo python2 /opt/lampp/share/xampp-control-panel/xampp-control-panel.py | |
#Exec=gksudo /opt/lampp/manager-linux.run | |
Icon=/usr/share/icons/Humanity/devices/24/network-wired.svg | |
Encoding=UTF-8 | |
Terminal=false | |
Name=XAMPP Control Panel | |
Comment=Start and Stop XAMPP |
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 | |
/* | |
Plugin Name: fixme test for booked plugin | |
Using: place it in the plugins dir and activate from wp-admin | |
*/ | |
if( ! function_exists( 'mplus_fix_query' ) ) | |
{ | |
function mplus_fix_query( $args ) { | |
// echo '<pre>'.print_r($args, true).'</pre>'; |
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
$start_timestamp = strtotime('-1 second',strtotime($year.'-'.$month.'-'.$day.' 00:00:01')); | |
$end_timestamp = strtotime('+1 second',strtotime($year.'-'.$month.'-'.$day.' 23:59:58')); |
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
$start_timestamp = strtotime('-1 second',strtotime($year.'-'.$month.'-'.$day.' 00:00:00')); | |
$end_timestamp = strtotime('+1 second',strtotime($year.'-'.$month.'-'.$day.' 23:59:59')); |
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
echo "<p>Start time: $start_timestamp</p>"; | |
echo "<p>End time: $end_timestamp</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
$bookedAppointments = new WP_Query( apply_filters('booked_fe_date_content_query',$args) ); |
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
$args = array( | |
'post_type' => 'booked_appointments', | |
'posts_per_page' => -1, | |
'post_status' => 'any', | |
'meta_query' => array( | |
array( | |
'key' => '_appointment_timestamp', | |
'value' => array( $start_timestamp, $end_timestamp ), | |
'compare' => 'BETWEEN' | |
) |
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 | |
echo mktime().'<br/>'; | |
sleep(1); | |
echo mktime().'<br/>'; | |
sleep(1); | |
echo mktime().'<br/>'; | |
sleep(1); |