Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Crony 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Mar 2, 2022
1 parent f17aee6 commit c63d9c9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 48 deletions.
9 changes: 5 additions & 4 deletions crony.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?php
/*
Plugin Name: Crony Cronjob Manager
Plugin URI: http://scottkclark.com/
Plugin URI: https://www.scottkclark.com/
Description: Create and Manage Cronjobs in WP by loading Scripts via URLs, including Scripts, running Functions, and/or running PHP code. This plugin utilizes the wp_cron API.
Version: 0.4.9
Version: 0.5.0
Author: Scott Kingsley Clark
Author URI: http://scottkclark.com/
Author URI: https://www.scottkclark.com/
GitHub Plugin URI: https://github.com/sc0ttkclark/crony
*/

global $wpdb;
define( 'CRONY_TBL', $wpdb->prefix . 'crony_' );
define( 'CRONY_VERSION', '049' );
define( 'CRONY_VERSION', '050' );
define( 'CRONY_URL', WP_PLUGIN_URL . '/crony' );
define( 'CRONY_DIR', WP_PLUGIN_DIR . '/crony' );

Expand Down
61 changes: 26 additions & 35 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Donate link: https://www.scottkclark.com/
Tags: cron, wp_cron, cronjob, cron job, automatic, scheduler
Requires at least: 4.9
Requires PHP: 5.6
Tested up to: 5.7
Stable tag: 0.4.9
Tested up to: 5.9
Stable tag: 0.5.0

Create and Manage Cronjobs in WP by loading Scripts via URLs, including Scripts, running Functions, and/or running PHP code. This plugin utilizes the wp_cron API.

Expand All @@ -27,8 +27,31 @@ As you receive visitors on your site, WordPress checks your database to see if a

Cronjobs configured on a server run on their intervals automatically, while wp_cron() jobs run only after being triggered from a visitor to your site.

== Installation ==

1. Unpack the entire contents of this plugin zip file into your `wp-content/plugins/` folder locally
1. Upload to your site
1. Navigate to `wp-admin/plugins.php` on your site (your WP plugin page)
1. Activate this plugin

OR you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin's name

== Features ==

= Administration =
* Create and Manage Custom Cronjobs
* View Custom Cronjob Activity Log
* View and Remove Existing Cronjobs
* View Available Cronjob Schedules and Intervals
* Reset Logs or all Crony settings
* Admin.Class.php - A class for plugins to manage data using the WordPress UI appearance

== Changelog ==

= 0.5.0 =
* Fixed issue with the Start On and Next Run On datetime fields showing the current saved value in certain browsers.
* Updated compatibility with WP 5.9 and PHP 8.0

= 0.4.9 =
* Now requires PHP 5.6+ and WordPress 4.9+
* Fixed some CSS targeting so it was more specific and not general to prevent conflicts with other admin CSS.
Expand Down Expand Up @@ -97,36 +120,4 @@ Cronjobs configured on a server run on their intervals automatically, while wp_c
* Bug fix, the db table was created without an essential field

= 0.1 =
* First official release to the public as a plugin

== Installation ==

1. Unpack the entire contents of this plugin zip file into your `wp-content/plugins/` folder locally
1. Upload to your site
1. Navigate to `wp-admin/plugins.php` on your site (your WP plugin page)
1. Activate this plugin

OR you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin's name

== Official Support ==

Crony Cronjob Manager - Support Forums: http://scottkclark.com/forums/crony-cronjob-manager/

== About the Plugin Author ==

Scott Kingsley Clark from SKC Development -- Scott specializes in WordPress and Pods CMS Framework development using PHP, MySQL, and AJAX. Scott is also a developer on the Pods CMS Framework plugin

== Features ==

= Administration =
* Create and Manage Custom Cronjobs
* View Custom Cronjob Activity Log
* View and Remove Existing Cronjobs
* View Available Cronjob Schedules and Intervals
* Reset Logs or all Crony settings
* Admin.Class.php - A class for plugins to manage data using the WordPress UI appearance

== Roadmap ==

= 0.5.0 =
* Test a Job by running the script via iframe
* First official release to the public as a plugin
18 changes: 9 additions & 9 deletions wp-admin-ui/Admin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
*
* @package Admin UI for Plugins
*
* @version 1.11.5
* @version 1.11.6
* @author Scott Kingsley Clark
* @link https://www.scottkclark.com/
*
Expand Down Expand Up @@ -881,7 +881,7 @@ function form( $create = 0, $duplicate = 0 ) {
$html_input_type = 'datetime-local';
}
?>
<input type="<?php echo esc_attr( $html_input_type ); ?>" name="<?php echo esc_attr( $column ); ?>" id="admin_ui_<?php echo esc_attr( $column ); ?>" value="<?php echo esc_attr( $this->row[ $column ] ); ?>" />
<input type="<?php echo esc_attr( $html_input_type ); ?>" name="<?php echo esc_attr( $column ); ?>" id="admin_ui_<?php echo esc_attr( $column ); ?>" value="<?php echo esc_attr( str_replace( ' ', 'T', $this->row[ $column ] ) ); ?>" />
<?php
} elseif ( 'related' === $attributes['type'] && false !== $attributes['related'] ) {
if ( ! is_array( $attributes['related'] ) ) {
Expand Down Expand Up @@ -1728,7 +1728,7 @@ function get_data( $full = false ) {
}
$sql = preg_replace( '/ SELECT /i', " SELECT {$calc_found_sql} ", preg_replace( '/ SELECT SQL_CALC_FOUND_ROWS /i', ' SELECT ', $sql, 1 ), 1 );
$wheresql = $havingsql = $ordersql = $limitsql = '';
$other_sql = $having_sql = $replace_varibles = array();
$other_sql = $having_sql = $replace_variables = array();
if ( $full || false !== $this->sql_count ) {
preg_match( '/SELECT (.*) FROM/i', $sql, $selectmatches );
} else {
Expand Down Expand Up @@ -1787,7 +1787,7 @@ function get_data( $full = false ) {
if ( ! empty( $other_sql ) ) {
foreach ( $other_sql as $key => $value ) {
if ( false !== stripos( $sql, '%%' . $key . '%%' ) ) {
$replace_varibles[ $key ] = $value;
$replace_variables[ $key ] = $value;

unset( $other_sql[ $key ] );
}
Expand All @@ -1799,7 +1799,7 @@ function get_data( $full = false ) {
if ( ! empty( $having_sql ) ) {
foreach ( $having_sql as $key => $value ) {
if ( false !== stripos( $sql, '%%' . $key . '%%' ) ) {
$replace_varibles[ $key ] = $value;
$replace_variables[ $key ] = $value;

unset( $having_sql[ $key ] );
}
Expand Down Expand Up @@ -1889,7 +1889,7 @@ function get_data( $full = false ) {
if ( ! empty( $other_sql ) ) {
foreach ( $other_sql as $key => $value ) {
if ( false !== stripos( $sql, '%%' . $key . '%%' ) ) {
$replace_varibles[ $key ] = $value;
$replace_variables[ $key ] = $value;

unset( $other_sql[ $key ] );
}
Expand All @@ -1907,7 +1907,7 @@ function get_data( $full = false ) {
if ( ! empty( $having_sql ) ) {
foreach ( $having_sql as $key => $value ) {
if ( false !== stripos( $sql, '%%' . $key . '%%' ) ) {
$replace_varibles[ $key ] = $value;
$replace_variables[ $key ] = $value;

unset( $having_sql[ $key ] );
}
Expand Down Expand Up @@ -1984,7 +1984,7 @@ function get_data( $full = false ) {
} elseif ( stripos( $sql, '%%LIMIT%%' ) === false ) {
$sql = str_replace( ' LIMIT ', ' LIMIT %%LIMIT%% ', $sql );
}
foreach ( $replace_varibles as $k => $v ) {
foreach ( $replace_variables as $k => $v ) {
$sql = str_ireplace( '%%' . $k . '%%', $v, $sql );
}
$sql = str_replace( '%%WHERE%%', $wheresql, $sql );
Expand All @@ -1995,7 +1995,7 @@ function get_data( $full = false ) {
$sql = str_replace( ' ', ' ', $sql );
if ( false !== $this->sql_count ) {
$wheresql = $havingsql = $ordersql = $limitsql = '';
$sql_count = ' ' . str_replace( array( "\n", "\r", ' ' ), ' ', ' ' . $this->sql_count ) . ' ';
$sql_count = ' ' . preg_replace( '/\s+/', ' ', ' ' . $this->sql_count ) . ' ';
$calc_found_sql = 'SQL_CALC_FOUND_ROWS';
if ( $full || false !== $this->sql_count ) {
$calc_found_sql = '';
Expand Down

0 comments on commit c63d9c9

Please sign in to comment.