Plugin Directory

Changeset 3459452


Ignore:
Timestamp:
02/12/2026 01:16:44 AM (6 weeks ago)
Author:
dglingren
Message:

Fix pagination relative path processing and avoid conflict with "Breadcrumb NavXT" plugin.

Location:
media-library-assistant/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • media-library-assistant/trunk/includes/class-mla-ajax.php

    r3379043 r3459452  
    631631if ( ( ( 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_MEDIA_MODAL_TOOLBAR, false, false, MLACoreOptions::$mla_prelocalize_option_definitions ) ) || ( 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_MEDIA_GRID_TOOLBAR, false, false, MLACoreOptions::$mla_prelocalize_option_definitions ) ) ) ) {
    632632    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal-ajax.php' );
    633     add_action( 'init', 'MLAModal_Ajax::initialize', 0x7FFFFFFF );
     633    add_action( 'init', 'MLAModal_Ajax::initialize', 0x800 ); // 0x7FFFFFFF );
    634634}
    635635?>
  • media-library-assistant/trunk/includes/class-mla-core-options.php

    r3448291 r3459452  
    541541     */
    542542    public static function mla_localize_option_definitions_array() {
     543        // error_log( __LINE__ . ' DEBUG: MLACoreOptions::mla_localize_option_definitions_array', 0 );
     544       
    543545        self::$mla_option_definitions = array (
    544546            // This option records the highest MLA version so-far installed
  • media-library-assistant/trunk/includes/class-mla-core.php

    r3457611 r3459452  
    3131     * @var string
    3232     */
    33     const MLA_DEVELOPMENT_VERSION = '20260209';
     33    const MLA_DEVELOPMENT_VERSION = '20260211';
    3434
    3535    /**
     
    436436     */
    437437    public static function initialize( ) {
    438         //error_log( __LINE__ . ' DEBUG: MLACore::initialize $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
     438        // error_log( __LINE__ . ' DEBUG: MLACore::initialize $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
    439439        // if ( isset( $_SERVER['REQUEST_URI'] ) ) error_log( __LINE__ . ' DEBUG: MLACore::initialize $_SERVER[REQUEST_URI] = ' . var_export( $_SERVER['REQUEST_URI'], true ), 0 );
     440
    440441        $text_domain = 'media-library-assistant';
    441442        $locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
     
    684685     */
    685686    public static function mla_plugins_loaded_action(){
    686     /*  $text_domain = 'media-library-assistant';
    687         $locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
    688         $locale = apply_filters( 'mla_plugin_locale', $locale, $text_domain );
    689 
    690         if ( is_admin() && 'en_US' === $locale ) {
    691             $result = unload_textdomain( $text_domain );
    692         }
    693 
    694         /*
    695          * To override the plugin's translation files for one, some or all strings,
    696          * create a sub-directory named 'media-library-assistant' in the WordPress
    697          * WP_LANG_DIR (e.g., /wp-content/languages) directory.
    698          * /
    699         load_textdomain( $text_domain, trailingslashit( WP_LANG_DIR ) . $text_domain . '/' . $text_domain . '-' . $locale . '.mo' );
    700         load_plugin_textdomain( $text_domain, false, MLA_PLUGIN_BASENAME . '/languages/' );
    701 
    702         // This must/will be repeated in class-mla-tests.php to reflect translations
    703         MLACoreOptions::mla_localize_option_definitions_array();
     687        // error_log( __LINE__ . ' DEBUG: MLACore::mla_plugins_loaded_action', 0 );
    704688
    705689        MLACore::$original_php_log = ini_get( 'error_log' );
    706         MLACore::$original_php_reporting = sprintf( '0x%1$04X', error_reporting() ); // */
     690        MLACore::$original_php_reporting = sprintf( '0x%1$04X', error_reporting() );
    707691
    708692        // Do not process debug options unless MLA_DEBUG_LEVEL is set in wp-config.php
     
    21992183// Custom Taxonomies and WordPress objects.
    22002184require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
    2201 add_action( 'init', 'MLAObjects::initialize', 0x7FFFFFFF );
     2185add_action( 'init', 'MLAObjects::initialize', 0x800 ); // 0x7FFFFFFF );
    22022186
    22032187// MIME Type functions; some filters required in all modes.
    22042188require_once( MLA_PLUGIN_PATH . 'includes/class-mla-mime-types.php' );
    2205 add_action( 'init', 'MLAMime::initialize', 0x7FFFFFFF );
     2189add_action( 'init', 'MLAMime::initialize', 0x800 ); // 0x7FFFFFFF );
    22062190
    22072191// Intermediate image sizes functions; some filters required in all modes.
    22082192require_once( MLA_PLUGIN_PATH . 'includes/class-mla-image-sizes.php' );
    2209 add_action( 'init', 'MLAImage_Size::initialize', 0x7FFFFFFF );
     2193add_action( 'init', 'MLAImage_Size::initialize', 0x800 ); // 0x7FFFFFFF );
    22102194
    22112195// Admin Columns plugin support
  • media-library-assistant/trunk/includes/class-mla-objects.php

    r3199663 r3459452  
    3333     */
    3434    public static function mla_build_taxonomies( ) {
     35        // error_log( __LINE__ . ' DEBUG: MLAObjects::mla_build_taxonomies', 0 );
     36
    3537        if ( MLACore::mla_taxonomy_support('attachment_category') ) {
    3638            $object_type = apply_filters( 'mla_attachment_category_types', array(
     
    114116     */
    115117    private static function _add_taxonomy_support( ) {
     118        //error_log( __LINE__ . ' DEBUG: MLAObjects::_add_taxonomy_support', 0 );
     119       
    116120        MLACore::mla_initialize_tax_checked_on_top();
    117121        $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
  • media-library-assistant/trunk/includes/class-mla-shortcode-support.php

    r3457611 r3459452  
    22572257
    22582258        $parts = wp_parse_url( $link_url );
     2259
     2260        if ( empty( $parts['scheme'] ) ) {
     2261            if ( 'HTTPS' === substr( $_SERVER["SERVER_PROTOCOL"], 0, 5 ) ) { // phpcs:ignore
     2262                $parts['scheme'] = 'https';
     2263            } else {
     2264                $parts['scheme'] = 'http';
     2265            }
     2266        }
     2267
     2268        if ( empty( $parts['host'] ) ) {
     2269            $parts['host'] = $_SERVER['HTTP_HOST']; // phpcs:ignore
     2270        }
     2271
     2272//error_log( __LINE__ . ' mla_process_pagination_link link_url = ' . var_export( $link_url, true ), 0 );
     2273//error_log( __LINE__ . ' mla_process_pagination_link parts = ' . var_export( $parts, true ), 0 );
    22592274        $uri_path = empty( $parts['path'] ) ? '' : $parts['path'];
    22602275        $uri_query = empty( $parts['query'] ) ? '' : $parts['query'];
  • media-library-assistant/trunk/includes/mla-plugin-loader.php

    r3322044 r3459452  
    6363} else {
    6464    // MLATest is loaded above
    65     add_action( 'init', 'MLATest::initialize', 0x7FFFFFFF );
     65    add_action( 'init', 'MLATest::initialize', 0x800 ); // 0x7FFFFFFF );
    6666
    6767    // Minimum support functions required by all other components
    6868    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-core.php' );
    6969    add_action( 'plugins_loaded', 'MLACore::mla_plugins_loaded_action', 0x7FFFFFFF );
    70     add_action( 'init', 'MLACore::initialize', 0x7FFFFFFF );
     70    add_action( 'init', 'MLACore::initialize', 0x800 ); // 0x7FFFFFFF );
    7171
    7272    // WP/LR Sync plugin has its own protocol to process uploads
     
    9595        if ( $front_end_only ) {
    9696            require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
    97             add_action( 'init', 'MLAShortcodes::initialize', 0x7FFFFFFF );
     97            add_action( 'init', 'MLAShortcodes::initialize', 0x800 ); // 0x7FFFFFFF );
    9898            return;
    9999        }
     
    109109        // Ajax handlers
    110110        require_once( MLA_PLUGIN_PATH . 'includes/class-mla-ajax.php' );
    111         add_action( 'init', 'MLA_Ajax::initialize', 0x7FFFFFFF );
     111        add_action( 'init', 'MLA_Ajax::initialize', 0x800 ); // 0x7FFFFFFF );
    112112
    113113        /*
     
    152152        if ( $ajax_only ) {
    153153            require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
    154             add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
     154            add_action( 'init', 'MLAQuery::initialize', 0x800 ); // 0x7FFFFFFF );
    155155
    156156            // Other plugins such as "No Cache AJAX Widgets" might need shortcodes
    157157            require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
    158             add_action( 'init', 'MLAShortcodes::initialize', 0x7FFFFFFF );
     158            add_action( 'init', 'MLAShortcodes::initialize', 0x800 ); // 0x7FFFFFFF );
    159159
    160160            return;
     
    164164    // Template file and database access functions.
    165165    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
    166     add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
     166    add_action( 'init', 'MLAQuery::initialize', 0x800 ); // 0x7FFFFFFF );
    167167
    168168    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
    169     add_action( 'init', 'MLAData::initialize', 0x7FFFFFFF );
     169    add_action( 'init', 'MLAData::initialize', 0x800 ); // 0x7FFFFFFF );
    170170
    171171    // Shortcode shim functions
    172172    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
    173     add_action( 'init', 'MLAShortcodes::initialize', 0x7FFFFFFF );
     173    add_action( 'init', 'MLAShortcodes::initialize', 0x800 ); // 0x7FFFFFFF );
    174174
    175175    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcode-support.php' );
     
    181181        add_action( 'init', 'MLAOptions::initialize', 9 );
    182182    } else {
    183         add_action( 'init', 'MLAOptions::initialize', 0x7FFFFFFF );
     183        add_action( 'init', 'MLAOptions::initialize', 0x800 ); // 0x7FFFFFFF );
    184184    }
    185185
    186186    // Plugin settings management page
    187187    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
    188     add_action( 'init', 'MLASettings::initialize', 0x7FFFFFFF );
     188    add_action( 'init', 'MLASettings::initialize', 0x800 ); // 0x7FFFFFFF );
    189189
    190190    // Main program
    191191    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-main.php' );
    192     add_action( 'init', 'MLA::initialize', 0x7FFFFFFF );
     192    add_action( 'init', 'MLA::initialize', 0x800 ); // 0x7FFFFFFF );
    193193
    194194    // Edit Media screen additions, e.g., meta boxes
    195195    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-edit-media.php' );
    196     add_action( 'init', 'MLAEdit::initialize', 0x7FFFFFFF );
     196    add_action( 'init', 'MLAEdit::initialize', 0x800 ); // 0x7FFFFFFF );
    197197
    198198    // Media Manager (Modal window) additions
    199199    require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal.php' );
    200     add_action( 'init', 'MLAModal::initialize', 0x7FFFFFFF );
     200    add_action( 'init', 'MLAModal::initialize', 0x800 ); // 0x7FFFFFFF );
    201201
    202202    /*
  • media-library-assistant/trunk/index.php

    r3457611 r3459452  
    1616Plugin Name: Media Library Assistant
    1717Plugin URI: http://davidlingren.com/#two
    18 Description: 20260209 Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud] [mla_term_list], [mla_custom_list], [mla_archive_list], taxonomy support, IPTC/EXIF/XMP/PDF processing, bulk/quick edit.
     18Description: 20260211 Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud] [mla_term_list], [mla_custom_list], [mla_archive_list], taxonomy support, IPTC/EXIF/XMP/PDF processing, bulk/quick edit.
    1919Version: 3.32
    2020Requires at least: 4.7
  • media-library-assistant/trunk/readme.txt

    r3457611 r3459452  
    201201* Fix: IMPORTANT: For the `[mla_tag_cloud]` and `[mla_term_list]` shortcodes, an SQL injection security risk has been mitigated.
    202202* Fix: A  WPML support defect causing a critical site error when duplicating an attachment in a new language has been corrected.
    203 
     203* Fix: For all of the shortcodes, a defect in handling relative paths in pagination output formats has been corrected.
     204* Fix: The priority of the hooks MLA adds to the "init" action has been adjusted to avoid a taxonomy registration conflict with the "Breadcrumb NavXT" plugin.
    204205= 3.32 =
    205206* Fix: A defect with taxonomy labels in the MMMW ATTACHMENT DETAILS pane causing a PHP "Undefined variable $label" message has been corrected.
  • media-library-assistant/trunk/tests/class-mla-tests.php

    r1718460 r3459452  
    4949            @error_reporting( 0 + $php_reporting );
    5050        }
    51 
    52         // This is the earliest effective place to localize values in other plugin components
    53         MLACoreOptions::mla_localize_option_definitions_array();
    5451    }
    5552
Note: See TracChangeset for help on using the changeset viewer.