[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.217.14.237: ~ $
<?php

function learndash_notifications_lock_cron_process( $key = '' ) {
	$lock_file = WP_CONTENT_DIR . '/uploads/learndash/ld-notifications/process_lock_' . $key . '.txt';
	$dirname   = dirname( $lock_file );

	if ( ! is_dir( $dirname ) ) {
		wp_mkdir_p( $dirname );
	}

	$lock_fp   = fopen( $lock_file, 'c+' );

	return flock( $lock_fp, LOCK_EX | LOCK_NB );
}

function learndash_notifications_cron() {

	// Now try to get exclusive lock on the file. 
	if ( ! learndash_notifications_lock_cron_process( 'minute' ) ) { 
		// If you can't lock then abort because another process is already running
		exit(); 
	}

	ignore_user_abort( true );
	set_time_limit( 0 );

	// error_log( 'Cron fired by LearnDash Notifications at: ' . date( 'Y-m-d h:i:sa' ) );
	
	learndash_notifications_send_delayed_emails();
	learndash_notifications_send_enroll_course_via_group_queue();

	// update cron status
	learndash_notifications_update_cron_status();

	// error_log( 'LearnDash Notifications cron finished at: ' . date( 'Y-m-d h:i:sa' ) );
}

//add_action( 'learndash_notifications_cron', 'learndash_notifications_cron' );

function learndash_notifications_cron_hourly() {
	// error_log( 'Hourly cron fired by LearnDash Notifications at: ' . date( 'Y-m-d h:i:sa' ) );

	// Now try to get exclusive lock on the file. 
	if ( ! learndash_notifications_lock_cron_process( 'hourly' ) ) { 
		// If you can't lock then abort because another process is already running
		exit(); 
	}

	ignore_user_abort( true );
	set_time_limit( 0 );

	learndash_notifications_resend_missed_delayed_emails();
	learndash_notifications_not_logged_in();
	learndash_notifications_course_expires();
	learndash_notifications_course_expires_after();
	learndash_notifications_update_scheduled_lesson_available_notifications_cron();
	learndash_notifications_delete_learndash_user_data_cron();

	// update cron status
	learndash_notifications_update_cron_status();

	// error_log( 'LearnDash Notifications hourly cron finished at: ' . date( 'Y-m-d h:i:sa' ) );
}

//add_action( 'learndash_notifications_cron_hourly', 'learndash_notifications_cron_hourly' );

function learndash_notifications_cron_schedules( $schedules ) {
	$schedules['every_minute'] = array(
		'interval' => 60,
		'display'  => __( 'Every Minute' ),
	);

	return $schedules;
}

//add_filter( 'cron_schedules', 'learndash_notifications_cron_schedules' );

function learndash_notifications_update_cron_status() {
	if ( isset( $_GET['cron'] ) ) {
		$status = get_option( 'learndash_notifications_status', array() );
		$status['cron_setup'] = 'true';
		$status['last_run']   = time();
		update_option( 'learndash_notifications_status', $status );
	}
}

Filemanager

Name Type Size Permission Actions
admin Folder 0755
activation.php File 426 B 0644
ajax.php File 4.34 KB 0644
class-dependency-check.php File 240 B 0644
cron.php File 2.6 KB 0644
database.php File 10.61 KB 0644
deactivation.php File 304 B 0644
functions.php File 1.82 KB 0644
logger.php File 2.05 KB 0644
meta-box.php File 31.46 KB 0644
notification.php File 79.16 KB 0644
post-type.php File 12.03 KB 0644
shortcode.php File 12.09 KB 0644
subscription-manager.php File 4.69 KB 0644
tools.php File 4.2 KB 0644
update.php File 1.25 KB 0644
user.php File 1.61 KB 0644