Skip to content

Commit

Permalink
testing against WordPress 4.3-RC2, brought jQuery UI CSS up to date, …
Browse files Browse the repository at this point in the history
…removed spammy link, various PHP warnings fixed
  • Loading branch information
WillBrubaker committed Aug 8, 2015
1 parent d821e41 commit c622aba
Show file tree
Hide file tree
Showing 33 changed files with 1,081 additions and 1,097 deletions.
2,057 changes: 1,011 additions & 1,046 deletions automatic-post-publishing-scheduler.php

Large diffs are not rendered by default.

Binary file modified css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_diagonals-thick_20_666666_40x40.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_flat_0_aaaaaa_40x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_flat_10_000000_40x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_flat_75_ffffff_40x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_100_f6f6f6_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_100_fdf5ce_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_55_fbf9ee_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_65_ffffff_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_75_dadada_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_75_e6e6e6_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_glass_95_fef1ec_1x400.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_222222_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_228ef1_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_2e83ff_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_454545_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_888888_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_cd0a0a_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_ef8c08_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_ffd27a_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/images/ui-icons_ffffff_256x240.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions css/jquery-ui.min.css
100644 → 100755

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions css/scheduler.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ margin: 1px 2px;

form#excluded-dates, form#excluded-days, form#set_time_slots, form#assign_time_slots {
position: relative;
}

.ui-dialog {
z-index: 9999;
}
2 changes: 1 addition & 1 deletion css/scheduler.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions js/publishnow.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
jQuery(document).ready(function($) {

$('input[type="submit"]').on('click', function() {
$('#quick-press').data('button', this.name);
});
$('input[type="submit"]').on('click', function() {
$('#quick-press').data('button', this.name);
});


$('#quick-press').on('submit', function(e) {
var submitButton = $(this).data('button') || $('input[type="submit"]').get(0).name;
if (submitButton == 'publish') {
myalert("Thanks for your article!", alertText);
}
});
$('#quick-press').on('submit', function(e) {
var submitButton = $(this).data('button') || $('input[type="submit"]').get(0).name;
if (submitButton == 'publish') {
myalert("Thanks for your article!", alertText);
}
});

function myalert(title, text) {
var div = $('<div>').html(text).dialog({
title: title,
modal: false,
width: '40%',
close: function() {
$(div).dialog('destroy').remove();
},
buttons: [{
text: "Ok",
click: function() {
$(this).dialog("close");
}
}]
})
};
var alertText = "<p>The article you submitted has been scheduled for a later time to ensure articles are spaced out and published during higher traffic periods. Do not be alarmed, the web mechanic is trying to make sure your article gets the visibility it deserves!</p> <p>Lower traffic periods: Late Nights, Early Mornings, and Weekends are generally avoided.</p>";
function myalert(title, text) {
var div = $('<div>').html(text).dialog({
title: title,
modal: false,
width: '40%',
close: function() {
$(div).dialog('destroy').remove();
},
buttons: [{
text: "Ok",
click: function() {
$(this).dialog("close");
}
}]
})
};
var alertText = "<p>The article you submitted has been scheduled for a later time to ensure articles are spaced out and published during higher traffic periods. Do not be alarmed, we are trying to make sure your article gets the visibility it deserves!</p> <p>Lower traffic periods: Late Nights, Early Mornings, and Weekends are generally avoided.</p>";


$('a.publish-now').on('click', function(e) {
e.preventDefault();
var nonce = $(this).attr('data-nonce');
var split = $(this).attr('href').replace('?', '').split('&').map(function(val) {
return val.split('=');
});
postID = split[0][1];
$.post(ajaxurl, {
'action': 'publish_now',
'pid': postID,
'_wp_nonce': nonce
}, function(data) {
if (data.error) alert(data.error);
else location.reload(true);
$('a.publish-now').on('click', function(e) {
e.preventDefault();
var nonce = $(this).attr('data-nonce');
var split = $(this).attr('href').replace('?', '').split('&').map(function(val) {
return val.split('=');
});
postID = split[0][1];
$.post(ajaxurl, {
'action': 'publish_now',
'pid': postID,
'_wp_nonce': nonce
}, function(data) {
if (data.error) alert(data.error);
else location.reload(true);

});
});
});
});
});
2 changes: 1 addition & 1 deletion js/publishnow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
**Contributors:** WilltheWebMechanic
**License:** GPLv3.0+
**Requires at least:** 3.6
**Tested up to:** 3.9.1
**Stable tag:** 2.1.1
**Tested up to:** 4.3
**Stable tag:** 2.1.2
**Tags:** posts, publishing, scheduling, admin, author, automatic, blog, free, plugin
**Donate Link:** http://www.willthewebmechanic.com/automatic-post-publishing-scheduler/

Expand Down Expand Up @@ -82,6 +82,13 @@ This plugin allows you to gain very precise control over when posts are publishe

## Changelog ##

### v2.1.2 ###

1. Removed some spammy links
2. Tested with WordPress 4.3 RC2
3. PHP array index checking added where it didn't exist before
4. Brought external assets (jQuery UI CSS) up to date

### v2.1.1 ###

1. Bug fix - Post by users with the role of "Contributor" were bypasssing the review process and going directly to the schedule queue. Fixed. Thanks to @Dreamerspodcast for the bug report!
Expand Down
10 changes: 8 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: WilltheWebMechanic
License: GPLv3.0+
Requires at least: 3.6
Tested up to: 3.9.1
Stable tag: 2.1.1
Tested up to: 4.3
Stable tag: 2.1.2
Tags: posts, publishing, scheduling, admin, author, automatic, blog, free, plugin
Donate Link: http://www.willthewebmechanic.com/automatic-post-publishing-scheduler/

Expand Down Expand Up @@ -69,6 +69,12 @@ This plugin allows you to gain very precise control over when posts are publishe

== Changelog ==

= v2.1.2 =
1. Removed some spammy links
2. tested with WordPress 4.3 RC2
3. PHP array index checking added where it didn't exist before
4. Brought external assets (jQuery UI CSS) up to date

= v2.1.1 =

1. Bug fix - Post by users with the role of "Contributor" were bypasssing the review process and going directly to the schedule queue. Fixed. Thanks to @Dreamerspodcast for the bug report!
Expand Down

0 comments on commit c622aba

Please sign in to comment.