Plugin Directory

Changeset 3467136


Ignore:
Timestamp:
02/22/2026 09:55:06 PM (5 weeks ago)
Author:
runthingsdev
Message:

Update to version 1.4.0 from GitHub

Location:
runthings-taxonomy-tags-to-checkboxes
Files:
16 added
2 deleted
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/assets/css/admin.css

    r3461388 r3467136  
    5757}
    5858#taxonomy-table th.column-height,
    59 #taxonomy-table th.column-show-link {
     59#taxonomy-table th.column-show-link,
     60#taxonomy-table th.column-allow-create,
     61#taxonomy-table th.column-search {
    6062  padding: 8px;
    6163}
     
    6870  width: 70px;
    6971}
     72.min-terms-input {
     73  display: flex;
     74  align-items: center;
     75  gap: 5px;
     76}
     77.min-terms-input input[type="number"] {
     78  width: 70px;
     79}
    7080
    7181/* Show Link Column */
     
    7383  width: 100px;
    7484  text-align: center;
     85}
     86
     87#taxonomy-table .column-allow-create {
     88  width: 100px;
     89  text-align: center;
     90}
     91#taxonomy-table .column-search {
     92  width: 180px;
    7593}
    7694
     
    159177
    160178  /* Show link inline */
    161   #taxonomy-table .column-show-link {
     179  #taxonomy-table .column-show-link,
     180  #taxonomy-table .column-allow-create,
     181  #taxonomy-table .column-search {
    162182    display: flex;
    163183    align-items: center;
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/assets/js/admin.js

    r3271144 r3467136  
    1 (function ($) {
    2   "use strict";
     1( function ( $ ) {
     2    'use strict';
     3    const taxonomyStats = window.taxonomyStats || { systemCount: 0 };
    34
    4   $(document).ready(function () {
    5     // Table sorting functionality
    6     $(".sort-column").on("click", function (e) {
    7       e.preventDefault();
     5    $( document ).ready( function () {
     6        // Table sorting functionality
     7        $( '.sort-column' ).on( 'click', function ( e ) {
     8            e.preventDefault();
    89
    9       var $this = $(this);
    10       var column = $this.data("column");
    11       var $table = $("#taxonomy-table");
    12       var $rows = $table.find("tbody tr").toArray();
    13       var ascending = $this.closest("th").hasClass("desc");
     10            const $this = $( this );
     11            const column = $this.data( 'column' );
     12            const $table = $( '#taxonomy-table' );
     13            const $rows = $table.find( 'tbody tr' ).toArray();
     14            const ascending = $this.closest( 'th' ).hasClass( 'desc' );
    1415
    15       // Update sortable classes
    16       $table.find("thead th, tfoot th").removeClass("sorted asc desc");
     16            // Update sortable classes
     17            $table
     18                .find( 'thead th, tfoot th' )
     19                .removeClass( 'sorted asc desc' );
    1720
    18       // Update the current column's sorting state
    19       var $currentHeader = $this.closest("th");
    20       $currentHeader.addClass("sorted");
     21            // Update the current column's sorting state
     22            const $currentHeader = $this.closest( 'th' );
     23            $currentHeader.addClass( 'sorted' );
    2124
    22       if (ascending) {
    23         $currentHeader.removeClass("desc").addClass("asc");
    24       } else {
    25         $currentHeader.removeClass("asc").addClass("desc");
    26       }
     25            if ( ascending ) {
     26                $currentHeader.removeClass( 'desc' ).addClass( 'asc' );
     27            } else {
     28                $currentHeader.removeClass( 'asc' ).addClass( 'desc' );
     29            }
    2730
    28       // Sort the rows
    29       $rows.sort(function (a, b) {
    30         var valA, valB;
     31            // Sort the rows
     32            $rows.sort( function ( a, b ) {
     33                let valA, valB;
    3134
    32         if (column === "name") {
    33           valA = $(a).data("name");
    34           valB = $(b).data("name");
    35         } else if (column === "post_types") {
    36           valA = $(a).data("post-types");
    37           valB = $(b).data("post-types");
    38         } else if (column === "type") {
    39           valA = $(a).data("type");
    40           valB = $(b).data("type");
    41         }
     35                if ( column === 'name' ) {
     36                    valA = $( a ).data( 'name' );
     37                    valB = $( b ).data( 'name' );
     38                } else if ( column === 'post_types' ) {
     39                    valA = $( a ).data( 'post-types' );
     40                    valB = $( b ).data( 'post-types' );
     41                } else if ( column === 'type' ) {
     42                    valA = $( a ).data( 'type' );
     43                    valB = $( b ).data( 'type' );
     44                }
    4245
    43         if (valA < valB) return ascending ? -1 : 1;
    44         if (valA > valB) return ascending ? 1 : -1;
    45         return 0;
    46       });
     46                if ( valA < valB ) {
     47                    return ascending ? -1 : 1;
     48                }
     49                if ( valA > valB ) {
     50                    return ascending ? 1 : -1;
     51                }
     52                return 0;
     53            } );
    4754
    48       // Append sorted rows to table
    49       $.each($rows, function (index, row) {
    50         $table.find("tbody").append(row);
    51       });
     55            // Append sorted rows to table
     56            $.each( $rows, function ( index, row ) {
     57                $table.find( 'tbody' ).append( row );
     58            } );
    5259
    53       return false;
    54     });
     60            return false;
     61        } );
    5562
    56     // System taxonomy toggle
    57     $("#show-system-taxonomies").on("change", function () {
    58       if ($(this).is(":checked")) {
    59         $(".system-taxonomy").show();
    60       } else {
    61         $(".system-taxonomy").hide();
    62       }
     63        // System taxonomy toggle
     64        $( '#show-system-taxonomies' ).on( 'change', function () {
     65            if ( $( this ).is( ':checked' ) ) {
     66                $( '.system-taxonomy' ).show();
     67            } else {
     68                $( '.system-taxonomy' ).hide();
     69            }
    6370
    64       updateNoItemsVisibility();
    65     });
     71            updateNoItemsVisibility();
     72        } );
    6673
    67     // Height type selection change handler
    68     $(".height-type-select").on("change", function () {
    69       var $this = $(this);
    70       var $row = $this.closest("tr");
    71       var $customField = $row.find(".custom-height-input");
     74        // Height type selection change handler
     75        $( '.height-type-select' ).on( 'change', function () {
     76            const $this = $( this );
     77            const $row = $this.closest( 'tr' );
     78            const $customField = $row.find( '.custom-height-input' );
    7279
    73       if ($this.val() === "custom") {
    74         $customField.show();
    75       } else {
    76         $customField.hide();
    77       }
    78     });
     80            if ( $this.val() === 'custom' ) {
     81                $customField.show();
     82            } else {
     83                $customField.hide();
     84            }
     85        } );
    7986
    80     // Taxonomy checkbox change handler
    81     $("input[name='runthings_ttc_selected_taxonomies[]']").on(
    82       "change",
    83       function () {
    84         var $this = $(this);
    85         var $row = $this.closest("tr");
    86         var $heightSelect = $row.find(".height-type-select");
    87         var $customHeight = $row.find(".custom-height-input input");
    88         var $showLinkCheckbox = $row.find(
    89           "input[name='runthings_ttc_show_links[]']"
    90         );
     87        // Search mode selection change handler
     88        $( '.search-mode-select' ).on( 'change', function () {
     89            const $this = $( this );
     90            const $row = $this.closest( 'tr' );
     91            const $minTermsField = $row.find( '.min-terms-input' );
    9192
    92         if ($this.is(":checked") && !$this.is(":disabled")) {
    93           // Enable height controls and show link checkbox
    94           $heightSelect.prop("disabled", false);
    95           $customHeight.prop("disabled", false);
    96           $showLinkCheckbox.prop("disabled", false);
    97         } else {
    98           // Disable height controls and show link checkbox
    99           $heightSelect.prop("disabled", true);
    100           $customHeight.prop("disabled", true);
    101           $showLinkCheckbox.prop("disabled", true);
    102         }
    103       }
    104     );
     93            if ( $this.val() === 'min_terms' ) {
     94                $minTermsField.show();
     95            } else {
     96                $minTermsField.hide();
     97            }
     98        } );
    10599
    106     // Function to update the no-items message visibility
    107     function updateNoItemsVisibility() {
    108       var systemVisible = $("#show-system-taxonomies").is(":checked");
     100        // Taxonomy checkbox change handler
     101        $( "input[name='runthings_ttc_selected_taxonomies[]']" ).on(
     102            'change',
     103            function () {
     104                const $this = $( this );
     105                const $row = $this.closest( 'tr' );
     106                const $heightSelect = $row.find( '.height-type-select' );
     107                const $customHeight = $row.find( '.custom-height-input input' );
     108                const $showLinkCheckbox = $row.find(
     109                    "input[name='runthings_ttc_show_links[]']"
     110                );
     111                const $allowCreateCheckbox = $row.find(
     112                    "input[name='runthings_ttc_allow_term_create[]']"
     113                );
     114                const $searchModeSelect = $row.find( '.search-mode-select' );
     115                const $searchThreshold = $row.find( '.min-terms-input input' );
    109116
    110       var visibleRows = $("#taxonomy-table tbody tr:visible").not(
    111         ".no-items"
    112       ).length;
     117                if ( $this.is( ':checked' ) && ! $this.is( ':disabled' ) ) {
     118                    // Enable height controls and show link checkbox
     119                    $heightSelect.prop( 'disabled', false );
     120                    $customHeight.prop( 'disabled', false );
     121                    $showLinkCheckbox.prop( 'disabled', false );
     122                    $allowCreateCheckbox.prop( 'disabled', false );
     123                    $searchModeSelect.prop( 'disabled', false );
     124                    $searchThreshold.prop( 'disabled', false );
     125                } else {
     126                    // Disable height controls and show link checkbox
     127                    $heightSelect.prop( 'disabled', true );
     128                    $customHeight.prop( 'disabled', true );
     129                    $showLinkCheckbox.prop( 'disabled', true );
     130                    $allowCreateCheckbox.prop( 'disabled', true );
     131                    $searchModeSelect.prop( 'disabled', true );
     132                    $searchThreshold.prop( 'disabled', true );
     133                }
     134            }
     135        );
    113136
    114       if (visibleRows === 0) {
    115         // Show the no items message
    116         $(".no-items").show();
     137        // Function to update the no-items message visibility
     138        function updateNoItemsVisibility() {
     139            const systemVisible = $( '#show-system-taxonomies' ).is(
     140                ':checked'
     141            );
    117142
    118         // If there are system taxonomies but they're hidden, show the hint
    119         if (!systemVisible && taxonomyStats.systemCount > 0) {
    120           $(".hidden-system-message").show();
    121         } else {
    122           $(".hidden-system-message").hide();
    123         }
    124       } else {
    125         // Hide the no items message when there are visible rows
    126         $(".no-items").hide();
    127       }
    128     }
     143            const visibleRows = $( '#taxonomy-table tbody tr:visible' ).not(
     144                '.no-items'
     145            ).length;
    129146
    130     // Initialize height fields on load
    131     $(".height-type-select").each(function () {
    132       $(this).trigger("change");
    133     });
     147            if ( visibleRows === 0 ) {
     148                // Show the no items message
     149                $( '.no-items' ).show();
    134150
    135     // Initialize enabled/disabled state on load
    136     $("input[name='runthings_ttc_selected_taxonomies[]']").each(function () {
    137       $(this).trigger("change");
    138     });
     151                // If there are system taxonomies but they're hidden, show the hint
     152                if ( ! systemVisible && taxonomyStats.systemCount > 0 ) {
     153                    $( '.hidden-system-message' ).show();
     154                } else {
     155                    $( '.hidden-system-message' ).hide();
     156                }
     157            } else {
     158                // Hide the no items message when there are visible rows
     159                $( '.no-items' ).hide();
     160            }
     161        }
    139162
    140     // Initial setup - hide system taxonomies
    141     $("#show-system-taxonomies").prop("checked", false).trigger("change");
     163        // Initialize height fields on load
     164        $( '.height-type-select' ).each( function () {
     165            $( this ).trigger( 'change' );
     166        } );
     167        $( '.search-mode-select' ).each( function () {
     168            $( this ).trigger( 'change' );
     169        } );
    142170
    143     // Initial update of no-items visibility
    144     updateNoItemsVisibility();
    145   });
    146 })(jQuery);
     171        // Initialize enabled/disabled state on load
     172        $( "input[name='runthings_ttc_selected_taxonomies[]']" ).each(
     173            function () {
     174                $( this ).trigger( 'change' );
     175            }
     176        );
     177
     178        // Initial setup - hide system taxonomies
     179        $( '#show-system-taxonomies' )
     180            .prop( 'checked', false )
     181            .trigger( 'change' );
     182
     183        // Initial update of no-items visibility
     184        updateNoItemsVisibility();
     185    } );
     186} )( window.jQuery );
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/assets/js/editor.js

    r3455906 r3467136  
    1 ( function() {
    2     var taxonomies = window.runthingsTtcEditor && window.runthingsTtcEditor.taxonomies;
    3     if ( ! taxonomies || ! taxonomies.length ) {
    4         return;
    5     }
     1( function () {
     2    const taxonomies =
     3        window.runthingsTtcEditor && window.runthingsTtcEditor.taxonomies;
     4    if ( ! taxonomies || ! taxonomies.length ) {
     5        return;
     6    }
    67
    7     wp.domReady( function() {
    8         taxonomies.forEach( function( taxonomy ) {
    9             wp.data.dispatch( 'core/editor' ).removeEditorPanel( 'taxonomy-panel-' + taxonomy );
    10         } );
    11     } );
     8    wp.domReady( function () {
     9        taxonomies.forEach( function ( taxonomy ) {
     10            wp.data
     11                .dispatch( 'core/editor' )
     12                .removeEditorPanel( 'taxonomy-panel-' + taxonomy );
     13        } );
     14    } );
    1215} )();
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/languages/runthings-taxonomy-tags-to-checkboxes.pot

    r3464228 r3467136  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Taxonomy Tags to Checkboxes 1.3.0\n"
     5"Project-Id-Version: Taxonomy Tags to Checkboxes 1.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/runthings-taxonomy-tags-to-checkboxes\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-02-18T10:47:17+00:00\n"
     12"POT-Creation-Date: 2026-02-22T21:54:20+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    4949msgstr ""
    5050
    51 #: lib/admin-options.php:80
     51#: lib/admin-options.php:92
    5252msgid "Taxonomy Settings"
    5353msgstr ""
    5454
    55 #: lib/admin-options.php:87
     55#: lib/admin-options.php:99
    5656msgid "Select Taxonomies"
    5757msgstr ""
    5858
    59 #: lib/admin-options.php:212
     59#: lib/admin-options.php:287
    6060msgid "Select which taxonomies should use checkboxes instead of tags UI."
    6161msgstr ""
    6262
    63 #: lib/admin-options.php:217
     63#: lib/admin-options.php:292
    6464msgid "Show system taxonomies"
    6565msgstr ""
    6666
    67 #: lib/admin-options.php:227
    68 #: lib/admin-options.php:380
     67#: lib/admin-options.php:302
     68#: lib/admin-options.php:490
    6969msgid "Select All"
    7070msgstr ""
    7171
    72 #: lib/admin-options.php:231
    73 #: lib/admin-options.php:384
     72#: lib/admin-options.php:306
     73#: lib/admin-options.php:494
    7474msgid "Name"
    7575msgstr ""
    7676
    77 #: lib/admin-options.php:240
    78 #: lib/admin-options.php:393
     77#: lib/admin-options.php:315
     78#: lib/admin-options.php:503
    7979msgid "Post Types"
    8080msgstr ""
    8181
    82 #: lib/admin-options.php:249
    83 #: lib/admin-options.php:402
     82#: lib/admin-options.php:324
     83#: lib/admin-options.php:512
    8484msgid "Type"
    8585msgstr ""
    8686
    87 #: lib/admin-options.php:257
    88 #: lib/admin-options.php:360
    89 #: lib/admin-options.php:410
     87#: lib/admin-options.php:332
     88#: lib/admin-options.php:455
     89#: lib/admin-options.php:520
    9090msgid "Height"
    9191msgstr ""
    9292
    93 #: lib/admin-options.php:260
     93#: lib/admin-options.php:335
     94#: lib/admin-options.php:466
     95#: lib/admin-options.php:523
     96msgid "Allow Inline Add"
     97msgstr ""
     98
     99#: lib/admin-options.php:338
     100#: lib/admin-options.php:469
     101#: lib/admin-options.php:526
     102msgid "Show Edit Link"
     103msgstr ""
     104
     105#: lib/admin-options.php:341
     106#: lib/admin-options.php:472
     107#: lib/admin-options.php:529
     108msgid "Search Box"
     109msgstr ""
     110
     111#: lib/admin-options.php:352
     112msgid "No taxonomies found."
     113msgstr ""
     114
     115#: lib/admin-options.php:354
     116msgid "System taxonomies are currently hidden. Enable \"Show system taxonomies\" to see more options."
     117msgstr ""
     118
    94119#: lib/admin-options.php:371
    95 #: lib/admin-options.php:413
    96 msgid "Show Edit Link"
    97 msgstr ""
    98 
    99 #: lib/admin-options.php:271
    100 msgid "No taxonomies found."
    101 msgstr ""
    102 
    103 #: lib/admin-options.php:273
    104 msgid "System taxonomies are currently hidden. Enable \"Show system taxonomies\" to see more options."
    105 msgstr ""
    106 
    107 #: lib/admin-options.php:290
    108 #: lib/admin-options.php:298
     120#: lib/admin-options.php:379
    109121msgid "Taxonomy already uses checkboxes"
    110122msgstr ""
    111123
    112 #: lib/admin-options.php:291
     124#: lib/admin-options.php:372
    113125msgid "Hierarchical"
    114126msgstr ""
    115127
    116 #: lib/admin-options.php:293
     128#: lib/admin-options.php:374
    117129msgid "Uses tags interface by default"
    118130msgstr ""
    119131
    120 #: lib/admin-options.php:294
     132#: lib/admin-options.php:375
    121133msgid "Non-hierarchical"
    122134msgstr ""
    123135
    124 #: lib/admin-options.php:349
     136#: lib/admin-options.php:444
    125137msgid "Convert"
    126138msgstr ""
    127139
    128 #: lib/admin-options.php:362
     140#: lib/admin-options.php:457
    129141msgid "Default"
    130142msgstr ""
    131143
    132 #: lib/admin-options.php:363
     144#: lib/admin-options.php:458
    133145msgid "Full"
    134146msgstr ""
    135147
    136 #: lib/admin-options.php:364
     148#: lib/admin-options.php:459
    137149msgid "Custom"
    138150msgstr ""
    139151
    140 #: lib/admin-options.php:478
     152#: lib/admin-options.php:474
     153msgid "Off"
     154msgstr ""
     155
     156#: lib/admin-options.php:475
     157msgid "Always"
     158msgstr ""
     159
     160#: lib/admin-options.php:476
     161msgid "Min Terms"
     162msgstr ""
     163
     164#: lib/admin-options.php:479
     165msgid "Minimum terms"
     166msgstr ""
     167
     168#: lib/admin-options.php:481
     169msgid "Terms"
     170msgstr ""
     171
     172#: lib/admin-options.php:594
    141173msgid "Settings"
    142174msgstr ""
    143175
    144 #: lib/replace-tags.php:233
    145 #: src/components/TtcTaxonomyPanel.js:102
     176#: lib/classic-integration.php:100
     177#: src/components/TtcTaxonomyPanel.js:224
     178msgid "Search terms"
     179msgstr ""
     180
     181#: lib/classic-integration.php:101
     182msgid "Search terms..."
     183msgstr ""
     184
     185#: lib/classic-integration.php:102
     186#: src/components/TtcTaxonomyPanel.js:251
     187msgid "No matching terms."
     188msgstr ""
     189
     190#. translators: %s: Add new taxonomy item label.
     191#: lib/classic-integration.php:227
     192#, php-format
     193msgid "+ %s"
     194msgstr ""
     195
     196#. translators: %s: taxonomy label
     197#: lib/config.php:110
     198#, php-format
     199msgid "Edit %s"
     200msgstr ""
     201
     202#: lib/config.php:113
     203msgid "Edit"
     204msgstr ""
     205
     206#. translators: %s: taxonomy label
     207#: lib/config.php:119
     208#, php-format
     209msgid "Add / Edit %s"
     210msgstr ""
     211
     212#: lib/config.php:122
     213#: src/components/TtcTaxonomyPanel.js:317
     214msgid "Add / Edit"
     215msgstr ""
     216
     217#: runthings-taxonomy-tags-to-checkboxes.php:73
     218msgid "GitHub"
     219msgstr ""
     220
     221#: src/components/TtcTaxonomyPanel.js:170
     222msgid "Could not add the term."
     223msgstr ""
     224
     225#: src/components/TtcTaxonomyPanel.js:212
    146226msgid "No terms available."
    147227msgstr ""
    148228
    149 #. translators: %s: Taxonomy label
    150 #. translators: %s: taxonomy label
    151 #: lib/replace-tags.php:297
    152 #: src/components/TtcTaxonomyPanel.js:135
    153 #, php-format,js-format
    154 msgid "+ Add / Edit %s"
    155 msgstr ""
    156 
    157 #: runthings-taxonomy-tags-to-checkboxes.php:70
    158 msgid "GitHub"
    159 msgstr ""
    160 
    161 #: src/components/TtcTaxonomyPanel.js:141
    162 msgid "+ Add / Edit"
    163 msgstr ""
     229#. translators: 1: visible terms count, 2: total terms count
     230#: src/components/TtcTaxonomyPanel.js:237
     231#, js-format
     232msgid "Showing %1$d of %2$d terms"
     233msgstr ""
     234
     235#: src/components/TtcTaxonomyPanel.js:284
     236msgid "Add new term"
     237msgstr ""
     238
     239#: src/components/TtcTaxonomyPanel.js:305
     240msgid "Add"
     241msgstr ""
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/lib/admin-options.php

    r3461388 r3467136  
    7676        );
    7777
     78        register_setting(
     79            'runthings_taxonomy_options_group',
     80            'runthings_ttc_allow_term_create',
     81            ['sanitize_callback' => [$this, 'sanitize_allow_term_create_settings']]
     82        );
     83
     84        register_setting(
     85            'runthings_taxonomy_options_group',
     86            'runthings_ttc_search_settings',
     87            ['sanitize_callback' => [$this, 'sanitize_search_settings']]
     88        );
     89
    7890        add_settings_section(
    7991            'runthings_taxonomy_section',
     
    151163
    152164    /**
     165     * Sanitize allow inline term create settings
     166     *
     167     * @param array $input The input array.
     168     * @return array The sanitized array.
     169     */
     170    public function sanitize_allow_term_create_settings($input) {
     171        if (!is_array($input)) {
     172            return [];
     173        }
     174        return array_map('sanitize_text_field', $input);
     175    }
     176
     177    /**
     178     * Sanitize search settings.
     179     *
     180     * @param array $input The input array.
     181     * @return array
     182     */
     183    public function sanitize_search_settings($input) {
     184        if (!is_array($input)) {
     185            return [];
     186        }
     187
     188        $sanitized = [];
     189        $allowed_modes = [ 'off', 'always', 'min_terms' ];
     190
     191        foreach ($input as $taxonomy => $settings) {
     192            $taxonomy = sanitize_key((string) $taxonomy);
     193            if ('' === $taxonomy || !is_array($settings)) {
     194                continue;
     195            }
     196
     197            $mode = isset($settings['mode']) ? sanitize_key((string) $settings['mode']) : 'off';
     198            if (!in_array($mode, $allowed_modes, true)) {
     199                $mode = 'off';
     200            }
     201
     202            $threshold = isset($settings['threshold']) ? absint($settings['threshold']) : 20;
     203            if ($threshold < 1) {
     204                $threshold = 20;
     205            }
     206            $threshold = min(1000, $threshold);
     207
     208            $sanitized[$taxonomy] = [
     209                'mode' => $mode,
     210                'threshold' => $threshold,
     211            ];
     212        }
     213
     214        return $sanitized;
     215    }
     216
     217    /**
    153218     * Enqueue admin scripts
    154219     *
     
    192257        $height_settings = get_option('runthings_ttc_height_settings', []);
    193258        $show_links = get_option('runthings_ttc_show_links', []);
     259        $allow_term_create = get_option('runthings_ttc_allow_term_create', []);
     260        $search_settings = get_option('runthings_ttc_search_settings', []);
    194261       
    195262        if (!is_array($selected_taxonomies)) {
     
    203270        if (!is_array($show_links)) {
    204271            $show_links = [];
     272        }
     273
     274        if (!is_array($allow_term_create)) {
     275            $allow_term_create = [];
     276        }
     277
     278        if (!is_array($search_settings)) {
     279            $search_settings = [];
    205280        }
    206281       
     
    257332                        <span><?php esc_html_e('Height', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    258333                    </th>
     334                    <th scope="col" class="manage-column column-allow-create">
     335                        <span><?php esc_html_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     336                    </th>
    259337                    <th scope="col" class="manage-column column-show-link">
    260338                        <span><?php esc_html_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     339                    </th>
     340                    <th scope="col" class="manage-column column-search">
     341                        <span><?php esc_html_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    261342                    </th>
    262343                </tr>
     
    267348                ?>
    268349                <tr class="no-items" style="display: none;">
    269                     <td class="colspanchange" colspan="6">
     350                    <td class="colspanchange" colspan="8">
    270351                        <div class="no-taxonomy-items">
    271352                            <p><?php esc_html_e( 'No taxonomies found.', 'runthings-taxonomy-tags-to-checkboxes' ); ?></p>
     
    341422                    // Disable show link checkbox for hierarchical or unselected taxonomies
    342423                    $link_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
     424
     425                    $allow_create_checked = in_array($taxonomy->name, $allow_term_create, true) ? 'checked' : '';
     426                    $allow_create_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
     427
     428                    $search_mode = isset($search_settings[$taxonomy->name]['mode']) ? sanitize_key((string) $search_settings[$taxonomy->name]['mode']) : 'off';
     429                    if (!in_array($search_mode, ['off', 'always', 'min_terms'], true)) {
     430                        $search_mode = 'off';
     431                    }
     432                    $search_threshold = isset($search_settings[$taxonomy->name]['threshold']) ? intval($search_settings[$taxonomy->name]['threshold']) : 20;
     433                    if ($search_threshold < 1) {
     434                        $search_threshold = 20;
     435                    }
     436                    $search_threshold = min(1000, $search_threshold);
     437                    $search_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
    343438                ?>
    344439                <tr data-name="<?php echo esc_attr( strtolower($taxonomy->label) ); ?>"
     
    369464                        </div>
    370465                    </td>
     466                    <td class="column-allow-create" data-colname="<?php esc_attr_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
     467                        <input type="checkbox" name="runthings_ttc_allow_term_create[]" value="<?php echo esc_attr($taxonomy->name); ?>" <?php echo esc_attr($allow_create_checked); ?> <?php echo esc_attr($allow_create_disabled); ?>>
     468                    </td>
    371469                    <td class="column-show-link" data-colname="<?php esc_attr_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
    372470                        <input type="checkbox" name="runthings_ttc_show_links[]" value="<?php echo esc_attr($taxonomy->name); ?>" <?php echo esc_attr($show_link_checked); ?> <?php echo esc_attr($link_disabled); ?>>
     471                    </td>
     472                    <td class="column-search" data-colname="<?php esc_attr_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
     473                        <select name="runthings_ttc_search_settings[<?php echo esc_attr($taxonomy->name); ?>][mode]" class="search-mode-select" <?php echo esc_attr($search_disabled); ?>>
     474                            <option value="off" <?php selected($search_mode, 'off'); ?>><?php esc_html_e('Off', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     475                            <option value="always" <?php selected($search_mode, 'always'); ?>><?php esc_html_e('Always', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     476                            <option value="min_terms" <?php selected($search_mode, 'min_terms'); ?>><?php esc_html_e('Min Terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     477                        </select>
     478                        <div class="min-terms-input" style="margin-top: 5px; <?php echo esc_attr($search_mode !== 'min_terms' ? 'display: none;' : ''); ?>">
     479                            <label class="screen-reader-text" for="runthings-ttc-min-terms-<?php echo esc_attr($taxonomy->name); ?>"><?php esc_html_e('Minimum terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></label>
     480                            <input id="runthings-ttc-min-terms-<?php echo esc_attr($taxonomy->name); ?>" type="number" name="runthings_ttc_search_settings[<?php echo esc_attr($taxonomy->name); ?>][threshold]" value="<?php echo esc_attr($search_threshold); ?>" min="1" max="1000" step="1" <?php echo esc_attr($search_disabled); ?>>
     481                            <span><?php esc_html_e('Terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     482                        </div>
    373483                    </td>
    374484                </tr>
     
    410520                        <span><?php esc_html_e('Height', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    411521                    </th>
     522                    <th scope="col" class="manage-column column-allow-create">
     523                        <span><?php esc_html_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     524                    </th>
    412525                    <th scope="col" class="manage-column column-show-link">
    413526                        <span><?php esc_html_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     527                    </th>
     528                    <th scope="col" class="manage-column column-search">
     529                        <span><?php esc_html_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    414530                    </th>
    415531                </tr>
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/readme.md

    r3464228 r3467136  
    99It allows you to pick from a list of the existing tags, so that admin users do not need to remember each tag.
    1010
    11 It doesn't allow new tags to be created on the fly, which keeps the tags list under control, although you can optionally enable an add / edit link.
     11By default it does not allow new tags to be created on the fly, which keeps the tags list under control. You can optionally enable inline add per taxonomy, and an add / edit link.
    1212
    13 # Features
     13### Features
    1414
    1515- Replace the tags ui with a checkbox list
    1616- No alteration to front end functionality, or the underlying data / terms
    17 - Option to control the height of the taxonomy metabox, between auto, full height, and custom (px)
    18 - Show a link to the taxonomy edit screen via an `+ Add / Edit {taxononomy}` link
     17- Option to control the height of the taxonomy metabox, between default (200px max), full, and custom (px)
     18- Optional inline add control for new terms, enabled per taxonomy
     19- Optional link to the taxonomy edit screen via an `+ Add / Edit {taxonomy}` style link
     20- Optional per-taxonomy search box with `Off`, `Always`, and `Min Terms` modes
    1921- Customization via filters
    2022
     
    4143### What user capabilities are required?
    4244
    43 The configuration screen needs a user with `manage_settings` cap to edit it, but the changes are applied to anyone with editor access to post types that displays those taxonomies.
     45The configuration screen needs a user with `manage_options` cap to edit it, but the changes are applied to anyone with editor access to post types that display those taxonomies.
    4446
    4547### I have a feature idea / I've found a bug
     
    5658
    5759## Changelog
     60
     61### v1.4.0 - 22nd February 2026
     62
     63- Feature - Add optional inline term creation controls in both Classic and Gutenberg editors
     64- Feature - Add optional taxonomy search panel with `Off`, `Always`, and `Min Terms` display modes
     65- Improvement - Add `runthings_ttc_search_settings` filter for per-taxonomy search behavior overrides
    5866
    5967### v1.3.0 - 18th February 2026
     
    8694- Initial release
    8795- Works with custom and built-in taxonomies
    88 - Control the height of the outbox
     96- Control the height of the metabox
    8997- Optionally include an add/edit link
    9098- Filter `runthings_ttc_selected_taxonomies` to short-circuit the override
     
    101109add_filter( 'runthings_ttc_selected_taxonomies', function( $selected_taxonomies ) {
    102110    // Disable the override for the 'category' taxonomy.
    103     unset( $selected_taxonomies['category'] );
    104     return $selected_taxonomies;
     111    return array_values( array_diff( $selected_taxonomies, [ 'category' ] ) );
    105112} );
    106113```
     
    108115#### Parameters:
    109116
    110 - **`$selected_taxonomies`** (array): An array of taxonomy slugs. Unset an entry to disable the checkbox list override.
     117- **`$selected_taxonomies`** (array): An array of taxonomy slugs. Remove a slug value from the array to disable the checkbox list override.
     118
     119### runthings_ttc_search_settings
     120
     121This filter allows developers to override per-taxonomy search UI behavior.
     122
     123#### Usage Example
     124
     125```php
     126add_filter( 'runthings_ttc_search_settings', function( $search_settings ) {
     127    $search_settings['post_tag'] = [
     128        'mode'      => 'always', // valid values: off, always, min_terms
     129        'threshold' => 20,       // used when mode is min_terms
     130    ];
     131
     132    return $search_settings;
     133} );
     134```
     135
     136#### Parameters:
     137
     138- **`$search_settings`** (array): A map of taxonomy slugs to search config arrays (`mode`, `threshold`).
    111139
    112140## Additional Notes
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/readme.txt

    r3464228 r3467136  
    44Requires at least: 6.4
    55Tested up to: 6.9
    6 Stable tag: 1.3.0
     6Stable tag: 1.4.0
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1515It allows you to pick from a list of the existing tags, so that admin users do not need to remember each tag.
    1616
    17 It doesn't allow new tags to be created on the fly, which keeps the tags list under control, although you can optionally enable an add / edit link.
     17It can optionally allow new terms to be added directly from the post editing UI, while still letting you keep this disabled by default.
    1818
    1919= Features =
    2020* Replace the tags ui with a checkbox list
    2121* No alteration to front end functionality, or the underlying data / terms
    22 * Option to control the height of the taxonomy metabox, between auto, full height, and custom (px)
    23 * Show a link to the taxonomy edit screen via an "+ Add / Edit {taxononomy}" link
     22* Option to control the height of the taxonomy metabox, between default (200px max), full, and custom (px)
     23* Optional inline add control for new terms, enabled per taxonomy
     24* Optional link to the taxonomy edit screen via an "+ Add / Edit {taxonomy}" style link
     25* Optional per-taxonomy search box with Off, Always, and Min Terms modes
    2426* Customization via filters
    2527
     
    4042
    4143= What user capabilities are required? =
    42 The configuration screen needs a user with `manage_settings` cap to edit it, but the changes are applied to anyone with editor access to post types that displays those taxonomies.
     44The configuration screen needs a user with `manage_options` cap to edit it, but the changes are applied to anyone with editor access to post types that display those taxonomies.
    4345
    4446= I have a feature idea / I've found a bug =
     
    5153
    5254== Changelog ==
     55
     56= 1.4.0 - 22nd February 2026 =
     57* Feature - Add optional inline term creation controls in both Classic and Gutenberg editors
     58* Feature - Add optional taxonomy search panel with `Off`, `Always`, and `Min Terms` display modes
     59* Improvement - Add `runthings_ttc_search_settings` filter for per-taxonomy search behavior overrides
    5360
    5461= 1.3.0 - 18th February 2026 =
     
    7582* Initial release
    7683* Works with custom and built-in taxonomies
    77 * Control the height of the outbox
     84* Control the height of the metabox
    7885* Optionally include an add/edit link
    7986* Filter `runthings_ttc_selected_taxonomies` to short-circuit the override
    8087
    8188== Filters ==
    82 ### runthings_ttc_selected_taxonomies
     89For detailed documentation and examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-taxonomy-tags-to-checkboxes#filters).
     90
     91#### runthings_ttc_selected_taxonomies
    8392
    8493This filter allows developers to modify the array of taxonomies selected for the custom checkbox interface.
    8594
    86 For detailed documentation and examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-taxonomy-tags-to-checkboxes#filters).
     95##### Parameters:
     961. **`$selected_taxonomies`** (`array`): An array of taxonomy slugs. Remove a slug value from the array to disable the checkbox list override.
    8797
    88 #### Parameters:
    89 1. **`$selected_taxonomies`** (`array`): An array of taxonomy slugs. Unset an entry to disable the checkbox list override.
     98#### runthings_ttc_search_settings
     99
     100This filter allows developers to override per-taxonomy search UI behavior.
     101
     102##### Parameters:
     1031. **`$search_settings`** (`array`): A map of taxonomy slugs to search config arrays (`mode`, `threshold`).
    90104
    91105== Upgrade Notice ==
     106
     107= 1.4.0 =
     108Adds optional inline term creation and taxonomy search panel controls.
    92109
    93110= 1.3.0 =
     
    96113= 1.2.0 =
    97114Fixes fatal error when a configured taxonomy is deleted, improves panel height options.
    98 
    99 = 1.1.1 =
    100 Fix duplicate taxonomy panels in the block editor for built-in taxonomies.
    101115
    102116== License ==
  • runthings-taxonomy-tags-to-checkboxes/tags/1.4.0/runthings-taxonomy-tags-to-checkboxes.php

    r3464228 r3467136  
    55 * Plugin URI: https://runthings.dev/wordpress-plugins/taxonomy-tags-to-checkboxes/
    66 * Description: Convert taxonomy tags to checkboxes in the WordPress admin.
    7  * Version: 1.3.0
     7 * Version: 1.4.0
    88 * Author: runthingsdev
    99 * Author URI: https://runthings.dev/
     
    3838}
    3939
    40 define( 'RUNTHINGS_TTC_VERSION', '1.3.0' );
     40define( 'RUNTHINGS_TTC_VERSION', '1.4.0' );
    4141
    4242define( 'RUNTHINGS_TTC_BASENAME', plugin_basename( __FILE__ ) );
     
    4545
    4646require_once RUNTHINGS_TTC_DIR . 'lib/admin-options.php';
    47 require_once RUNTHINGS_TTC_DIR . 'lib/replace-tags.php';
     47require_once RUNTHINGS_TTC_DIR . 'lib/config.php';
     48require_once RUNTHINGS_TTC_DIR . 'lib/classic-integration.php';
     49require_once RUNTHINGS_TTC_DIR . 'lib/block-integration.php';
     50require_once RUNTHINGS_TTC_DIR . 'lib/bootstrap.php';
    4851
    4952class Taxonomy_Tags_To_Checkboxes {
    5053    public function __construct() {
    5154        new Admin_Options();
    52         new Replace_Tags();
     55        new Bootstrap();
    5356
    5457        add_filter(
     
    8689    add_option( 'runthings_ttc_height_settings', [], '', $autoload );
    8790    add_option( 'runthings_ttc_show_links', [], '', $autoload);
     91    add_option( 'runthings_ttc_allow_term_create', [], '', $autoload );
     92    add_option( 'runthings_ttc_search_settings', [], '', $autoload );
    8893}
    8994register_activation_hook( __FILE__, 'RunthingsTaxonomyTagsToCheckboxes\activate_runthings_ttc' );
     
    97102    delete_option( 'runthings_ttc_height_settings' );
    98103    delete_option( 'runthings_ttc_show_links' );
     104    delete_option( 'runthings_ttc_allow_term_create' );
     105    delete_option( 'runthings_ttc_search_settings' );
    99106}
    100107register_uninstall_hook( __FILE__, 'RunthingsTaxonomyTagsToCheckboxes\uninstall_runthings_ttc' );
  • runthings-taxonomy-tags-to-checkboxes/trunk/assets/css/admin.css

    r3461388 r3467136  
    5757}
    5858#taxonomy-table th.column-height,
    59 #taxonomy-table th.column-show-link {
     59#taxonomy-table th.column-show-link,
     60#taxonomy-table th.column-allow-create,
     61#taxonomy-table th.column-search {
    6062  padding: 8px;
    6163}
     
    6870  width: 70px;
    6971}
     72.min-terms-input {
     73  display: flex;
     74  align-items: center;
     75  gap: 5px;
     76}
     77.min-terms-input input[type="number"] {
     78  width: 70px;
     79}
    7080
    7181/* Show Link Column */
     
    7383  width: 100px;
    7484  text-align: center;
     85}
     86
     87#taxonomy-table .column-allow-create {
     88  width: 100px;
     89  text-align: center;
     90}
     91#taxonomy-table .column-search {
     92  width: 180px;
    7593}
    7694
     
    159177
    160178  /* Show link inline */
    161   #taxonomy-table .column-show-link {
     179  #taxonomy-table .column-show-link,
     180  #taxonomy-table .column-allow-create,
     181  #taxonomy-table .column-search {
    162182    display: flex;
    163183    align-items: center;
  • runthings-taxonomy-tags-to-checkboxes/trunk/assets/js/admin.js

    r3271144 r3467136  
    1 (function ($) {
    2   "use strict";
     1( function ( $ ) {
     2    'use strict';
     3    const taxonomyStats = window.taxonomyStats || { systemCount: 0 };
    34
    4   $(document).ready(function () {
    5     // Table sorting functionality
    6     $(".sort-column").on("click", function (e) {
    7       e.preventDefault();
     5    $( document ).ready( function () {
     6        // Table sorting functionality
     7        $( '.sort-column' ).on( 'click', function ( e ) {
     8            e.preventDefault();
    89
    9       var $this = $(this);
    10       var column = $this.data("column");
    11       var $table = $("#taxonomy-table");
    12       var $rows = $table.find("tbody tr").toArray();
    13       var ascending = $this.closest("th").hasClass("desc");
     10            const $this = $( this );
     11            const column = $this.data( 'column' );
     12            const $table = $( '#taxonomy-table' );
     13            const $rows = $table.find( 'tbody tr' ).toArray();
     14            const ascending = $this.closest( 'th' ).hasClass( 'desc' );
    1415
    15       // Update sortable classes
    16       $table.find("thead th, tfoot th").removeClass("sorted asc desc");
     16            // Update sortable classes
     17            $table
     18                .find( 'thead th, tfoot th' )
     19                .removeClass( 'sorted asc desc' );
    1720
    18       // Update the current column's sorting state
    19       var $currentHeader = $this.closest("th");
    20       $currentHeader.addClass("sorted");
     21            // Update the current column's sorting state
     22            const $currentHeader = $this.closest( 'th' );
     23            $currentHeader.addClass( 'sorted' );
    2124
    22       if (ascending) {
    23         $currentHeader.removeClass("desc").addClass("asc");
    24       } else {
    25         $currentHeader.removeClass("asc").addClass("desc");
    26       }
     25            if ( ascending ) {
     26                $currentHeader.removeClass( 'desc' ).addClass( 'asc' );
     27            } else {
     28                $currentHeader.removeClass( 'asc' ).addClass( 'desc' );
     29            }
    2730
    28       // Sort the rows
    29       $rows.sort(function (a, b) {
    30         var valA, valB;
     31            // Sort the rows
     32            $rows.sort( function ( a, b ) {
     33                let valA, valB;
    3134
    32         if (column === "name") {
    33           valA = $(a).data("name");
    34           valB = $(b).data("name");
    35         } else if (column === "post_types") {
    36           valA = $(a).data("post-types");
    37           valB = $(b).data("post-types");
    38         } else if (column === "type") {
    39           valA = $(a).data("type");
    40           valB = $(b).data("type");
    41         }
     35                if ( column === 'name' ) {
     36                    valA = $( a ).data( 'name' );
     37                    valB = $( b ).data( 'name' );
     38                } else if ( column === 'post_types' ) {
     39                    valA = $( a ).data( 'post-types' );
     40                    valB = $( b ).data( 'post-types' );
     41                } else if ( column === 'type' ) {
     42                    valA = $( a ).data( 'type' );
     43                    valB = $( b ).data( 'type' );
     44                }
    4245
    43         if (valA < valB) return ascending ? -1 : 1;
    44         if (valA > valB) return ascending ? 1 : -1;
    45         return 0;
    46       });
     46                if ( valA < valB ) {
     47                    return ascending ? -1 : 1;
     48                }
     49                if ( valA > valB ) {
     50                    return ascending ? 1 : -1;
     51                }
     52                return 0;
     53            } );
    4754
    48       // Append sorted rows to table
    49       $.each($rows, function (index, row) {
    50         $table.find("tbody").append(row);
    51       });
     55            // Append sorted rows to table
     56            $.each( $rows, function ( index, row ) {
     57                $table.find( 'tbody' ).append( row );
     58            } );
    5259
    53       return false;
    54     });
     60            return false;
     61        } );
    5562
    56     // System taxonomy toggle
    57     $("#show-system-taxonomies").on("change", function () {
    58       if ($(this).is(":checked")) {
    59         $(".system-taxonomy").show();
    60       } else {
    61         $(".system-taxonomy").hide();
    62       }
     63        // System taxonomy toggle
     64        $( '#show-system-taxonomies' ).on( 'change', function () {
     65            if ( $( this ).is( ':checked' ) ) {
     66                $( '.system-taxonomy' ).show();
     67            } else {
     68                $( '.system-taxonomy' ).hide();
     69            }
    6370
    64       updateNoItemsVisibility();
    65     });
     71            updateNoItemsVisibility();
     72        } );
    6673
    67     // Height type selection change handler
    68     $(".height-type-select").on("change", function () {
    69       var $this = $(this);
    70       var $row = $this.closest("tr");
    71       var $customField = $row.find(".custom-height-input");
     74        // Height type selection change handler
     75        $( '.height-type-select' ).on( 'change', function () {
     76            const $this = $( this );
     77            const $row = $this.closest( 'tr' );
     78            const $customField = $row.find( '.custom-height-input' );
    7279
    73       if ($this.val() === "custom") {
    74         $customField.show();
    75       } else {
    76         $customField.hide();
    77       }
    78     });
     80            if ( $this.val() === 'custom' ) {
     81                $customField.show();
     82            } else {
     83                $customField.hide();
     84            }
     85        } );
    7986
    80     // Taxonomy checkbox change handler
    81     $("input[name='runthings_ttc_selected_taxonomies[]']").on(
    82       "change",
    83       function () {
    84         var $this = $(this);
    85         var $row = $this.closest("tr");
    86         var $heightSelect = $row.find(".height-type-select");
    87         var $customHeight = $row.find(".custom-height-input input");
    88         var $showLinkCheckbox = $row.find(
    89           "input[name='runthings_ttc_show_links[]']"
    90         );
     87        // Search mode selection change handler
     88        $( '.search-mode-select' ).on( 'change', function () {
     89            const $this = $( this );
     90            const $row = $this.closest( 'tr' );
     91            const $minTermsField = $row.find( '.min-terms-input' );
    9192
    92         if ($this.is(":checked") && !$this.is(":disabled")) {
    93           // Enable height controls and show link checkbox
    94           $heightSelect.prop("disabled", false);
    95           $customHeight.prop("disabled", false);
    96           $showLinkCheckbox.prop("disabled", false);
    97         } else {
    98           // Disable height controls and show link checkbox
    99           $heightSelect.prop("disabled", true);
    100           $customHeight.prop("disabled", true);
    101           $showLinkCheckbox.prop("disabled", true);
    102         }
    103       }
    104     );
     93            if ( $this.val() === 'min_terms' ) {
     94                $minTermsField.show();
     95            } else {
     96                $minTermsField.hide();
     97            }
     98        } );
    10599
    106     // Function to update the no-items message visibility
    107     function updateNoItemsVisibility() {
    108       var systemVisible = $("#show-system-taxonomies").is(":checked");
     100        // Taxonomy checkbox change handler
     101        $( "input[name='runthings_ttc_selected_taxonomies[]']" ).on(
     102            'change',
     103            function () {
     104                const $this = $( this );
     105                const $row = $this.closest( 'tr' );
     106                const $heightSelect = $row.find( '.height-type-select' );
     107                const $customHeight = $row.find( '.custom-height-input input' );
     108                const $showLinkCheckbox = $row.find(
     109                    "input[name='runthings_ttc_show_links[]']"
     110                );
     111                const $allowCreateCheckbox = $row.find(
     112                    "input[name='runthings_ttc_allow_term_create[]']"
     113                );
     114                const $searchModeSelect = $row.find( '.search-mode-select' );
     115                const $searchThreshold = $row.find( '.min-terms-input input' );
    109116
    110       var visibleRows = $("#taxonomy-table tbody tr:visible").not(
    111         ".no-items"
    112       ).length;
     117                if ( $this.is( ':checked' ) && ! $this.is( ':disabled' ) ) {
     118                    // Enable height controls and show link checkbox
     119                    $heightSelect.prop( 'disabled', false );
     120                    $customHeight.prop( 'disabled', false );
     121                    $showLinkCheckbox.prop( 'disabled', false );
     122                    $allowCreateCheckbox.prop( 'disabled', false );
     123                    $searchModeSelect.prop( 'disabled', false );
     124                    $searchThreshold.prop( 'disabled', false );
     125                } else {
     126                    // Disable height controls and show link checkbox
     127                    $heightSelect.prop( 'disabled', true );
     128                    $customHeight.prop( 'disabled', true );
     129                    $showLinkCheckbox.prop( 'disabled', true );
     130                    $allowCreateCheckbox.prop( 'disabled', true );
     131                    $searchModeSelect.prop( 'disabled', true );
     132                    $searchThreshold.prop( 'disabled', true );
     133                }
     134            }
     135        );
    113136
    114       if (visibleRows === 0) {
    115         // Show the no items message
    116         $(".no-items").show();
     137        // Function to update the no-items message visibility
     138        function updateNoItemsVisibility() {
     139            const systemVisible = $( '#show-system-taxonomies' ).is(
     140                ':checked'
     141            );
    117142
    118         // If there are system taxonomies but they're hidden, show the hint
    119         if (!systemVisible && taxonomyStats.systemCount > 0) {
    120           $(".hidden-system-message").show();
    121         } else {
    122           $(".hidden-system-message").hide();
    123         }
    124       } else {
    125         // Hide the no items message when there are visible rows
    126         $(".no-items").hide();
    127       }
    128     }
     143            const visibleRows = $( '#taxonomy-table tbody tr:visible' ).not(
     144                '.no-items'
     145            ).length;
    129146
    130     // Initialize height fields on load
    131     $(".height-type-select").each(function () {
    132       $(this).trigger("change");
    133     });
     147            if ( visibleRows === 0 ) {
     148                // Show the no items message
     149                $( '.no-items' ).show();
    134150
    135     // Initialize enabled/disabled state on load
    136     $("input[name='runthings_ttc_selected_taxonomies[]']").each(function () {
    137       $(this).trigger("change");
    138     });
     151                // If there are system taxonomies but they're hidden, show the hint
     152                if ( ! systemVisible && taxonomyStats.systemCount > 0 ) {
     153                    $( '.hidden-system-message' ).show();
     154                } else {
     155                    $( '.hidden-system-message' ).hide();
     156                }
     157            } else {
     158                // Hide the no items message when there are visible rows
     159                $( '.no-items' ).hide();
     160            }
     161        }
    139162
    140     // Initial setup - hide system taxonomies
    141     $("#show-system-taxonomies").prop("checked", false).trigger("change");
     163        // Initialize height fields on load
     164        $( '.height-type-select' ).each( function () {
     165            $( this ).trigger( 'change' );
     166        } );
     167        $( '.search-mode-select' ).each( function () {
     168            $( this ).trigger( 'change' );
     169        } );
    142170
    143     // Initial update of no-items visibility
    144     updateNoItemsVisibility();
    145   });
    146 })(jQuery);
     171        // Initialize enabled/disabled state on load
     172        $( "input[name='runthings_ttc_selected_taxonomies[]']" ).each(
     173            function () {
     174                $( this ).trigger( 'change' );
     175            }
     176        );
     177
     178        // Initial setup - hide system taxonomies
     179        $( '#show-system-taxonomies' )
     180            .prop( 'checked', false )
     181            .trigger( 'change' );
     182
     183        // Initial update of no-items visibility
     184        updateNoItemsVisibility();
     185    } );
     186} )( window.jQuery );
  • runthings-taxonomy-tags-to-checkboxes/trunk/assets/js/editor.js

    r3455906 r3467136  
    1 ( function() {
    2     var taxonomies = window.runthingsTtcEditor && window.runthingsTtcEditor.taxonomies;
    3     if ( ! taxonomies || ! taxonomies.length ) {
    4         return;
    5     }
     1( function () {
     2    const taxonomies =
     3        window.runthingsTtcEditor && window.runthingsTtcEditor.taxonomies;
     4    if ( ! taxonomies || ! taxonomies.length ) {
     5        return;
     6    }
    67
    7     wp.domReady( function() {
    8         taxonomies.forEach( function( taxonomy ) {
    9             wp.data.dispatch( 'core/editor' ).removeEditorPanel( 'taxonomy-panel-' + taxonomy );
    10         } );
    11     } );
     8    wp.domReady( function () {
     9        taxonomies.forEach( function ( taxonomy ) {
     10            wp.data
     11                .dispatch( 'core/editor' )
     12                .removeEditorPanel( 'taxonomy-panel-' + taxonomy );
     13        } );
     14    } );
    1215} )();
  • runthings-taxonomy-tags-to-checkboxes/trunk/languages/runthings-taxonomy-tags-to-checkboxes.pot

    r3464228 r3467136  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Taxonomy Tags to Checkboxes 1.3.0\n"
     5"Project-Id-Version: Taxonomy Tags to Checkboxes 1.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/runthings-taxonomy-tags-to-checkboxes\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-02-18T10:47:17+00:00\n"
     12"POT-Creation-Date: 2026-02-22T21:54:20+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    4949msgstr ""
    5050
    51 #: lib/admin-options.php:80
     51#: lib/admin-options.php:92
    5252msgid "Taxonomy Settings"
    5353msgstr ""
    5454
    55 #: lib/admin-options.php:87
     55#: lib/admin-options.php:99
    5656msgid "Select Taxonomies"
    5757msgstr ""
    5858
    59 #: lib/admin-options.php:212
     59#: lib/admin-options.php:287
    6060msgid "Select which taxonomies should use checkboxes instead of tags UI."
    6161msgstr ""
    6262
    63 #: lib/admin-options.php:217
     63#: lib/admin-options.php:292
    6464msgid "Show system taxonomies"
    6565msgstr ""
    6666
    67 #: lib/admin-options.php:227
    68 #: lib/admin-options.php:380
     67#: lib/admin-options.php:302
     68#: lib/admin-options.php:490
    6969msgid "Select All"
    7070msgstr ""
    7171
    72 #: lib/admin-options.php:231
    73 #: lib/admin-options.php:384
     72#: lib/admin-options.php:306
     73#: lib/admin-options.php:494
    7474msgid "Name"
    7575msgstr ""
    7676
    77 #: lib/admin-options.php:240
    78 #: lib/admin-options.php:393
     77#: lib/admin-options.php:315
     78#: lib/admin-options.php:503
    7979msgid "Post Types"
    8080msgstr ""
    8181
    82 #: lib/admin-options.php:249
    83 #: lib/admin-options.php:402
     82#: lib/admin-options.php:324
     83#: lib/admin-options.php:512
    8484msgid "Type"
    8585msgstr ""
    8686
    87 #: lib/admin-options.php:257
    88 #: lib/admin-options.php:360
    89 #: lib/admin-options.php:410
     87#: lib/admin-options.php:332
     88#: lib/admin-options.php:455
     89#: lib/admin-options.php:520
    9090msgid "Height"
    9191msgstr ""
    9292
    93 #: lib/admin-options.php:260
     93#: lib/admin-options.php:335
     94#: lib/admin-options.php:466
     95#: lib/admin-options.php:523
     96msgid "Allow Inline Add"
     97msgstr ""
     98
     99#: lib/admin-options.php:338
     100#: lib/admin-options.php:469
     101#: lib/admin-options.php:526
     102msgid "Show Edit Link"
     103msgstr ""
     104
     105#: lib/admin-options.php:341
     106#: lib/admin-options.php:472
     107#: lib/admin-options.php:529
     108msgid "Search Box"
     109msgstr ""
     110
     111#: lib/admin-options.php:352
     112msgid "No taxonomies found."
     113msgstr ""
     114
     115#: lib/admin-options.php:354
     116msgid "System taxonomies are currently hidden. Enable \"Show system taxonomies\" to see more options."
     117msgstr ""
     118
    94119#: lib/admin-options.php:371
    95 #: lib/admin-options.php:413
    96 msgid "Show Edit Link"
    97 msgstr ""
    98 
    99 #: lib/admin-options.php:271
    100 msgid "No taxonomies found."
    101 msgstr ""
    102 
    103 #: lib/admin-options.php:273
    104 msgid "System taxonomies are currently hidden. Enable \"Show system taxonomies\" to see more options."
    105 msgstr ""
    106 
    107 #: lib/admin-options.php:290
    108 #: lib/admin-options.php:298
     120#: lib/admin-options.php:379
    109121msgid "Taxonomy already uses checkboxes"
    110122msgstr ""
    111123
    112 #: lib/admin-options.php:291
     124#: lib/admin-options.php:372
    113125msgid "Hierarchical"
    114126msgstr ""
    115127
    116 #: lib/admin-options.php:293
     128#: lib/admin-options.php:374
    117129msgid "Uses tags interface by default"
    118130msgstr ""
    119131
    120 #: lib/admin-options.php:294
     132#: lib/admin-options.php:375
    121133msgid "Non-hierarchical"
    122134msgstr ""
    123135
    124 #: lib/admin-options.php:349
     136#: lib/admin-options.php:444
    125137msgid "Convert"
    126138msgstr ""
    127139
    128 #: lib/admin-options.php:362
     140#: lib/admin-options.php:457
    129141msgid "Default"
    130142msgstr ""
    131143
    132 #: lib/admin-options.php:363
     144#: lib/admin-options.php:458
    133145msgid "Full"
    134146msgstr ""
    135147
    136 #: lib/admin-options.php:364
     148#: lib/admin-options.php:459
    137149msgid "Custom"
    138150msgstr ""
    139151
    140 #: lib/admin-options.php:478
     152#: lib/admin-options.php:474
     153msgid "Off"
     154msgstr ""
     155
     156#: lib/admin-options.php:475
     157msgid "Always"
     158msgstr ""
     159
     160#: lib/admin-options.php:476
     161msgid "Min Terms"
     162msgstr ""
     163
     164#: lib/admin-options.php:479
     165msgid "Minimum terms"
     166msgstr ""
     167
     168#: lib/admin-options.php:481
     169msgid "Terms"
     170msgstr ""
     171
     172#: lib/admin-options.php:594
    141173msgid "Settings"
    142174msgstr ""
    143175
    144 #: lib/replace-tags.php:233
    145 #: src/components/TtcTaxonomyPanel.js:102
     176#: lib/classic-integration.php:100
     177#: src/components/TtcTaxonomyPanel.js:224
     178msgid "Search terms"
     179msgstr ""
     180
     181#: lib/classic-integration.php:101
     182msgid "Search terms..."
     183msgstr ""
     184
     185#: lib/classic-integration.php:102
     186#: src/components/TtcTaxonomyPanel.js:251
     187msgid "No matching terms."
     188msgstr ""
     189
     190#. translators: %s: Add new taxonomy item label.
     191#: lib/classic-integration.php:227
     192#, php-format
     193msgid "+ %s"
     194msgstr ""
     195
     196#. translators: %s: taxonomy label
     197#: lib/config.php:110
     198#, php-format
     199msgid "Edit %s"
     200msgstr ""
     201
     202#: lib/config.php:113
     203msgid "Edit"
     204msgstr ""
     205
     206#. translators: %s: taxonomy label
     207#: lib/config.php:119
     208#, php-format
     209msgid "Add / Edit %s"
     210msgstr ""
     211
     212#: lib/config.php:122
     213#: src/components/TtcTaxonomyPanel.js:317
     214msgid "Add / Edit"
     215msgstr ""
     216
     217#: runthings-taxonomy-tags-to-checkboxes.php:73
     218msgid "GitHub"
     219msgstr ""
     220
     221#: src/components/TtcTaxonomyPanel.js:170
     222msgid "Could not add the term."
     223msgstr ""
     224
     225#: src/components/TtcTaxonomyPanel.js:212
    146226msgid "No terms available."
    147227msgstr ""
    148228
    149 #. translators: %s: Taxonomy label
    150 #. translators: %s: taxonomy label
    151 #: lib/replace-tags.php:297
    152 #: src/components/TtcTaxonomyPanel.js:135
    153 #, php-format,js-format
    154 msgid "+ Add / Edit %s"
    155 msgstr ""
    156 
    157 #: runthings-taxonomy-tags-to-checkboxes.php:70
    158 msgid "GitHub"
    159 msgstr ""
    160 
    161 #: src/components/TtcTaxonomyPanel.js:141
    162 msgid "+ Add / Edit"
    163 msgstr ""
     229#. translators: 1: visible terms count, 2: total terms count
     230#: src/components/TtcTaxonomyPanel.js:237
     231#, js-format
     232msgid "Showing %1$d of %2$d terms"
     233msgstr ""
     234
     235#: src/components/TtcTaxonomyPanel.js:284
     236msgid "Add new term"
     237msgstr ""
     238
     239#: src/components/TtcTaxonomyPanel.js:305
     240msgid "Add"
     241msgstr ""
  • runthings-taxonomy-tags-to-checkboxes/trunk/lib/admin-options.php

    r3461388 r3467136  
    7676        );
    7777
     78        register_setting(
     79            'runthings_taxonomy_options_group',
     80            'runthings_ttc_allow_term_create',
     81            ['sanitize_callback' => [$this, 'sanitize_allow_term_create_settings']]
     82        );
     83
     84        register_setting(
     85            'runthings_taxonomy_options_group',
     86            'runthings_ttc_search_settings',
     87            ['sanitize_callback' => [$this, 'sanitize_search_settings']]
     88        );
     89
    7890        add_settings_section(
    7991            'runthings_taxonomy_section',
     
    151163
    152164    /**
     165     * Sanitize allow inline term create settings
     166     *
     167     * @param array $input The input array.
     168     * @return array The sanitized array.
     169     */
     170    public function sanitize_allow_term_create_settings($input) {
     171        if (!is_array($input)) {
     172            return [];
     173        }
     174        return array_map('sanitize_text_field', $input);
     175    }
     176
     177    /**
     178     * Sanitize search settings.
     179     *
     180     * @param array $input The input array.
     181     * @return array
     182     */
     183    public function sanitize_search_settings($input) {
     184        if (!is_array($input)) {
     185            return [];
     186        }
     187
     188        $sanitized = [];
     189        $allowed_modes = [ 'off', 'always', 'min_terms' ];
     190
     191        foreach ($input as $taxonomy => $settings) {
     192            $taxonomy = sanitize_key((string) $taxonomy);
     193            if ('' === $taxonomy || !is_array($settings)) {
     194                continue;
     195            }
     196
     197            $mode = isset($settings['mode']) ? sanitize_key((string) $settings['mode']) : 'off';
     198            if (!in_array($mode, $allowed_modes, true)) {
     199                $mode = 'off';
     200            }
     201
     202            $threshold = isset($settings['threshold']) ? absint($settings['threshold']) : 20;
     203            if ($threshold < 1) {
     204                $threshold = 20;
     205            }
     206            $threshold = min(1000, $threshold);
     207
     208            $sanitized[$taxonomy] = [
     209                'mode' => $mode,
     210                'threshold' => $threshold,
     211            ];
     212        }
     213
     214        return $sanitized;
     215    }
     216
     217    /**
    153218     * Enqueue admin scripts
    154219     *
     
    192257        $height_settings = get_option('runthings_ttc_height_settings', []);
    193258        $show_links = get_option('runthings_ttc_show_links', []);
     259        $allow_term_create = get_option('runthings_ttc_allow_term_create', []);
     260        $search_settings = get_option('runthings_ttc_search_settings', []);
    194261       
    195262        if (!is_array($selected_taxonomies)) {
     
    203270        if (!is_array($show_links)) {
    204271            $show_links = [];
     272        }
     273
     274        if (!is_array($allow_term_create)) {
     275            $allow_term_create = [];
     276        }
     277
     278        if (!is_array($search_settings)) {
     279            $search_settings = [];
    205280        }
    206281       
     
    257332                        <span><?php esc_html_e('Height', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    258333                    </th>
     334                    <th scope="col" class="manage-column column-allow-create">
     335                        <span><?php esc_html_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     336                    </th>
    259337                    <th scope="col" class="manage-column column-show-link">
    260338                        <span><?php esc_html_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     339                    </th>
     340                    <th scope="col" class="manage-column column-search">
     341                        <span><?php esc_html_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    261342                    </th>
    262343                </tr>
     
    267348                ?>
    268349                <tr class="no-items" style="display: none;">
    269                     <td class="colspanchange" colspan="6">
     350                    <td class="colspanchange" colspan="8">
    270351                        <div class="no-taxonomy-items">
    271352                            <p><?php esc_html_e( 'No taxonomies found.', 'runthings-taxonomy-tags-to-checkboxes' ); ?></p>
     
    341422                    // Disable show link checkbox for hierarchical or unselected taxonomies
    342423                    $link_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
     424
     425                    $allow_create_checked = in_array($taxonomy->name, $allow_term_create, true) ? 'checked' : '';
     426                    $allow_create_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
     427
     428                    $search_mode = isset($search_settings[$taxonomy->name]['mode']) ? sanitize_key((string) $search_settings[$taxonomy->name]['mode']) : 'off';
     429                    if (!in_array($search_mode, ['off', 'always', 'min_terms'], true)) {
     430                        $search_mode = 'off';
     431                    }
     432                    $search_threshold = isset($search_settings[$taxonomy->name]['threshold']) ? intval($search_settings[$taxonomy->name]['threshold']) : 20;
     433                    if ($search_threshold < 1) {
     434                        $search_threshold = 20;
     435                    }
     436                    $search_threshold = min(1000, $search_threshold);
     437                    $search_disabled = $taxonomy->hierarchical || !$is_selected ? 'disabled' : '';
    343438                ?>
    344439                <tr data-name="<?php echo esc_attr( strtolower($taxonomy->label) ); ?>"
     
    369464                        </div>
    370465                    </td>
     466                    <td class="column-allow-create" data-colname="<?php esc_attr_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
     467                        <input type="checkbox" name="runthings_ttc_allow_term_create[]" value="<?php echo esc_attr($taxonomy->name); ?>" <?php echo esc_attr($allow_create_checked); ?> <?php echo esc_attr($allow_create_disabled); ?>>
     468                    </td>
    371469                    <td class="column-show-link" data-colname="<?php esc_attr_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
    372470                        <input type="checkbox" name="runthings_ttc_show_links[]" value="<?php echo esc_attr($taxonomy->name); ?>" <?php echo esc_attr($show_link_checked); ?> <?php echo esc_attr($link_disabled); ?>>
     471                    </td>
     472                    <td class="column-search" data-colname="<?php esc_attr_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?>">
     473                        <select name="runthings_ttc_search_settings[<?php echo esc_attr($taxonomy->name); ?>][mode]" class="search-mode-select" <?php echo esc_attr($search_disabled); ?>>
     474                            <option value="off" <?php selected($search_mode, 'off'); ?>><?php esc_html_e('Off', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     475                            <option value="always" <?php selected($search_mode, 'always'); ?>><?php esc_html_e('Always', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     476                            <option value="min_terms" <?php selected($search_mode, 'min_terms'); ?>><?php esc_html_e('Min Terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></option>
     477                        </select>
     478                        <div class="min-terms-input" style="margin-top: 5px; <?php echo esc_attr($search_mode !== 'min_terms' ? 'display: none;' : ''); ?>">
     479                            <label class="screen-reader-text" for="runthings-ttc-min-terms-<?php echo esc_attr($taxonomy->name); ?>"><?php esc_html_e('Minimum terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></label>
     480                            <input id="runthings-ttc-min-terms-<?php echo esc_attr($taxonomy->name); ?>" type="number" name="runthings_ttc_search_settings[<?php echo esc_attr($taxonomy->name); ?>][threshold]" value="<?php echo esc_attr($search_threshold); ?>" min="1" max="1000" step="1" <?php echo esc_attr($search_disabled); ?>>
     481                            <span><?php esc_html_e('Terms', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     482                        </div>
    373483                    </td>
    374484                </tr>
     
    410520                        <span><?php esc_html_e('Height', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    411521                    </th>
     522                    <th scope="col" class="manage-column column-allow-create">
     523                        <span><?php esc_html_e('Allow Inline Add', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     524                    </th>
    412525                    <th scope="col" class="manage-column column-show-link">
    413526                        <span><?php esc_html_e('Show Edit Link', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
     527                    </th>
     528                    <th scope="col" class="manage-column column-search">
     529                        <span><?php esc_html_e('Search Box', 'runthings-taxonomy-tags-to-checkboxes'); ?></span>
    414530                    </th>
    415531                </tr>
  • runthings-taxonomy-tags-to-checkboxes/trunk/readme.md

    r3464228 r3467136  
    99It allows you to pick from a list of the existing tags, so that admin users do not need to remember each tag.
    1010
    11 It doesn't allow new tags to be created on the fly, which keeps the tags list under control, although you can optionally enable an add / edit link.
     11By default it does not allow new tags to be created on the fly, which keeps the tags list under control. You can optionally enable inline add per taxonomy, and an add / edit link.
    1212
    13 # Features
     13### Features
    1414
    1515- Replace the tags ui with a checkbox list
    1616- No alteration to front end functionality, or the underlying data / terms
    17 - Option to control the height of the taxonomy metabox, between auto, full height, and custom (px)
    18 - Show a link to the taxonomy edit screen via an `+ Add / Edit {taxononomy}` link
     17- Option to control the height of the taxonomy metabox, between default (200px max), full, and custom (px)
     18- Optional inline add control for new terms, enabled per taxonomy
     19- Optional link to the taxonomy edit screen via an `+ Add / Edit {taxonomy}` style link
     20- Optional per-taxonomy search box with `Off`, `Always`, and `Min Terms` modes
    1921- Customization via filters
    2022
     
    4143### What user capabilities are required?
    4244
    43 The configuration screen needs a user with `manage_settings` cap to edit it, but the changes are applied to anyone with editor access to post types that displays those taxonomies.
     45The configuration screen needs a user with `manage_options` cap to edit it, but the changes are applied to anyone with editor access to post types that display those taxonomies.
    4446
    4547### I have a feature idea / I've found a bug
     
    5658
    5759## Changelog
     60
     61### v1.4.0 - 22nd February 2026
     62
     63- Feature - Add optional inline term creation controls in both Classic and Gutenberg editors
     64- Feature - Add optional taxonomy search panel with `Off`, `Always`, and `Min Terms` display modes
     65- Improvement - Add `runthings_ttc_search_settings` filter for per-taxonomy search behavior overrides
    5866
    5967### v1.3.0 - 18th February 2026
     
    8694- Initial release
    8795- Works with custom and built-in taxonomies
    88 - Control the height of the outbox
     96- Control the height of the metabox
    8997- Optionally include an add/edit link
    9098- Filter `runthings_ttc_selected_taxonomies` to short-circuit the override
     
    101109add_filter( 'runthings_ttc_selected_taxonomies', function( $selected_taxonomies ) {
    102110    // Disable the override for the 'category' taxonomy.
    103     unset( $selected_taxonomies['category'] );
    104     return $selected_taxonomies;
     111    return array_values( array_diff( $selected_taxonomies, [ 'category' ] ) );
    105112} );
    106113```
     
    108115#### Parameters:
    109116
    110 - **`$selected_taxonomies`** (array): An array of taxonomy slugs. Unset an entry to disable the checkbox list override.
     117- **`$selected_taxonomies`** (array): An array of taxonomy slugs. Remove a slug value from the array to disable the checkbox list override.
     118
     119### runthings_ttc_search_settings
     120
     121This filter allows developers to override per-taxonomy search UI behavior.
     122
     123#### Usage Example
     124
     125```php
     126add_filter( 'runthings_ttc_search_settings', function( $search_settings ) {
     127    $search_settings['post_tag'] = [
     128        'mode'      => 'always', // valid values: off, always, min_terms
     129        'threshold' => 20,       // used when mode is min_terms
     130    ];
     131
     132    return $search_settings;
     133} );
     134```
     135
     136#### Parameters:
     137
     138- **`$search_settings`** (array): A map of taxonomy slugs to search config arrays (`mode`, `threshold`).
    111139
    112140## Additional Notes
  • runthings-taxonomy-tags-to-checkboxes/trunk/readme.txt

    r3464228 r3467136  
    44Requires at least: 6.4
    55Tested up to: 6.9
    6 Stable tag: 1.3.0
     6Stable tag: 1.4.0
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1515It allows you to pick from a list of the existing tags, so that admin users do not need to remember each tag.
    1616
    17 It doesn't allow new tags to be created on the fly, which keeps the tags list under control, although you can optionally enable an add / edit link.
     17It can optionally allow new terms to be added directly from the post editing UI, while still letting you keep this disabled by default.
    1818
    1919= Features =
    2020* Replace the tags ui with a checkbox list
    2121* No alteration to front end functionality, or the underlying data / terms
    22 * Option to control the height of the taxonomy metabox, between auto, full height, and custom (px)
    23 * Show a link to the taxonomy edit screen via an "+ Add / Edit {taxononomy}" link
     22* Option to control the height of the taxonomy metabox, between default (200px max), full, and custom (px)
     23* Optional inline add control for new terms, enabled per taxonomy
     24* Optional link to the taxonomy edit screen via an "+ Add / Edit {taxonomy}" style link
     25* Optional per-taxonomy search box with Off, Always, and Min Terms modes
    2426* Customization via filters
    2527
     
    4042
    4143= What user capabilities are required? =
    42 The configuration screen needs a user with `manage_settings` cap to edit it, but the changes are applied to anyone with editor access to post types that displays those taxonomies.
     44The configuration screen needs a user with `manage_options` cap to edit it, but the changes are applied to anyone with editor access to post types that display those taxonomies.
    4345
    4446= I have a feature idea / I've found a bug =
     
    5153
    5254== Changelog ==
     55
     56= 1.4.0 - 22nd February 2026 =
     57* Feature - Add optional inline term creation controls in both Classic and Gutenberg editors
     58* Feature - Add optional taxonomy search panel with `Off`, `Always`, and `Min Terms` display modes
     59* Improvement - Add `runthings_ttc_search_settings` filter for per-taxonomy search behavior overrides
    5360
    5461= 1.3.0 - 18th February 2026 =
     
    7582* Initial release
    7683* Works with custom and built-in taxonomies
    77 * Control the height of the outbox
     84* Control the height of the metabox
    7885* Optionally include an add/edit link
    7986* Filter `runthings_ttc_selected_taxonomies` to short-circuit the override
    8087
    8188== Filters ==
    82 ### runthings_ttc_selected_taxonomies
     89For detailed documentation and examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-taxonomy-tags-to-checkboxes#filters).
     90
     91#### runthings_ttc_selected_taxonomies
    8392
    8493This filter allows developers to modify the array of taxonomies selected for the custom checkbox interface.
    8594
    86 For detailed documentation and examples, see the [full documentation on GitHub](https://github.com/runthings-dev/runthings-taxonomy-tags-to-checkboxes#filters).
     95##### Parameters:
     961. **`$selected_taxonomies`** (`array`): An array of taxonomy slugs. Remove a slug value from the array to disable the checkbox list override.
    8797
    88 #### Parameters:
    89 1. **`$selected_taxonomies`** (`array`): An array of taxonomy slugs. Unset an entry to disable the checkbox list override.
     98#### runthings_ttc_search_settings
     99
     100This filter allows developers to override per-taxonomy search UI behavior.
     101
     102##### Parameters:
     1031. **`$search_settings`** (`array`): A map of taxonomy slugs to search config arrays (`mode`, `threshold`).
    90104
    91105== Upgrade Notice ==
     106
     107= 1.4.0 =
     108Adds optional inline term creation and taxonomy search panel controls.
    92109
    93110= 1.3.0 =
     
    96113= 1.2.0 =
    97114Fixes fatal error when a configured taxonomy is deleted, improves panel height options.
    98 
    99 = 1.1.1 =
    100 Fix duplicate taxonomy panels in the block editor for built-in taxonomies.
    101115
    102116== License ==
  • runthings-taxonomy-tags-to-checkboxes/trunk/runthings-taxonomy-tags-to-checkboxes.php

    r3464228 r3467136  
    55 * Plugin URI: https://runthings.dev/wordpress-plugins/taxonomy-tags-to-checkboxes/
    66 * Description: Convert taxonomy tags to checkboxes in the WordPress admin.
    7  * Version: 1.3.0
     7 * Version: 1.4.0
    88 * Author: runthingsdev
    99 * Author URI: https://runthings.dev/
     
    3838}
    3939
    40 define( 'RUNTHINGS_TTC_VERSION', '1.3.0' );
     40define( 'RUNTHINGS_TTC_VERSION', '1.4.0' );
    4141
    4242define( 'RUNTHINGS_TTC_BASENAME', plugin_basename( __FILE__ ) );
     
    4545
    4646require_once RUNTHINGS_TTC_DIR . 'lib/admin-options.php';
    47 require_once RUNTHINGS_TTC_DIR . 'lib/replace-tags.php';
     47require_once RUNTHINGS_TTC_DIR . 'lib/config.php';
     48require_once RUNTHINGS_TTC_DIR . 'lib/classic-integration.php';
     49require_once RUNTHINGS_TTC_DIR . 'lib/block-integration.php';
     50require_once RUNTHINGS_TTC_DIR . 'lib/bootstrap.php';
    4851
    4952class Taxonomy_Tags_To_Checkboxes {
    5053    public function __construct() {
    5154        new Admin_Options();
    52         new Replace_Tags();
     55        new Bootstrap();
    5356
    5457        add_filter(
     
    8689    add_option( 'runthings_ttc_height_settings', [], '', $autoload );
    8790    add_option( 'runthings_ttc_show_links', [], '', $autoload);
     91    add_option( 'runthings_ttc_allow_term_create', [], '', $autoload );
     92    add_option( 'runthings_ttc_search_settings', [], '', $autoload );
    8893}
    8994register_activation_hook( __FILE__, 'RunthingsTaxonomyTagsToCheckboxes\activate_runthings_ttc' );
     
    97102    delete_option( 'runthings_ttc_height_settings' );
    98103    delete_option( 'runthings_ttc_show_links' );
     104    delete_option( 'runthings_ttc_allow_term_create' );
     105    delete_option( 'runthings_ttc_search_settings' );
    99106}
    100107register_uninstall_hook( __FILE__, 'RunthingsTaxonomyTagsToCheckboxes\uninstall_runthings_ttc' );
Note: See TracChangeset for help on using the changeset viewer.