Plugin Directory

Changeset 3472613


Ignore:
Timestamp:
03/02/2026 11:23:28 AM (4 weeks ago)
Author:
bracketdev
Message:

Release 1.2.3: Fix new posts appearing last in per-term ordering — they now appear first

Location:
bracket-post-order
Files:
6 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bracket-post-order/tags/1.2.3/bracket-post-order.php

    r3462853 r3472613  
    44 * Plugin URI:        https://wordpress.org/plugins/bracket-post-order/
    55 * Description:       Drag-and-drop post ordering with per-taxonomy-term support. Reorder posts globally or within specific categories/tags.
    6  * Version:           1.2.2
     6 * Version:           1.2.3
    77 * Requires at least: 6.2
    88 * Requires PHP:      7.4
     
    1919}
    2020
    21 define( 'BRACKET_PO_VERSION', '1.2.2' );
     21define( 'BRACKET_PO_VERSION', '1.2.3' );
    2222define( 'BRACKET_PO_PATH', plugin_dir_path( __FILE__ ) );
    2323define( 'BRACKET_PO_URL', plugin_dir_url( __FILE__ ) );
  • bracket-post-order/tags/1.2.3/includes/class-bracket-po-query.php

    r3462853 r3472613  
    162162        global $wpdb;
    163163
    164         // Build FIELD() clause — posts not in the list appear at end
     164        // Build FIELD() clause — new/unordered posts appear first (by date), then saved order
    165165        $ids_str = implode( ',', array_map( 'absint', $ordered_ids ) );
    166         $clauses['orderby'] = "FIELD({$wpdb->posts}.ID, {$ids_str}) = 0, FIELD({$wpdb->posts}.ID, {$ids_str}) ASC";
     166        $clauses['orderby'] = "FIELD({$wpdb->posts}.ID, {$ids_str}) > 0, FIELD({$wpdb->posts}.ID, {$ids_str}) ASC, {$wpdb->posts}.post_date DESC";
    167167
    168168        return $clauses;
  • bracket-post-order/tags/1.2.3/readme.txt

    r3462853 r3472613  
    44Requires at least: 6.2
    55Tested up to: 6.9
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    2323
    2424**2. Per-Term Post Ordering**
    25 Filter your admin list by a category or taxonomy term, and the interface switches to per-term mode. Drag posts into the order you want for *that specific term*. Assign the same post to multiple categories — each one keeps its own sort. New posts added to a term automatically appear at the end of the custom order.
     25Filter your admin list by a category or taxonomy term, and the interface switches to per-term mode. Drag posts into the order you want for *that specific term*. Assign the same post to multiple categories — each one keeps its own sort. New posts added to a term automatically appear first (newest on top).
    2626
    2727**3. Taxonomy Term Ordering**
     
    104104] );`
    105105
    106 The plugin will automatically apply the saved per-term order via `FIELD()` SQL — posts not in the saved order appear at the end.
     106The plugin will automatically apply the saved per-term order via `FIELD()` SQL — posts not in the saved order appear first (newest on top).
    107107
    108108== Installation ==
     
    190190= What happens when I add a new post to a category that has a custom order? =
    191191
    192 New posts that aren't part of the saved per-term order automatically appear at the end. You can then go to the admin, filter by that term, and drag the new post into position.
     192New posts that aren't part of the saved per-term order automatically appear first (sorted by date, newest on top). You can then go to the admin, filter by that term, and drag the new post into position.
    193193
    194194= Is it compatible with Simple Custom Post Order (SCPO)? =
     
    210210
    211211== Changelog ==
     212
     213= 1.2.3 =
     214* Fixed: New posts added to a term with per-term ordering now appear first instead of last
    212215
    213216= 1.1.0 =
  • bracket-post-order/trunk/bracket-post-order.php

    r3462853 r3472613  
    44 * Plugin URI:        https://wordpress.org/plugins/bracket-post-order/
    55 * Description:       Drag-and-drop post ordering with per-taxonomy-term support. Reorder posts globally or within specific categories/tags.
    6  * Version:           1.2.2
     6 * Version:           1.2.3
    77 * Requires at least: 6.2
    88 * Requires PHP:      7.4
     
    1919}
    2020
    21 define( 'BRACKET_PO_VERSION', '1.2.2' );
     21define( 'BRACKET_PO_VERSION', '1.2.3' );
    2222define( 'BRACKET_PO_PATH', plugin_dir_path( __FILE__ ) );
    2323define( 'BRACKET_PO_URL', plugin_dir_url( __FILE__ ) );
  • bracket-post-order/trunk/includes/class-bracket-po-query.php

    r3462853 r3472613  
    162162        global $wpdb;
    163163
    164         // Build FIELD() clause — posts not in the list appear at end
     164        // Build FIELD() clause — new/unordered posts appear first (by date), then saved order
    165165        $ids_str = implode( ',', array_map( 'absint', $ordered_ids ) );
    166         $clauses['orderby'] = "FIELD({$wpdb->posts}.ID, {$ids_str}) = 0, FIELD({$wpdb->posts}.ID, {$ids_str}) ASC";
     166        $clauses['orderby'] = "FIELD({$wpdb->posts}.ID, {$ids_str}) > 0, FIELD({$wpdb->posts}.ID, {$ids_str}) ASC, {$wpdb->posts}.post_date DESC";
    167167
    168168        return $clauses;
  • bracket-post-order/trunk/readme.txt

    r3462853 r3472613  
    44Requires at least: 6.2
    55Tested up to: 6.9
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    2323
    2424**2. Per-Term Post Ordering**
    25 Filter your admin list by a category or taxonomy term, and the interface switches to per-term mode. Drag posts into the order you want for *that specific term*. Assign the same post to multiple categories — each one keeps its own sort. New posts added to a term automatically appear at the end of the custom order.
     25Filter your admin list by a category or taxonomy term, and the interface switches to per-term mode. Drag posts into the order you want for *that specific term*. Assign the same post to multiple categories — each one keeps its own sort. New posts added to a term automatically appear first (newest on top).
    2626
    2727**3. Taxonomy Term Ordering**
     
    104104] );`
    105105
    106 The plugin will automatically apply the saved per-term order via `FIELD()` SQL — posts not in the saved order appear at the end.
     106The plugin will automatically apply the saved per-term order via `FIELD()` SQL — posts not in the saved order appear first (newest on top).
    107107
    108108== Installation ==
     
    190190= What happens when I add a new post to a category that has a custom order? =
    191191
    192 New posts that aren't part of the saved per-term order automatically appear at the end. You can then go to the admin, filter by that term, and drag the new post into position.
     192New posts that aren't part of the saved per-term order automatically appear first (sorted by date, newest on top). You can then go to the admin, filter by that term, and drag the new post into position.
    193193
    194194= Is it compatible with Simple Custom Post Order (SCPO)? =
     
    210210
    211211== Changelog ==
     212
     213= 1.2.3 =
     214* Fixed: New posts added to a term with per-term ordering now appear first instead of last
    212215
    213216= 1.1.0 =
Note: See TracChangeset for help on using the changeset viewer.