Plugin Directory

Changeset 3077810


Ignore:
Timestamp:
04/26/2024 07:44:45 PM (2 years ago)
Author:
NCAllen
Message:

Update to version 1.4.0 from GitHub

Location:
bulk-term-generator
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bulk-term-generator/tags/1.4.0/README.txt

    r3000719 r3077810  
    33Tags: add multiple terms,bulk import,terms,tags,categories,taxonomy,add,multiple,mass,keywords,taxonomies,generate
    44Requires at least: 3.1
    5 Tested up to: 6.2
     5Tested up to: 6.5.2
    66Stable tag: trunk
    77License: GPLv2 or later
     
    1616Bulk Term Generator allows you to seamlessly import multiple terms to your selected taxonomies in WordPress. Its powerful yet easy-to-use interface lets you copy and paste your terms, queue them up, and even select a parent term for hierarchy. No need for pre-formatted CSV files or meticulous manual entry. You can even specify the slug and description for each term, making your content even more search-friendly.
    1717
    18 But the magic doesnt stop there. Bulk Term Generator gives you total control before you import your terms. With its unique 'Preview' feature, you can see exactly how your terms will be added and make any necessary changes before hitting the final "Generate Terms" button. Plus, you can edit or delete any queued term at any point with just a click.
     18But the magic doesn't stop there. Bulk Term Generator gives you total control before you import your terms. With its unique 'Preview' feature, you can see exactly how your terms will be added and make any necessary changes before hitting the final "Generate Terms" button. Plus, you can edit or delete any queued term at any point with just a click.
    1919
    2020Bulk Term Generator has been lauded as a 'lifesaver' and a 'developer's dream' by our users, and we are confident you will think the same:
     
    2424> "Recently used this for a client to import 43 terms in multiple hierarchical levels. So much quicker than going about it individually." - Brian Fischer
    2525 ---
    26 > "I tried a few other plugins to bulk add taxonomy terms but none of them were intuitive. This plugin is the only one that youll ever need. It does everything I expected and more!" - Andrew Schultz
     26> "I tried a few other plugins to bulk add taxonomy terms but none of them were intuitive. This plugin is the only one that you'll ever need. It does everything I expected and more!" - Andrew Schultz
    2727
    2828Bulk Term Generator supports both English and Spanish, and we're planning to add more languages in the future. Plus, it's 100% free. No hidden costs or premium versions.
     
    7171== Changelog ==
    7272
     73= 1.4.0 =
     74* Tested with WordPress 6.5.2
     75* Improved coding standards
     76* Added a blank option to parent select field
     77* Refactored get_terms usage to align with updated WordPress standards
     78
    7379= 1.3.3 =
    7480* Shortened the plugin name in the admin
  • bulk-term-generator/tags/1.4.0/bulk-term-generator.php

    r3000434 r3077810  
    1313 * Plugin URI:        http://nateallen.com/wordpress-plugins/bulk-term-generator
    1414 * Description:       Streamline taxonomy management in WordPress with Bulk Term Generator, your free tool for easy, bulk term importing.
    15  * Version:           1.3.3
     15 * Version:           1.4.0
    1616 * Requires at least: 3.1
    17  * Tested up to:      6.4.1
     17 * Tested up to:      6.5.2
    1818 * Requires PHP:      7.4
    1919 * Author:            Nate Allen
    20  * Author URI:        http://nateallen.com/
     20 * Author URI:        https://nateallen.com/
    2121 * License:           GPL-2.0+
    2222 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    4242spl_autoload_register( 'bulk_term_generator_autoloader' );
    4343
    44 function bulk_term_generator_autoloader( $class ) {
    45     $class = strtolower( str_replace( '_', '-', $class ) );
     44function bulk_term_generator_autoloader( $class_name ) {
     45    $class_name = strtolower( str_replace( '_', '-', $class_name ) );
    4646
    4747    // If it's not one of my classes, ignore it
    48     if ( substr( $class, 0, 19 ) !== 'bulk-term-generator' ) {
     48    if ( substr( $class_name, 0, 19 ) !== 'bulk-term-generator' ) {
    4949        return false;
    5050    }
    5151
    5252    // Check if the file exists, and if it does, include it
    53     if ( file_exists( plugin_dir_path( __FILE__ ) . 'classes/class-' . $class . '.php' ) ) {
    54         include plugin_dir_path( __FILE__ ) . 'classes/class-' . $class . '.php';
     53    if ( file_exists( plugin_dir_path( __FILE__ ) . 'classes/class-' . $class_name . '.php' ) ) {
     54        include plugin_dir_path( __FILE__ ) . 'classes/class-' . $class_name . '.php';
    5555    }
    5656}
  • bulk-term-generator/tags/1.4.0/classes/class-bulk-term-generator-admin.php

    r3000434 r3077810  
    111111            $taxonomy_slug  = $_GET['taxonomy']; // phpcs:ignore WordPress.Security.NonceVerification
    112112            $taxonomy_name  = $taxonomy->labels->name;
    113             $taxonomy_terms = get_terms( $_GET['taxonomy'], array( 'hide_empty' => false ) ); // phpcs:ignore WordPress.Security.NonceVerification
     113            $taxonomy_terms = get_terms(
     114                array(
     115                    'hide_empty' => false,
     116                    'taxonomy'   => $_GET['taxonomy'], // phpcs:ignore WordPress.Security.NonceVerification
     117                )
     118            );
    114119
    115120            $this->data['is_hierarchical']  = $taxonomy->hierarchical;
     
    280285                'btg_terms_list' => $json_list,
    281286                'admin_url'      => admin_url( 'admin-ajax.php' ),
    282                 'plugin_dir'     => plugins_url( '', dirname( __FILE__ ) ),
     287                'plugin_dir'     => plugins_url( '', __DIR__ ),
    283288                'taxonomy'       => $taxonomy,
    284289                'i18n'           => array(
     
    307312        echo $template->render(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    308313    }
    309 
    310314}
  • bulk-term-generator/tags/1.4.0/classes/class-bulk-term-generator-template.php

    r2932813 r3077810  
    168168
    169169        return $html;
    170 
    171170    }
    172171
     
    192191        // Get all of the terms for the given taxonomy
    193192        $terms = get_terms(
    194             $options['taxonomy'],
    195193            array(
    196194                'hide_empty' => false,
    197195                'parent'     => 0,
     196                'taxonomy'   => $options['taxonomy'],
    198197            )
    199198        );
     
    203202
    204203        // Reset the selection options variable
    205         $this->select_options = '';
     204        $this->select_options = '<option value=""></option>';
    206205
    207206        foreach ( $terms as $term ) {
     
    214213
    215214        return $html;
    216 
    217215    }
    218216
     
    240238        // Get all of the terms for the given taxonomy.
    241239        $terms = get_terms(
    242             $options['taxonomy'],
    243240            array(
    244241                'hide_empty' => false,
    245242                'parent'     => 0,
     243                'taxonomy'   => $options['taxonomy'],
    246244            )
    247245        );
     
    275273        // Get all of the terms for the given taxonomy.
    276274        $terms = get_terms(
    277             $taxonomy,
    278275            array(
    279276                'hide_empty' => false,
    280277                'parent'     => 0,
     278                'taxonomy'   => $taxonomy,
    281279            )
    282280        );
     
    323321     */
    324322    private function get_select_options( string $taxonomy, object $term ) {
    325         $this->select_options .= '<option value="' . $term->term_id . '" data-parent="' . $term->parent . '" data-name="' . $term->name . '">' . $this->get_separators( $term->term_id, $taxonomy ) . $term->name . '</option>';
     323        $this->select_options .= sprintf(
     324            '<option value="%s" data-parent="%s" data-name="%s">%s%s</option>',
     325            $term->term_id,
     326            $term->parent,
     327            htmlspecialchars( $term->name, ENT_QUOTES, 'UTF-8' ),
     328            $this->get_separators( $term->term_id, $taxonomy ),
     329            htmlspecialchars( $term->name, ENT_QUOTES, 'UTF-8' )
     330        );
    326331
    327332        $children = get_terms(
    328             $taxonomy,
    329333            array(
    330334                'parent'     => $term->term_id,
    331335                'hide_empty' => '0',
     336                'taxonomy'   => $taxonomy,
    332337            )
    333338        );
     
    352357    private function get_list_items( string $taxonomy, object $term, $ul ) {
    353358        $children = get_terms(
    354             $taxonomy,
    355359            array(
    356360                'parent'     => $term->term_id,
    357361                'hide_empty' => '0',
     362                'taxonomy'   => $taxonomy,
    358363            )
    359364        );
     
    385390        // Get all of the terms for the given taxonomy.
    386391        $children = get_terms(
    387             $taxonomy,
    388392            array(
    389393                'hide_empty' => false,
    390394                'parent'     => $term->term_id,
     395                'taxonomy'   => $taxonomy,
    391396            )
    392397        );
  • bulk-term-generator/tags/1.4.0/classes/class-bulk-term-generator.php

    r3000434 r3077810  
    6363     */
    6464    private function load_dependencies() {
    65 
    6665        $this->loader = new Bulk_Term_Generator_Loader();
    67 
    6866    }
    6967
  • bulk-term-generator/trunk/README.txt

    r3000719 r3077810  
    33Tags: add multiple terms,bulk import,terms,tags,categories,taxonomy,add,multiple,mass,keywords,taxonomies,generate
    44Requires at least: 3.1
    5 Tested up to: 6.2
     5Tested up to: 6.5.2
    66Stable tag: trunk
    77License: GPLv2 or later
     
    1616Bulk Term Generator allows you to seamlessly import multiple terms to your selected taxonomies in WordPress. Its powerful yet easy-to-use interface lets you copy and paste your terms, queue them up, and even select a parent term for hierarchy. No need for pre-formatted CSV files or meticulous manual entry. You can even specify the slug and description for each term, making your content even more search-friendly.
    1717
    18 But the magic doesnt stop there. Bulk Term Generator gives you total control before you import your terms. With its unique 'Preview' feature, you can see exactly how your terms will be added and make any necessary changes before hitting the final "Generate Terms" button. Plus, you can edit or delete any queued term at any point with just a click.
     18But the magic doesn't stop there. Bulk Term Generator gives you total control before you import your terms. With its unique 'Preview' feature, you can see exactly how your terms will be added and make any necessary changes before hitting the final "Generate Terms" button. Plus, you can edit or delete any queued term at any point with just a click.
    1919
    2020Bulk Term Generator has been lauded as a 'lifesaver' and a 'developer's dream' by our users, and we are confident you will think the same:
     
    2424> "Recently used this for a client to import 43 terms in multiple hierarchical levels. So much quicker than going about it individually." - Brian Fischer
    2525 ---
    26 > "I tried a few other plugins to bulk add taxonomy terms but none of them were intuitive. This plugin is the only one that youll ever need. It does everything I expected and more!" - Andrew Schultz
     26> "I tried a few other plugins to bulk add taxonomy terms but none of them were intuitive. This plugin is the only one that you'll ever need. It does everything I expected and more!" - Andrew Schultz
    2727
    2828Bulk Term Generator supports both English and Spanish, and we're planning to add more languages in the future. Plus, it's 100% free. No hidden costs or premium versions.
     
    7171== Changelog ==
    7272
     73= 1.4.0 =
     74* Tested with WordPress 6.5.2
     75* Improved coding standards
     76* Added a blank option to parent select field
     77* Refactored get_terms usage to align with updated WordPress standards
     78
    7379= 1.3.3 =
    7480* Shortened the plugin name in the admin
  • bulk-term-generator/trunk/bulk-term-generator.php

    r3000434 r3077810  
    1313 * Plugin URI:        http://nateallen.com/wordpress-plugins/bulk-term-generator
    1414 * Description:       Streamline taxonomy management in WordPress with Bulk Term Generator, your free tool for easy, bulk term importing.
    15  * Version:           1.3.3
     15 * Version:           1.4.0
    1616 * Requires at least: 3.1
    17  * Tested up to:      6.4.1
     17 * Tested up to:      6.5.2
    1818 * Requires PHP:      7.4
    1919 * Author:            Nate Allen
    20  * Author URI:        http://nateallen.com/
     20 * Author URI:        https://nateallen.com/
    2121 * License:           GPL-2.0+
    2222 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    4242spl_autoload_register( 'bulk_term_generator_autoloader' );
    4343
    44 function bulk_term_generator_autoloader( $class ) {
    45     $class = strtolower( str_replace( '_', '-', $class ) );
     44function bulk_term_generator_autoloader( $class_name ) {
     45    $class_name = strtolower( str_replace( '_', '-', $class_name ) );
    4646
    4747    // If it's not one of my classes, ignore it
    48     if ( substr( $class, 0, 19 ) !== 'bulk-term-generator' ) {
     48    if ( substr( $class_name, 0, 19 ) !== 'bulk-term-generator' ) {
    4949        return false;
    5050    }
    5151
    5252    // Check if the file exists, and if it does, include it
    53     if ( file_exists( plugin_dir_path( __FILE__ ) . 'classes/class-' . $class . '.php' ) ) {
    54         include plugin_dir_path( __FILE__ ) . 'classes/class-' . $class . '.php';
     53    if ( file_exists( plugin_dir_path( __FILE__ ) . 'classes/class-' . $class_name . '.php' ) ) {
     54        include plugin_dir_path( __FILE__ ) . 'classes/class-' . $class_name . '.php';
    5555    }
    5656}
  • bulk-term-generator/trunk/classes/class-bulk-term-generator-admin.php

    r3000434 r3077810  
    111111            $taxonomy_slug  = $_GET['taxonomy']; // phpcs:ignore WordPress.Security.NonceVerification
    112112            $taxonomy_name  = $taxonomy->labels->name;
    113             $taxonomy_terms = get_terms( $_GET['taxonomy'], array( 'hide_empty' => false ) ); // phpcs:ignore WordPress.Security.NonceVerification
     113            $taxonomy_terms = get_terms(
     114                array(
     115                    'hide_empty' => false,
     116                    'taxonomy'   => $_GET['taxonomy'], // phpcs:ignore WordPress.Security.NonceVerification
     117                )
     118            );
    114119
    115120            $this->data['is_hierarchical']  = $taxonomy->hierarchical;
     
    280285                'btg_terms_list' => $json_list,
    281286                'admin_url'      => admin_url( 'admin-ajax.php' ),
    282                 'plugin_dir'     => plugins_url( '', dirname( __FILE__ ) ),
     287                'plugin_dir'     => plugins_url( '', __DIR__ ),
    283288                'taxonomy'       => $taxonomy,
    284289                'i18n'           => array(
     
    307312        echo $template->render(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    308313    }
    309 
    310314}
  • bulk-term-generator/trunk/classes/class-bulk-term-generator-template.php

    r2932813 r3077810  
    168168
    169169        return $html;
    170 
    171170    }
    172171
     
    192191        // Get all of the terms for the given taxonomy
    193192        $terms = get_terms(
    194             $options['taxonomy'],
    195193            array(
    196194                'hide_empty' => false,
    197195                'parent'     => 0,
     196                'taxonomy'   => $options['taxonomy'],
    198197            )
    199198        );
     
    203202
    204203        // Reset the selection options variable
    205         $this->select_options = '';
     204        $this->select_options = '<option value=""></option>';
    206205
    207206        foreach ( $terms as $term ) {
     
    214213
    215214        return $html;
    216 
    217215    }
    218216
     
    240238        // Get all of the terms for the given taxonomy.
    241239        $terms = get_terms(
    242             $options['taxonomy'],
    243240            array(
    244241                'hide_empty' => false,
    245242                'parent'     => 0,
     243                'taxonomy'   => $options['taxonomy'],
    246244            )
    247245        );
     
    275273        // Get all of the terms for the given taxonomy.
    276274        $terms = get_terms(
    277             $taxonomy,
    278275            array(
    279276                'hide_empty' => false,
    280277                'parent'     => 0,
     278                'taxonomy'   => $taxonomy,
    281279            )
    282280        );
     
    323321     */
    324322    private function get_select_options( string $taxonomy, object $term ) {
    325         $this->select_options .= '<option value="' . $term->term_id . '" data-parent="' . $term->parent . '" data-name="' . $term->name . '">' . $this->get_separators( $term->term_id, $taxonomy ) . $term->name . '</option>';
     323        $this->select_options .= sprintf(
     324            '<option value="%s" data-parent="%s" data-name="%s">%s%s</option>',
     325            $term->term_id,
     326            $term->parent,
     327            htmlspecialchars( $term->name, ENT_QUOTES, 'UTF-8' ),
     328            $this->get_separators( $term->term_id, $taxonomy ),
     329            htmlspecialchars( $term->name, ENT_QUOTES, 'UTF-8' )
     330        );
    326331
    327332        $children = get_terms(
    328             $taxonomy,
    329333            array(
    330334                'parent'     => $term->term_id,
    331335                'hide_empty' => '0',
     336                'taxonomy'   => $taxonomy,
    332337            )
    333338        );
     
    352357    private function get_list_items( string $taxonomy, object $term, $ul ) {
    353358        $children = get_terms(
    354             $taxonomy,
    355359            array(
    356360                'parent'     => $term->term_id,
    357361                'hide_empty' => '0',
     362                'taxonomy'   => $taxonomy,
    358363            )
    359364        );
     
    385390        // Get all of the terms for the given taxonomy.
    386391        $children = get_terms(
    387             $taxonomy,
    388392            array(
    389393                'hide_empty' => false,
    390394                'parent'     => $term->term_id,
     395                'taxonomy'   => $taxonomy,
    391396            )
    392397        );
  • bulk-term-generator/trunk/classes/class-bulk-term-generator.php

    r3000434 r3077810  
    6363     */
    6464    private function load_dependencies() {
    65 
    6665        $this->loader = new Bulk_Term_Generator_Loader();
    67 
    6866    }
    6967
Note: See TracChangeset for help on using the changeset viewer.