Skip to content

Commit

Permalink
v0.9.1
Browse files Browse the repository at this point in the history
* Update Font Awesome to 4.7.0.
* Add requires PHP version.
* Add translation template file (.POT).
* Add translators help message.
* Fix bug disable order is not working on category page.
  • Loading branch information
ve3 committed Dec 8, 2018
1 parent bc4a159 commit 84e1bd8
Show file tree
Hide file tree
Showing 15 changed files with 1,710 additions and 507 deletions.
3 changes: 3 additions & 0 deletions .dev-notes/how-to-create-pot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use this command:
`wp i18n make-pot . --exclude="assets,languages,*.css,*.js,*.svg,*.eot,*.woff,*.woff2,*.ttf,*.html,*.txt,*.pot"`
And check the result.
6 changes: 6 additions & 0 deletions .dev-notes/requirement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PHP 5.5+
- Output Buffer "On" or "Limited" but not "Off"

WordPress 4.0

Cross browser: Firefox, Chrome, Opera, Internet Explorer 10+, MS Edge.
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Disable LF normalization for all files
* -text
* -text

# Export ignore folders, files.
.dev-notes export-ignore
.gitattributes export-ignore
6 changes: 4 additions & 2 deletions App/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ private function checkRequirement()
$php_version = (defined('PHP_VERSION') ? PHP_VERSION : (function_exists('phpversion') ? phpversion() : '4'));

if (version_compare(get_bloginfo('version'), $wordpress_required_version, '<')) {
$error_message = sprintf(__('Your WordPress version does not meet the requirement. (%s < %s).', 'rd-postorder'), get_bloginfo('version'), $wordpress_required_version);
/* translators: %1$s: Current WordPress version, %2$s: Required WordPress version. */
$error_message = sprintf(__('Your WordPress version does not meet the requirement. (%1$s < %2$s).', 'rd-postorder'), get_bloginfo('version'), $wordpress_required_version);
throw new \Exception($error_message);
}

if (version_compare($php_version, $php_required_version, '<')) {
$error_message = sprintf(__('Your PHP version does not meet the requirement. (%s < %s).', 'rd-postorder'), $php_version, $php_required_version);
/* translators: %1$s: Current PHP version, %2$s: Required PHP version. */
$error_message = sprintf(__('Your PHP version does not meet the requirement. (%1$s < %2$s).', 'rd-postorder'), $php_version, $php_required_version);
throw new \Exception($error_message);
}

Expand Down
1 change: 1 addition & 0 deletions App/Controllers/Admin/ReOrderPosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function adminHelpTab()
'id' => 'rd-postorder_reorder-posts-helptab1',
'title' => __('Re-order by dragging', 'rd-postorder'),
'content' => '<p>'
/* translators: %s: The re-order icon. */
. sprintf(__('Put your cursor on the row you want to re-order and drag at the up/down icon (%s) to re-order the post item.', 'rd-postorder'), '<i class="fa fa-sort fa-fw"></i>')
. '<br>'."\n"
. __('Once you stop dragging and release the mouse button it will be update automatically.', 'rd-postorder')
Expand Down
10 changes: 10 additions & 0 deletions App/Controllers/AlterPosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ protected function isDisableCustomOrder()
$this_category_id = (isset($this_category->term_id) ? $this_category->term_id : 0);
unset($this_category);

if ($this_category_id === 0) {
// if found no category.
// @link https://wordpress.stackexchange.com/questions/59476/get-current-category-id-php In case that website post don't select any category then this is the last chance.
$this_category = get_queried_object();
if (isset($this_category->term_id)) {
$this_category_id = $this_category->term_id;
}
}
unset($this_category);

if (
array_key_exists('disable_customorder_categories', $plugin_options) &&
is_array($plugin_options['disable_customorder_categories']) &&
Expand Down
2 changes: 1 addition & 1 deletion App/Models/PostsListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @link http://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/ another tutorial
* @link https://codex.wordpress.org/Class_Reference/WP_List_Table wordpress list table class source.
*/
class PostsListTable extends \WP_List_Table
class PostsListTable extends WPListTable
{


Expand Down
Loading

0 comments on commit 84e1bd8

Please sign in to comment.