Reorder Posts - Version 1.0.6

Version Description

  • Updated 2014-12-11 - Ensuring WordPress 4.1 compatibility
  • Released 2013-07-19
  • Added new filter for editing the post-types supported
  • Thanks to mathielo for the suggestion and code contribution.
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 Reorder Posts
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

Files changed (3) hide show
  1. index.php +10 -8
  2. readme.txt +25 -5
  3. screenshot1.png +0 -0
index.php CHANGED
@@ -1,15 +1,13 @@
1
  <?php
2
  /*
3
  Plugin Name: Metronet Reorder Posts
4
- Plugin URI: http://metronet.no/
5
  Description: Reorder posts
6
- Version: 1.0.5
7
- Author: Ryan Hellyer / Metronet
8
- Author URI: http://metronet.no/
9
 
10
  ------------------------------------------------------------------------
11
- Copyright Metronet AS
12
-
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License as published by
15
  the Free Software Foundation; either version 2 of the License, or
@@ -61,9 +59,13 @@ define( 'REORDER_URL', rtrim( plugin_dir_url(__FILE__), '/' ) ); // Plugin folde
61
  */
62
  add_action( 'wp_loaded', 'mn_reorder_posts_init', 100 ); //Load low priority in init for other plugins to generate their post types
63
  function mn_reorder_posts_init() {
64
- $post_types = get_post_types( '','names' );
 
 
 
 
65
  foreach ( $post_types as $post_type ) {
66
-
67
  // Instantiate new reordering
68
  new Reorder(
69
  array(
1
  <?php
2
  /*
3
  Plugin Name: Metronet Reorder Posts
4
+ Plugin URI: https://wordpress.org/plugins/metronet-reorder-posts/
5
  Description: Reorder posts
6
+ Version: 1.0.6
7
+ Author: Ryan Hellyer
8
+ Author URI: http://geek.ryanhellyer.net/
9
 
10
  ------------------------------------------------------------------------
 
 
11
  This program is free software; you can redistribute it and/or modify
12
  it under the terms of the GNU General Public License as published by
13
  the Free Software Foundation; either version 2 of the License, or
59
  */
60
  add_action( 'wp_loaded', 'mn_reorder_posts_init', 100 ); //Load low priority in init for other plugins to generate their post types
61
  function mn_reorder_posts_init() {
62
+ $post_types = get_post_types( '','names' );
63
+
64
+ // Add filter to allow users to control which post-types the plugin is used with via their theme
65
+ $post_types = apply_filters( 'metronet_reorder_post_types', $post_types );
66
+
67
  foreach ( $post_types as $post_type ) {
68
+
69
  // Instantiate new reordering
70
  new Reorder(
71
  array(
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: ryanhellyer, metronet, ronalfy
3
  Author URI: http://metronet.no/
4
  Plugin URL: http://metronet.no/
5
  Requires at Least: 3.3
6
- Tested up to: 3.4.1
7
- Tags: reorder, posts, wordpress, post-type
8
- Stable tag: 1.0.5
9
 
10
  A simple and easy way to reorder your custom post-type posts in WordPress.
11
 
@@ -30,11 +30,21 @@ There is no settings page per se. The plugin adds an ordering page as a submenu
30
 
31
  = Where is the "save" button? =
32
 
33
- There isn't one. The changes are saved automatically .
34
 
35
  = Can I use this on a single post type? =
36
 
37
- If you want to use the plugin on a single post type, then we recommend extracting the "Reorder" class from the plugin and using it directly. We have attempted to make the class as user-friendly and adaptable as possible.
 
 
 
 
 
 
 
 
 
 
38
 
39
  = Does the plugin work with hierarchical post types? =
40
 
@@ -50,19 +60,29 @@ Probably, but we only support the latest version of WordPress.
50
 
51
  == Changelog ==
52
 
 
 
 
 
 
 
53
  = 1.0.5 =
 
54
  * Added expand/collapse section for nested post types
55
  * Added better page detection for scripts and styles
56
 
57
  = 1.0.4 =
 
58
  * Added support for hierarchical post types
59
 
60
  = 1.0.3 =
 
61
  * Updated screenshot
62
  * Corrected function prefix
63
  * Additional: changed readme.txt (didn't bump version number)
64
 
65
  = 1.0.2 =
 
66
  * Added ability to post type of posts to be reordered
67
  * Fixed bug in initial order
68
 
3
  Author URI: http://metronet.no/
4
  Plugin URL: http://metronet.no/
5
  Requires at Least: 3.3
6
+ Tested up to: 4.1
7
+ Tags: reorder, re-order, posts, wordpress, post-type, ajax, admin, hierarchical, menu_order, ordering
8
+ Stable tag: 1.0.6
9
 
10
  A simple and easy way to reorder your custom post-type posts in WordPress.
11
 
30
 
31
  = Where is the "save" button? =
32
 
33
+ There isn't one. The changes are saved automatically.
34
 
35
  = Can I use this on a single post type? =
36
 
37
+ We have attempted to make the class as user-friendly and adaptable as possible. You can either extract the "Reorder" class from the plugin and use it directly. Or alternatively, you can filter the post-types via your custom plugin or theme.
38
+
39
+ `<?php
40
+
41
+ add_filter( 'metronet_reorder_post_types', 'slug_set_reorder' );
42
+ function slug_set_reorder( $post_types ) {
43
+ $post_types = array( 'my_custom_post_type', 'my_other_post_type' );
44
+ return $post_types;
45
+ }
46
+
47
+ ?>`
48
 
49
  = Does the plugin work with hierarchical post types? =
50
 
60
 
61
  == Changelog ==
62
 
63
+ = 1.0.6 =
64
+ * Updated 2014-12-11 - Ensuring WordPress 4.1 compatibility
65
+ * Released 2013-07-19
66
+ * Added new filter for editing the post-types supported
67
+ * Thanks to mathielo for the suggestion and code contribution.
68
+
69
  = 1.0.5 =
70
+ * Released 2012-08-09
71
  * Added expand/collapse section for nested post types
72
  * Added better page detection for scripts and styles
73
 
74
  = 1.0.4 =
75
+ * Released 2012-07-11
76
  * Added support for hierarchical post types
77
 
78
  = 1.0.3 =
79
+ * Released 2012-05-09
80
  * Updated screenshot
81
  * Corrected function prefix
82
  * Additional: changed readme.txt (didn't bump version number)
83
 
84
  = 1.0.2 =
85
+ * Released 2012-05-09
86
  * Added ability to post type of posts to be reordered
87
  * Fixed bug in initial order
88
 
screenshot1.png DELETED
Binary file