Plugin Directory

Changeset 2758024


Ignore:
Timestamp:
07/18/2022 03:04:30 PM (4 years ago)
Author:
wpmedialibrary
Message:

Update to version 1.4.6 from GitHub

Location:
media-library-organizer
Files:
60 edited
1 copied

Legend:

Unmodified
Added
Removed
  • media-library-organizer/tags/1.4.6/_modules/dashboard/class-wpzincdashboardwidget.php

    r2747124 r2758024  
    438438
    439439        // Define minimum capability for accessing Import and Export Sub Menu.
    440         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    441 
    442         add_submenu_page( $slug, __( 'Import & Export', $this->plugin->name ), __( 'Import & Export', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-import-export', array( $this, 'import_export_screen' ) ); /* phpcs:ignore */
     440        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     441
     442        add_submenu_page( $slug, __( 'Import & Export', $this->plugin->name ), __( 'Import & Export', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-import-export', array( $this, 'import_export_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    443443
    444444    }
     
    463463
    464464        // Define minimum capability for accessing Support Menu.
    465         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    466 
    467         add_submenu_page( $slug, __( 'Support', $this->plugin->name ), __( 'Support', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-support', array( $this, 'support_screen' ) ); /* phpcs:ignore */
     465        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     466
     467        add_submenu_page( $slug, __( 'Support', $this->plugin->name ), __( 'Support', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-support', array( $this, 'support_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    468468
    469469    }
     
    488488
    489489        // Define minimum capability for accessing Upgrade Menu.
    490         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    491 
    492         add_submenu_page( $slug, __( 'Upgrade', $this->plugin->name ), __( 'Upgrade', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-upgrade', array( $this, 'upgrade_screen' ) ); /* phpcs:ignore */
     490        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     491
     492        add_submenu_page( $slug, __( 'Upgrade', $this->plugin->name ), __( 'Upgrade', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-upgrade', array( $this, 'upgrade_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    493493
    494494    }
     
    531531     * @return  array           Action Links
    532532     */
    533     public function add_action_link( $links, $file ) { /* phpcs:ignore */
     533    public function add_action_link( $links, $file ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    534534
    535535        // Bail if the licensing class exists,as this means we're on a Pro version.
     
    558558        // Add Links.
    559559        if ( $this->get_upgrade_url( 'plugins' ) ) {
    560             $links[] = '<a href="' . $this->get_upgrade_url( 'plugins' ) . '" rel="noopener" target="_blank">' . __( 'Upgrade', $this->plugin->name ) . '</a>'; /* phpcs:ignore */
     560            $links[] = '<a href="' . esc_attr( $this->get_upgrade_url( 'plugins' ) ) . '" rel="noopener" target="_blank">' . __( 'Upgrade', $this->plugin->name ) . '</a>'; //phpcs:ignore WordPress.WP.I18n
    561561        }
    562562
     
    586586        // Define the deactivation reasons.
    587587        $reasons = array(
    588             'not_working'        => __( 'The Plugin didn\'t work', $this->plugin->name ), /* phpcs:ignore */
    589             'better_alternative' => __( 'I found a better Plugin', $this->plugin->name ), /* phpcs:ignore */
    590             'other'              => __( 'Other', $this->plugin->name ), /* phpcs:ignore */
     588            'not_working'        => __( 'The Plugin didn\'t work', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
     589            'better_alternative' => __( 'I found a better Plugin', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
     590            'other'              => __( 'Other', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    591591        );
    592592
     
    620620
    621621        // Build args.
     622        // phpcs:disable WordPress.Security.NonceVerification
    622623        $args = array(
    623             'product'      => sanitize_text_field( $_REQUEST['product'] ), /* phpcs:ignore */
    624             'version'      => sanitize_text_field( $_REQUEST['version'] ), /* phpcs:ignore */
    625             'reason'       => sanitize_text_field( $_REQUEST['reason'] ), /* phpcs:ignore */
    626             'reason_text'  => sanitize_text_field( $_REQUEST['reason_text'] ), /* phpcs:ignore */
    627             'reason_email' => sanitize_text_field( $_REQUEST['reason_email'] ), /* phpcs:ignore */
     624            'product'      => sanitize_text_field( $_REQUEST['product'] ),
     625            'version'      => sanitize_text_field( $_REQUEST['version'] ),
     626            'reason'       => sanitize_text_field( $_REQUEST['reason'] ),
     627            'reason_text'  => sanitize_text_field( $_REQUEST['reason_text'] ),
     628            'reason_email' => sanitize_text_field( $_REQUEST['reason_email'] ),
    628629            'site_url'     => str_replace( wp_parse_url( get_bloginfo( 'url' ), PHP_URL_SCHEME ) . '://', '', get_bloginfo( 'url' ) ),
    629630        );
     631        // phpcs:enable
    630632
    631633        // Send deactivation reason.
     
    693695
    694696        // Bail if we're not on a Plugin screen.
    695         if ( ! isset( $_REQUEST['page'] ) ) { /* phpcs:ignore */
     697        if ( ! isset( $_REQUEST['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    696698            return $text;
    697699        }
    698         $page = sanitize_text_field( $_REQUEST['page'] ); /* phpcs:ignore */
     700        $page = sanitize_text_field( $_REQUEST['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    699701        if ( strpos( $page, $this->plugin->name ) === false ) {
    700702            return $text;
     
    704706        return sprintf(
    705707            /* translators: %1$s: Plugin Name, %2$s: Five Star Link to Review URL, %3$s: Link to Review URL, %4$s: Plugin Name */
    706             __( 'Please rate %1$s %2$s on %3$s to help us grow %4$s. Thanks!', $this->plugin->name ), /* phpcs:ignore */
     708            __( 'Please rate %1$s %2$s on %3$s to help us grow %4$s. Thanks!', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    707709            '<strong>' . $this->plugin->displayName . '</strong>',
    708710            '<a href="' . $this->get_review_url() . '" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>',
     
    842844    public function import_export_screen() {
    843845
    844         if ( ! empty( $_POST ) ) { /* phpcs:ignore */
     846        if ( ! empty( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    845847            // Check nonce.
    846848            $result = $this->import_export_security_check();
     
    850852            } else {
    851853                // Import JSON.
    852                 if ( isset( $_POST['import'] ) ) { /* phpcs:ignore */
     854                if ( isset( $_POST['import'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    853855                    $this->import();
    854856                } else {
    855857                    // Import from Third Party.
    856858                    $result = true;
    857                     $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_third_party', $result, $_POST ); /* phpcs:ignore */
     859                    $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_third_party', $result, $_POST ); // phpcs:ignore WordPress.NamingConventions.ValidHookName,WordPress.Security.NonceVerification
    858860
    859861                    if ( is_wp_error( $result ) ) {
    860862                        $this->error_message = $result->get_error_message();
    861863                    } else {
    862                         $this->message = __( 'Settings imported.', $this->plugin->name ); /* phpcs:ignore */
     864                        $this->message = __( 'Settings imported.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    863865                    }
    864866                }
     
    867869
    868870        // Allow Plugin to define additional import routines.
    869         $import_sources = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_sources', array() ); /* phpcs:ignore */
     871        $import_sources = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_sources', array() ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
    870872
    871873        // Output view.
     
    886888        if ( ! isset( $_POST[ $this->plugin->name . '_nonce' ] ) ) {
    887889            // Missing nonce.
    888             return new WP_Error( 'import_export_nonce_missing', __( 'nonce field is missing. Settings NOT saved.', $this->plugin->name ) ); /* phpcs:ignore */
     890            return new WP_Error( 'import_export_nonce_missing', __( 'nonce field is missing. Settings NOT saved.', $this->plugin->name ) ); // phpcs:ignore WordPress.WP.I18n
    889891        }
    890892
    891893        if ( ! wp_verify_nonce( $_POST[ $this->plugin->name . '_nonce' ], $this->plugin->name ) ) {
    892894            // Invalid nonce.
    893             return new WP_Error( 'import_export_nonce_invalid', __( 'Invalid nonce specified. Settings NOT saved.', $this->plugin->name ) ); /* phpcs:ignore */
     895            return new WP_Error( 'import_export_nonce_invalid', __( 'Invalid nonce specified. Settings NOT saved.', $this->plugin->name ) ); // phpcs:ignore WordPress.WP.I18n
    894896        }
    895897
     
    906908
    907909        if ( ! is_array( $_FILES ) ) {
    908             $this->error_message = __( 'No file was uploaded', $this->plugin->name ); /* phpcs:ignore */
     910            $this->error_message = __( 'No file was uploaded', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    909911            return;
    910912        }
    911913
    912914        if ( $_FILES['import']['error'] !== 0 ) {
    913             $this->error_message = __( 'Error when uploading file.', $this->plugin->name ); /* phpcs:ignore */
     915            $this->error_message = __( 'Error when uploading file.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    914916            return;
    915917        }
     
    924926                $zip = new ZipArchive();
    925927                if ( $zip->open( $_FILES['import']['tmp_name'] ) !== true ) {
    926                     $this->error_message = __( 'Could not extract the supplied ZIP file.', $this->plugin->name ); /* phpcs:ignore */
     928                    $this->error_message = __( 'Could not extract the supplied ZIP file.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    927929                    return;
    928930                }
     
    933935
    934936                // Read JSON file.
    935                 $handle = fopen( sys_get_temp_dir() . '/export.json', 'r' ); /* phpcs:ignore */
    936                 $json   = fread( $handle, filesize( sys_get_temp_dir() . '/export.json' ) ); /* phpcs:ignore */
    937                 fclose( $handle ); /* phpcs:ignore */
     937                // phpcs:disable WordPress.WP.AlternativeFunctions
     938                $handle = fopen( sys_get_temp_dir() . '/export.json', 'r' );
     939                $json   = fread( $handle, filesize( sys_get_temp_dir() . '/export.json' ) );
     940                fclose( $handle );
     941                // phpcs:enable
    938942                break;
    939943
    940944            default:
    941945                // Read file.
    942                 $handle = fopen( $_FILES['import']['tmp_name'], 'r' ); /* phpcs:ignore */
    943                 $json   = fread( $handle, $_FILES['import']['size'] ); /* phpcs:ignore */
    944                 fclose( $handle ); /* phpcs:ignore */
     946                // phpcs:disable WordPress.WP.AlternativeFunctions
     947                $handle = fopen( $_FILES['import']['tmp_name'], 'r' );
     948                $json   = fread( $handle, $_FILES['import']['size'] );
     949                fclose( $handle );
     950                // phpcs:enable
    945951
    946952        }
     
    951957
    952958        // Decode.
    953         $import = json_decode( $json, true ); /* phpcs:ignore */
     959        $import = json_decode( $json, true );
    954960
    955961        // Check data is an array.
    956962        if ( ! is_array( $import ) ) {
    957             $this->error_message = __( 'Supplied file is not a valid JSON settings file, or has become corrupt.', $this->plugin->name ); /* phpcs:ignore */
     963            $this->error_message = __( 'Supplied file is not a valid JSON settings file, or has become corrupt.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    958964            return;
    959965        }
     
    961967        // Allow Plugin to run its Import Routine using the supplied data now.
    962968        $result = true;
    963         $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import', $result, $import ); /* phpcs:ignore */
     969        $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import', $result, $import );  // phpcs:ignore WordPress.NamingConventions.ValidHookName
    964970
    965971        // Bail if an error occured.
     
    969975        }
    970976
    971         $this->message = __( 'Settings imported.', $this->plugin->name ); /* phpcs:ignore */
     977        $this->message = __( 'Settings imported.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    972978
    973979    }
     
    9991005
    10001006        // Bail if no POST data.
    1001         if ( empty( $_POST ) ) { /* phpcs:ignore */
     1007        if ( empty( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10021008            return;
    10031009        }
    10041010
    10051011        // Bail if not exporting.
    1006         if ( ! isset( $_POST['export'] ) ) { /* phpcs:ignore */
     1012        if ( ! isset( $_POST['export'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10071013            return;
    10081014        }
     
    10271033         * @param   array   $_POST  POST Data.
    10281034         */
    1029         $data = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_export', $data, $_POST ); /* phpcs:ignore */
     1035        $data = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_export', $data, $_POST ); // phpcs:ignore WordPress.NamingConventions.ValidHookName,WordPress.Security.NonceVerification
    10301036
    10311037        // Force a file download, depending on the export format.
    1032         switch ( sanitize_text_field( $_POST['format'] ) ) { /* phpcs:ignore */
     1038        switch ( sanitize_text_field( $_POST['format'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10331039            /**
    10341040             * JSON, Zipped.
     
    10891095        header( 'Pragma: no-cache' );
    10901096        header( 'Expires: 0' );
    1091         readfile( $filename ); /* phpcs:ignore */
     1097        readfile( $filename ); // phpcs:ignore WordPress.WP.AlternativeFunctions
    10921098        unlink( $filename );
    10931099        exit();
     
    11101116        header( 'Pragma: no-cache' );
    11111117        header( 'Expires: 0' );
    1112         echo $json; /* phpcs:ignore */
     1118        echo $json; // phpcs:ignore WordPress.Security.EscapeOutput
    11131119        exit();
    11141120
     
    11301136        header( 'Pragma: no-cache' );
    11311137        header( 'Expires: 0' );
    1132         echo $csv; /* phpcs:ignore */
     1138        echo $csv; // phpcs:ignore WordPress.Security.EscapeOutput
    11331139        exit();
    11341140
     
    11431149
    11441150        // Check we requested the support page.
    1145         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     1151        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    11461152            return;
    11471153        }
    11481154
    11491155        // Sanitize page.
    1150         $page = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     1156        $page = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    11511157
    11521158        // Redirect to Support.
    11531159        if ( $page === $this->plugin->name . '-support' ) {
    1154             wp_redirect( $this->plugin->support_url ); // phpcs:ignore
     1160            wp_redirect( $this->plugin->support_url ); // phpcs:ignore WordPress.Security.SafeRedirect
    11551161            die();
    11561162        }
     
    11581164        // Redirect to Upgrade.
    11591165        if ( $page === $this->plugin->name . '-upgrade' ) {
    1160             wp_redirect( $this->get_upgrade_url( 'menu' ) ); // phpcs:ignore
     1166            wp_redirect( $this->get_upgrade_url( 'menu' ) ); // phpcs:ignore WordPress.Security.SafeRedirect
    11611167            die();
    11621168        }
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/deactivation-modal.php

    r2688245 r2758024  
    1818        echo sprintf(
    1919            /* Translators: Plugin Name */
    20             esc_html__( 'Optional: We\'d be super grateful if you could take a moment to let us know why you\'re deactivating %s', $this->plugin->name ), /* phpcs:ignore */
     20            esc_html__( 'Optional: We\'d be super grateful if you could take a moment to let us know why you\'re deactivating %s', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    2121            esc_html( $this->plugin->displayName )
    2222        );
     
    4545            <p>
    4646                <label for="reason_text">
    47                     <?php esc_html_e( 'Optional: Was there a problem, any feedback or something we could do better?', $this->plugin->name ); /* phpcs:ignore */ ?>
     47                    <?php esc_html_e( 'Optional: Was there a problem, any feedback or something we could do better?', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    4848                </label>
    49                 <input type="text" id="reason_text" name="reason_text" value="" placeholder="<?php esc_attr_e( 'e.g. XYZ Plugin because it has this feature...', $this->plugin->name ); /* phpcs:ignore */ ?>" class="widefat" />
     49                <input type="text" id="reason_text" name="reason_text" value="" placeholder="<?php esc_attr_e( 'e.g. XYZ Plugin because it has this feature...', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="widefat" />
    5050            </p>
    5151
    5252            <p>
    53                 <label for="reason_email"><?php esc_html_e( 'Optional: Email Address', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     53                <label for="reason_email"><?php esc_html_e( 'Optional: Email Address', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    5454                <input type="email" id="reason_email" name="reason_email" value="" class="widefat" />
    5555                <small>
    5656                    <?php
    57                     esc_html_e( 'If you\'d like further discuss the problem / feature, enter your email address above and we\'ll be in touch.  This will *never* be used for any marketing.', $this->plugin->name ); /* phpcs:ignore */
     57                    esc_html_e( 'If you\'d like further discuss the problem / feature, enter your email address above and we\'ll be in touch.  This will *never* be used for any marketing.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    5858                    ?>
    5959                </small>
     
    6161        </div>
    6262
    63         <input type="submit" name="submit" value="<?php esc_attr_e( 'Deactivate', $this->plugin->name );  /* phpcs:ignore */ ?>" class="button button-primary" />
     63        <input type="submit" name="submit" value="<?php esc_attr_e( 'Deactivate', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="button button-primary" />
    6464    </form>
    6565</div>
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/footer-upgrade-embedded.php

    r2688245 r2758024  
    1818
    1919    <div class="wpzinc-option ignore-nth-child">
    20         <strong><?php esc_html_e( 'Support', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Access to one on one email support', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     20        <strong><?php esc_html_e( 'Support', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Access to one on one email support', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2121    </div>
    2222
    2323    <div class="wpzinc-option ignore-nth-child">
    24         <strong><?php esc_html_e( 'Documentation', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Detailed documentation on how to install and configure the plugin', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     24        <strong><?php esc_html_e( 'Documentation', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Detailed documentation on how to install and configure the plugin', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2525    </div>
    2626
    2727    <div class="wpzinc-option ignore-nth-child">
    28         <strong><?php esc_html_e( 'Updates', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Receive one click update notifications, right within your WordPress Adminstration panel', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     28        <strong><?php esc_html_e( 'Updates', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Receive one click update notifications, right within your WordPress Adminstration panel', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2929    </div>
    3030
    3131    <div class="wpzinc-option ignore-nth-child">
    32         <strong><?php esc_html_e( 'Seamless Upgrade', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Retain all current settings when upgrading to Pro', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     32        <strong><?php esc_html_e( 'Seamless Upgrade', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Retain all current settings when upgrading to Pro', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3333    </div>
    3434
    3535    <div class="wpzinc-option">
    3636        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary" rel="noopener" target="_blank">
    37             <?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     37            <?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3838        </a>
    3939    </div>
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/footer-upgrade.php

    r2688245 r2758024  
    1212    <div class="wpzinc-upgrade">
    1313        <h3>
    14             <?php esc_html_e( 'Upgrade to Pro', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     14            <?php esc_html_e( 'Upgrade to Pro', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1515        </h3>
    1616
     
    2727            ?>
    2828            <li>
    29                 <strong><?php esc_html_e( 'Support, Documentation and Updates', $this->base->plugin->name ); /* phpcs:ignore */ ?></strong>
    30                 <?php esc_html_e( 'Access to one on one email support, plus detailed documentation on how to install and configure the plugin and one click update notifications, right within the WordPress Administration panel.', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     29                <strong><?php esc_html_e( 'Support, Documentation and Updates', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></strong>
     30                <?php esc_html_e( 'Access to one on one email support, plus detailed documentation on how to install and configure the plugin and one click update notifications, right within the WordPress Administration panel.', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3131            </li>
    3232        </ul>
    3333
    34         <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary button-large" target="_blank"><?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); /* phpcs:ignore */ ?></a>
    35         <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-large" target="_blank"><?php esc_html_e( 'See all Features', $this->base->plugin->name ); /* phpcs:ignore */ ?></a>
     34        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary button-large" target="_blank"><?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></a>
     35        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-large" target="_blank"><?php esc_html_e( 'See all Features', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></a>
    3636    </div>
    3737    <?php
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/import-export.php

    r2688245 r2758024  
    1313
    1414        <span>
    15             <?php esc_html_e( 'Import &amp; Export', $this->plugin->name ); /* phpcs:ignore */ ?>
     15            <?php esc_html_e( 'Import &amp; Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1616        </span>
    1717    </h1>
     
    3737        <h2 class="nav-tab-wrapper wpzinc-horizontal-tabbed-ui">
    3838            <a href="<?php echo esc_url( $this->plugin->documentation_url ); ?>" class="nav-tab last documentation" rel="noopener" target="_blank">
    39                 <?php esc_html_e( 'Documentation', $this->plugin->name ); /* phpcs:ignore */ ?>
     39                <?php esc_html_e( 'Documentation', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    4040                <span class="dashicons dashicons-admin-page"></span>
    4141            </a>
     
    5353                                    <li class="wpzinc-nav-tab download">
    5454                                        <a href="#import" class="wpzinc-nav-tab-vertical-active">
    55                                              <?php esc_html_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?>
     55                                            <?php esc_html_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    5656                                        </a>
    5757                                    </li>
     
    7171                                    <li class="wpzinc-nav-tab upload">
    7272                                        <a href="#export">
    73                                              <?php esc_html_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?>
     73                                            <?php esc_html_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    7474                                        </a>
    7575                                    </li>
     
    8282                                        <div class="postbox">
    8383                                            <header>
    84                                                 <h3><?php esc_html_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?></h3>
     84                                                <h3><?php esc_html_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></h3>
    8585                                                <p class="description">
    86                                                     <?php esc_html_e( 'Upload a file generated by this Plugin\'s export functionality (JSON or zipped JSON).  This will overwrite any existing settings stored on this installation.', $this->plugin->name );  /* phpcs:ignore */ ?>
     86                                                    <?php esc_html_e( 'Upload a file generated by this Plugin\'s export functionality (JSON or zipped JSON).  This will overwrite any existing settings stored on this installation.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    8787                                                </p>
    8888                                            </header>
     
    9090                                            <div class="wpzinc-option">
    9191                                                <div class="left">
    92                                                     <label for="file"><?php esc_html_e( 'JSON File', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     92                                                    <label for="file"><?php esc_html_e( 'JSON File', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    9393                                                </div>
    9494                                                <div class="right">
     
    9898
    9999                                            <div class="wpzinc-option">
    100                                                 <input name="import" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?>" />             
     100                                                <input name="import" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" />             
    101101                                            </div>
    102102                                        </div>
     
    115115                                        <div class="postbox">
    116116                                            <header>
    117                                                 <h3><?php esc_html_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?></h3>
     117                                                <h3><?php esc_html_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></h3>
    118118                                                <p class="description">
    119                                                     <?php esc_html_e( 'To export this Plugin\'s settings, choose which item(s) to export, and click the Export button below.', $this->plugin->name ); /* phpcs:ignore */ ?>
     119                                                    <?php esc_html_e( 'To export this Plugin\'s settings, choose which item(s) to export, and click the Export button below.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    120120                                                    <br />
    121                                                     <?php esc_html_e( 'You can then import the generated file into another Plugin installation.', $this->plugin->name ); /* phpcs:ignore */ ?>
     121                                                    <?php esc_html_e( 'You can then import the generated file into another Plugin installation.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    122122                                                    <br />
    123                                                     <?php esc_html_e( 'Including this file in a support request? We recommend setting the Format option to "Export as JSON, Zipped".', $this->plugin->name ); /* phpcs:ignore */ ?>
     123                                                    <?php esc_html_e( 'Including this file in a support request? We recommend setting the Format option to "Export as JSON, Zipped".', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    124124                                                </p>
    125125                                            </header>
     
    131131                                             * @since   1.0.0
    132132                                             */
    133                                             do_action( str_replace( '-', '_', $this->plugin->name ) . '_export_view' ); /* phpcs:ignore */
     133                                            do_action( str_replace( '-', '_', $this->plugin->name ) . '_export_view' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
    134134                                            ?>
    135135
    136136                                            <div class="wpzinc-option">
    137137                                                <div class="left">
    138                                                     <label for="format"><?php esc_html_e( 'Format', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     138                                                    <label for="format"><?php esc_html_e( 'Format', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    139139                                                </div>
    140140                                                <div class="right">
    141141                                                    <select name="format" id="format" size="1">
    142                                                         <option value="json"><?php esc_html_e( 'JSON', $this->plugin->name ); /* phpcs:ignore */ ?></option>
    143                                                         <option value="zip"><?php esc_html_e( 'JSON, Zipped', $this->plugin->name ); /* phpcs:ignore */ ?></option>
     142                                                        <option value="json"><?php esc_html_e( 'JSON', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></option>
     143                                                        <option value="zip"><?php esc_html_e( 'JSON, Zipped', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></option>
    144144                                                    </select>
    145145                                                </div>
     
    147147
    148148                                            <div class="wpzinc-option">
    149                                                 <input name="export" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?>" />             
     149                                                <input name="export" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" />             
    150150                                            </div>
    151151                                        </div>
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/review-notice.php

    r2688245 r2758024  
    2222        echo sprintf(
    2323            /* translators: Plugin Name */
    24             esc_html__( 'We\'d be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?', $this->plugin->name ),  /* phpcs:ignore */
     24            esc_html__( 'We\'d be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    2525            esc_html( $this->plugin->displayName )
    2626        );
     
    2929    <p>
    3030        <a href="<?php echo esc_url( $this->get_review_url() ); ?>" class="button button-primary" target="_blank">
    31             <?php esc_html_e( 'Yes, Leave Review', $this->plugin->name ); /* phpcs:ignore */ ?>
     31            <?php esc_html_e( 'Yes, Leave Review', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3232        </a>
    3333        <a href="<?php echo esc_url( $this->plugin->support_url ); ?>" class="button" rel="noopener" target="_blank">
     
    3535            echo sprintf(
    3636                /* translators: Plugin Name */
    37                 esc_html__( 'No, I\'m having issues with %s', $this->plugin->name ), /* phpcs:ignore */
     37                esc_html__( 'No, I\'m having issues with %s', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    3838                esc_html( $this->plugin->displayName )
    3939            );
  • media-library-organizer/tags/1.4.6/_modules/dashboard/views/sidebar-upgrade.php

    r2688245 r2758024  
    1616<div class="postbox">
    1717    <h3 class="hndle">
    18         <?php esc_html_e( 'Keep Updated', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     18        <?php esc_html_e( 'Keep Updated', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1919    </h3>
    2020
    2121    <div class="wpzinc-option">
    2222        <p class="description">
    23             <?php esc_html_e( 'Subscribe to the newsletter and receive updates on our WordPress Plugins.', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     23            <?php esc_html_e( 'Subscribe to the newsletter and receive updates on our WordPress Plugins.', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2424        </p>
    2525    </div>
     
    2828        <div class="wpzinc-option">
    2929            <div class="full">                       
    30                 <input id="fieldEmail" name="cm-jdutdyj-jdutdyj" type="email" class="widefat" placeholder="<?php esc_attr_e( 'Your Email Address', $this->base->plugin->name ); /* phpcs:ignore */ ?>" class="widefat" required />
     30                <input id="fieldEmail" name="cm-jdutdyj-jdutdyj" type="email" class="widefat" placeholder="<?php esc_attr_e( 'Your Email Address', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="widefat" required />
    3131            </div>
    3232        </div>
    3333        <div class="wpzinc-option">
    3434            <div class="full">
    35                 <input type="submit" name="submit" value="<?php esc_attr_e( 'Subscribe', $this->base->plugin->name ); /* phpcs:ignore */ ?>" class="button button-primary" />
     35                <input type="submit" name="submit" value="<?php esc_attr_e( 'Subscribe', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="button button-primary" />
    3636            </div>
    3737        </div>
  • media-library-organizer/tags/1.4.6/addons/tree-view/class-media-library-organizer-tree-view.php

    r2688245 r2758024  
    177177            if ( is_admin() ) {
    178178                wp_die(
    179                     $error, /* phpcs:ignore */
     179                    esc_html( $error->get_error_message() ),
    180180                    esc_html__( 'Media Library Organizer: Tree View: Error', 'media-library-organizer' ),
    181181                    array(
     
    273273 * @since   1.1.1
    274274 */
    275 function Media_Library_Organizer_Tree_View() { /* phpcs:ignore */
     275function Media_Library_Organizer_Tree_View() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
    276276
    277277    return Media_Library_Organizer_Tree_View::get_instance();
  • media-library-organizer/tags/1.4.6/addons/tree-view/includes/global/class-media-library-organizer-tree-view-media.php

    r2688245 r2758024  
    5858     * @param   string    $ext        If defined, loads minified JS.
    5959     */
    60     public function enqueue_js( $screen, $screens, $mode, $ext ) { /* phpcs:ignore */
     60    public function enqueue_js( $screen, $screens, $mode, $ext ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    6161
    6262        // Bail if Tree View isn't enabled.
     
    420420        );
    421421        foreach ( $conditions as $condition ) {
    422             if ( ! isset( $_REQUEST[ $condition ] ) ) { /* phpcs:ignore */
     422            if ( ! isset( $_REQUEST[ $condition ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    423423                continue;
    424424            }
    425425
    426             if ( empty( $_REQUEST[ $condition ] ) ) { /* phpcs:ignore */
     426            if ( empty( $_REQUEST[ $condition ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    427427                continue;
    428428            }
    429429
    430             $args[ $condition ] = sanitize_text_field( $_REQUEST[ $condition ] ); /* phpcs:ignore */
     430            $args[ $condition ] = sanitize_text_field( $_REQUEST[ $condition ] ); // phpcs:ignore WordPress.Security.NonceVerification
    431431        }
    432432
  • media-library-organizer/tags/1.4.6/addons/tree-view/includes/global/class-media-library-organizer-tree-view-taxonomy-walker.php

    r2688245 r2758024  
    102102
    103103        // Sanitize request.
    104         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     104        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    105105
    106106        foreach ( $conditions as $condition ) {
  • media-library-organizer/tags/1.4.6/addons/tree-view/views/admin/media.php

    r2688245 r2758024  
    2727
    2828        <div id="media-library-organizer-tree-view-list"<?php echo ( $jstree_enabled ? ' class="media-library-organizer-tree-view-enabled"' : '' ); ?>>
    29             <?php echo $output; /* phpcs:ignore */ ?>
     29            <?php echo $output; // phpcs:ignore WordPress.Security.EscapeOutput ?>
    3030        </div>
    3131    </form>
  • media-library-organizer/tags/1.4.6/assets/css/media.css

    r2493585 r2758024  
    1 .media-library-organizer-feather-image{background:url(../../_modules/dashboard/assets/feather/image.svg) transparent no-repeat scroll 0 0;background-size:16px 16px;width:16px;height:16px;display:inline-block;vertical-align:text-top}div.selectize-control{display:inline-block;min-width:160px;vertical-align:middle;line-height:1}form.compat-item table.compat-attachment-fields p.help{margin:0}form.compat-item table.compat-attachment-fields tr th{display:block;width:100%;margin:5px 0 0 0;padding:5px 0 0 0;border:none;border-top:1px solid #ddd}form.compat-item table.compat-attachment-fields tr th label span{text-align:left;font-weight:600}form.compat-item table.compat-attachment-fields tr td.field{clear:both;float:left;width:100%;margin:0;border:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel{margin-top:-2px;min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #ddd;background-color:#fdfdfd}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist{list-style:none;margin:15px 0;padding:0}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist li{line-height:1.7}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist ul{margin-left:18px}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields{display:grid;grid-gap:10px;grid-template-columns:4fr 1fr}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields.hidden{display:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv input[type=checkbox]{margin:0 3px 0 0}table.media .column-title .has-media-icon~.row-actions{clear:both;margin-left:0}#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{display:grid;column-gap:10px;row-gap:10px;box-sizing:border-box;margin:10px 0;max-width:33%;width:33%;grid-template-columns:1fr 4fr;grid-template-rows:32px;grid-template-areas:"searchlabel search"}#posts-filter .search-form label.media-search-input-label,.media-frame-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label,.media-modal-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label{position:static !important;line-height:32px;text-align:right;grid-area:searchlabel}#posts-filter .search-form input#media-search-input,.media-frame-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input,.media-modal-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input{grid-area:search;width:100% !important;margin:0;height:32px;line-height:32px}.media-modal-content .media-frame-title h1:before{content:"";margin:0}.media-modal-content .media-attachments-filter-heading:before{content:"";margin:0}.media-modal-content .media-frame .media-toolbar select.attachment-filters{width:auto !important}.media-modal-content .attachments-browser .media-toolbar{height:50px;background-color:#f3f3f3;border-bottom:1px solid #ddd}.media-modal-content .attachments-browser .attachments{top:50px}.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:66%;width:66%}.media-modal-content .attachments-browser .media-toolbar-secondary h2{display:none}.media-modal-content .attachments-browser .media-toolbar-secondary select{margin-top:10px}.media-modal-content .media-content{position:absolute;left:0;padding:20px}.media-modal-content .media-content.has-sidebar{right:300px}.media-modal-content .media-content .media-library-organizer-modal-content-field{padding:0 0 20px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns{display:grid;grid-gap:10px}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-2{grid-template-columns:repeat(2, 50%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-3{grid-template-columns:repeat(3, 33%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-4{grid-template-columns:repeat(4, 25%)}.media-modal-content .media-content .media-library-organizer-modal-content-field label{display:block;font-size:15px;margin:0 0 5px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field input,.media-modal-content .media-content .media-library-organizer-modal-content-field select{font-size:15px}@media only screen and (max-width: 1840px){.media-modal-content .attachments-browser .media-toolbar{height:90px}.media-modal-content .attachments-browser .attachments{top:90px}}@media only screen and (max-width: 1330px){.media-modal-content .attachments-browser .media-toolbar{height:130px}.media-modal-content .attachments-browser .attachments{top:130px}}@media only screen and (max-width: 1000px){.media-modal-content .attachments-browser .media-toolbar{height:170px}.media-modal-content .attachments-browser .attachments{top:170px}}@media only screen and (max-width: 900px){.media-modal-content .attachments-browser .media-toolbar{height:210px}.media-modal-content .attachments-browser .attachments{top:210px}}@media only screen and (max-width: 640px){.media-modal-content .attachments-browser .media-toolbar{height:160px}.media-modal-content .attachments-browser .attachments{top:160px}}@media only screen and (max-width: 1000px){#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{max-width:100%;width:100%;grid-template-columns:50px auto;grid-template-rows:32px;grid-template-areas:"searchlabel search"}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:100%;width:100%;height:auto}}@media only screen and (max-width: 782px){div.media-library-organizer-selectize,div.media-library-organizer-selectize-search{width:200px}div.media-library-organizer-selectize .selectize-input,div.media-library-organizer-selectize-search .selectize-input{min-height:40px;font-size:16px;line-height:1.625;padding:5px 24px 5px 8px}}
     1.media-library-organizer-feather-image{background:url(../../_modules/dashboard/assets/feather/image.svg) rgba(0,0,0,0) no-repeat scroll 0 0;background-size:16px 16px;width:16px;height:16px;display:inline-block;vertical-align:text-top}div.selectize-control{display:inline-block;min-width:160px;vertical-align:middle;line-height:1}form.compat-item table.compat-attachment-fields p.help{margin:0}form.compat-item table.compat-attachment-fields tr th{display:block;width:100%;margin:5px 0 0 0;padding:5px 0 0 0;border:none;border-top:1px solid #ddd}form.compat-item table.compat-attachment-fields tr th label span{text-align:left;font-weight:600}form.compat-item table.compat-attachment-fields tr td.field{clear:both;float:left;width:100%;margin:0;border:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel{margin-top:-2px;min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #ddd;background-color:#fdfdfd}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist{list-style:none;margin:15px 0;padding:0}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist li{line-height:1.7}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist ul{margin-left:18px}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields{display:grid;grid-gap:10px;grid-template-columns:4fr 1fr}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields.hidden{display:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv input[type=checkbox]{margin:0 3px 0 0}table.media .column-title .has-media-icon~.row-actions{clear:both;margin-left:0}#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{display:grid;column-gap:10px;row-gap:10px;box-sizing:border-box;margin:10px 0;max-width:33%;width:33%;grid-template-columns:1fr 4fr;grid-template-rows:32px;grid-template-areas:"searchlabel search"}#posts-filter .search-form label.media-search-input-label,.media-frame-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label,.media-modal-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label{position:static !important;line-height:32px;text-align:right;grid-area:searchlabel}#posts-filter .search-form input#media-search-input,.media-frame-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input,.media-modal-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input{grid-area:search;width:100% !important;margin:0;height:32px;line-height:32px}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{padding-bottom:10px}.media-modal-content .media-frame-title h1:before{content:"";margin:0}.media-modal-content .media-attachments-filter-heading:before{content:"";margin:0}.media-modal-content .media-frame .media-toolbar select.attachment-filters{width:auto !important}.media-modal-content .attachments-browser .media-toolbar{height:auto;background-color:#f3f3f3;border-bottom:1px solid #ddd}.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:66%;width:66%}.media-modal-content .attachments-browser .media-toolbar-secondary h2{display:none}.media-modal-content .attachments-browser .media-toolbar-secondary select{margin-top:10px}.media-modal-content .media-content{position:absolute;left:0;padding:20px}.media-modal-content .media-content.has-sidebar{right:300px}.media-modal-content .media-content .media-library-organizer-modal-content-field{padding:0 0 20px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns{display:grid;grid-gap:10px}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-2{grid-template-columns:repeat(2, 50%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-3{grid-template-columns:repeat(3, 33%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-4{grid-template-columns:repeat(4, 25%)}.media-modal-content .media-content .media-library-organizer-modal-content-field label{display:block;font-size:15px;margin:0 0 5px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field input,.media-modal-content .media-content .media-library-organizer-modal-content-field select{font-size:15px}@media only screen and (max-width: 1000px){#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{max-width:100%;width:100%;grid-template-columns:50px auto;grid-template-rows:32px;grid-template-areas:"searchlabel search"}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:100%;width:100%;height:auto}}@media only screen and (max-width: 782px){div.media-library-organizer-selectize,div.media-library-organizer-selectize-search{width:200px}div.media-library-organizer-selectize .selectize-input,div.media-library-organizer-selectize-search .selectize-input{min-height:40px;font-size:16px;line-height:1.625;padding:5px 24px 5px 8px}}
  • media-library-organizer/tags/1.4.6/assets/js/media.js

    r2692053 r2758024  
    573573        wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend(
    574574            {
    575 
    576                 /**
    577                  * When the toolbar is created, add our custom filters to it, which
    578                  * are rendered as select dropdowns.
    579                  *
    580                  * @since   1.0.0
    581                  */
     575                    /**
     576                     * When the toolbar is created, add our custom filters to it, which
     577                     * are rendered as select dropdowns.
     578                     *
     579                     * @since   1.0.0
     580                     */
    582581                createToolbar: function() {
    583582
    584583                    // Make sure to load the original toolbar.
    585584                    AttachmentsBrowser.prototype.createToolbar.call( this );
     585
     586                    // Bail if search is not included in the toolbar, as this means we're on a grid view
     587                    // that doesn't display filters, such as Edit Gallery.
     588                    if ( ! this.options.search ) {
     589                        return;
     590                    }
    586591
    587592                    // Define the priority order at which these filters should begin output in the Grid View Toolbar.
     
    603608                        );
    604609
    605                         // Increment priority so the order of filters remains the same
    606                         // if they're subsequently updated by calling mediaLibraryOrganizerGridViewInitializeTaxonomyFilter().
    607                         priority++;
    608                     }
    609 
    610                     // Add the orderby filter to the toolbar.
     610                            // Increment priority so the order of filters remains the same
     611                            // if they're subsequently updated by calling mediaLibraryOrganizerGridViewInitializeTaxonomyFilter().
     612                            priority++;
     613                    }
     614
     615                        // Add the orderby filter to the toolbar.
    611616                    if ( media_library_organizer_media.settings.orderby_enabled == 1 ) {
    612617                        this.toolbar.set(
     
    626631                    }
    627632
    628                     // Add the order filter to the toolbar.
     633                        // Add the order filter to the toolbar.
    629634                    if ( media_library_organizer_media.settings.order_enabled == 1 ) {
    630635                        this.toolbar.set(
     
    644649                    }
    645650
    646                     // Fire the mlo:grid:filters:add event that Addons can hook into and add their own Filters now.
    647                     wp.media.events.trigger(
    648                         'mlo:grid:filters:add',
    649                         {
    650                             attachments_browser: this,
    651                             priority: priority
    652                         }
     651                        // Fire the mlo:grid:filters:add event that Addons can hook into and add their own Filters now.
     652                        wp.media.events.trigger(
     653                            'mlo:grid:filters:add',
     654                            {
     655                                attachments_browser: this,
     656                                priority: priority
     657                            }
     658                        );
     659
     660                        // Fire the mlo:grid:bulk_select:enabled event that Addons can hook into and listen
     661                        // when Bulk select is enabled by clicking the Bulk Select button.
     662                        this.controller.on(
     663                            'select:activate',
     664                            function() {
     665                                wp.media.events.trigger( 'mlo:grid:bulk_select:enabled' );
     666                            }
     667                        );
     668
     669                        // Fire the mlo:grid:bulk_select:disabled event that Addons can hook into and listen
     670                        // when Bulk select is disabled by clicking the Cancel button.
     671                        this.controller.on(
     672                            'select:deactivate',
     673                            function() {
     674                                wp.media.events.trigger( 'mlo:grid:bulk_select:disabled' );
     675                            }
     676                        );
     677
     678                        // Fire the mlo:grid:attachments:bulk_actions:done event that Addons can hook into and listen
     679                        // when a Bulk select action (e.g. Delete) completes.
     680                        this.controller.on(
     681                            'selection:action:done',
     682                            function() {
     683                                wp.media.events.trigger( 'mlo:grid:attachments:bulk_actions:done' );
     684                            }
     685                        );
     686
     687                        // Store the toolbar in a var so we can interact with it later.
     688                        MediaLibraryOrganizerAttachmentsBrowser = this;
     689
     690                },
     691
     692                createAttachmentsHeading: function() {
     693
     694                    // Make sure to load the original attachments heading. Check if we still need this function.
     695                    AttachmentsBrowser.prototype.createAttachmentsHeading.call( this );
     696
     697                },
     698
     699                    /**
     700                     * Set attachment wrapper view top to match the height of the toolbar, so attachments
     701                     * are not cut off.
     702                     */
     703                createAttachmentsWrapperView: function() {
     704
     705                    // Make sure to load the original attachments wrapper view.
     706                    AttachmentsBrowser.prototype.createAttachmentsWrapperView.call( this );
     707
     708                    // Set wrapper offset on load.
     709                    setTimeout(
     710                        function() {
     711                            MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top = ( MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight + 10 ) + 'px';
     712                        },
     713                        500
    653714                    );
    654715
    655                     // Fire the mlo:grid:bulk_select:enabled event that Addons can hook into and listen
    656                     // when Bulk select is enabled by clicking the Bulk Select button.
    657                     this.controller.on(
    658                         'select:activate',
    659                         function() {
    660                             wp.media.events.trigger( 'mlo:grid:bulk_select:enabled' );
    661                         }
    662                     );
    663 
    664                     // Fire the mlo:grid:bulk_select:disabled event that Addons can hook into and listen
    665                     // when Bulk select is disabled by clicking the Cancel button.
    666                     this.controller.on(
    667                         'select:deactivate',
    668                         function() {
    669                             wp.media.events.trigger( 'mlo:grid:bulk_select:disabled' );
    670                         }
    671                     );
    672 
    673                     // Fire the mlo:grid:attachments:bulk_actions:done event that Addons can hook into and listen
    674                     // when a Bulk select action (e.g. Delete) completes.
    675                     this.controller.on(
    676                         'selection:action:done',
    677                         function() {
    678                             wp.media.events.trigger( 'mlo:grid:attachments:bulk_actions:done' );
    679                         }
    680                     );
    681 
    682                     // Store the toolbar in a var so we can interact with it later.
    683                     MediaLibraryOrganizerAttachmentsBrowser = this;
     716                    // Update wrapper offset on window resize.
     717                    window.onresize = function() {
     718                        MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top = ( MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight + 10 ) + 'px';
     719                    }
    684720
    685721                },
    686 
    687                 createAttachmentsHeading: function() {
    688 
    689                     // Make sure to load the original attachments heading.
    690                     AttachmentsBrowser.prototype.createAttachmentsHeading.call( this );
    691 
    692                 }
    693722
    694723            }
     
    11321161        }
    11331162
    1134         if ( mediaLibraryOrganizerUploader ) {
     1163        if ( mediaLibraryOrganizerUploader && typeof mediaLibraryOrganizerUploader.uploader !== 'undefined' ) {
    11351164            var selected_terms = {};
    11361165            for ( let taxonomy_name in media_library_organizer_media.taxonomies ) {
     
    11581187    function( atts ) {
    11591188
    1160         if ( mediaLibraryOrganizerUploader ) {
     1189        if ( mediaLibraryOrganizerUploader && typeof mediaLibraryOrganizerUploader.uploader !== 'undefined' ) {
    11611190            mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[ atts.taxonomy_name ] = atts.slug;
    11621191        }
  • media-library-organizer/tags/1.4.6/assets/js/min/media-min.js

    r2692053 r2758024  
    1 function mediaLibraryOrganizerQueryInitialize(){!function(){wp.media.query=function(e){return new wp.media.model.Attachments(null,{props:_.extend(_.defaults(e||{},{orderby:media_library_organizer_media.defaults.orderby,order:media_library_organizer_media.defaults.order}),{query:!0})})};var e=wp.media.model.Query,r;_.extend(e,{get:(r=[],function(i,a){var t={},n=e.orderby,o=e.defaultProps,d,m=!1;return delete i.query,delete i.cache,_.defaults(i,o),i.order=i.order.toUpperCase(),"DESC"!==i.order&&"ASC"!==i.order&&(i.order=o.order.toUpperCase()),_.contains(n.allowed,i.orderby)||(i.orderby=o.orderby),_.each(["include","exclude"],(function(e){i[e]&&!_.isArray(i[e])&&(i[e]=[i[e]])})),_.each(i,(function(r,i){_.isNull(r)||(t[e.propmap[i]||i]=r)})),_.defaults(t,e.defaultArgs),t.orderby=n.valuemap[i.orderby]||i.orderby,m=!1,r=[],d||(d=new e([],_.extend(a||{},{props:i,args:t})),r.push(d)),wp.media.events.trigger("mlo:grid:query",{query:d}),d})})}(jQuery,_)}function mediaLibraryOrganizerUploaderInitializeEvents(){!function($,e){void 0!==wp.Uploader&&e.extend(wp.Uploader.prototype,{init:function(){wp.media.events.trigger("mlo:grid:attachment:upload:init")},added:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:added",e)},progress:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:progress",e)},success:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:success",e)},error:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:error",e)},complete:function(){wp.media.events.trigger("mlo:grid:attachment:upload:complete")},refresh:function(){wp.media.events.trigger("mlo:grid:attachment:upload:refresh")}})}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(){!function(){for(let e in media_library_organizer_media.taxonomies)mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,media_library_organizer_media.taxonomies[e].terms,media_library_organizer_media.taxonomies[e].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned,media_library_organizer_media.show_attachment_count)}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t){jQuery,_,"0"!=media_library_organizer_media.settings[e+"_enabled"]&&media_library_organizer_media.settings[e+"_enabled"]&&(MediaLibraryOrganizerTaxonomyFilter[e]=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter-"+e,createFilters:function(){var n={},o,o;_.each(r||{},(function(r,i){var a={};a[e]=r.slug;var o=r.name+("1"===t?" ("+r.count+")":"");n[i]={text:o,props:a}})),(o={})[e]="",n.all={text:i,props:o,priority:10},(o={})[e]="-1",n.unassigned={text:a,props:o,priority:10},this.filters=n},change:function(){var r=this.filters[this.el.value];r&&(this.model.set(r.props),wp.media.events.trigger("mlo:grid:filter:change:term",{taxonomy_name:e,slug:r.props[e]}))},select:function(){var e=this.model,r="all",i=e.toJSON();wp.media.events.trigger("mlo:grid:filter:select",{props:i}),_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderByFilter(){jQuery,_,1==media_library_organizer_media.settings.orderby_enabled&&(MediaLibraryOrganizerTaxonomyOrderBy=wp.media.view.AttachmentFilters.extend({id:"media-attachment-orderby",createFilters:function(){var e={};_.each(media_library_organizer_media.orderby||{},(function(r,i){e[i]={text:r,props:{orderby:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderFilter(){jQuery,_,1==media_library_organizer_media.settings.order_enabled&&(MediaLibraryOrganizerTaxonomyOrder=wp.media.view.AttachmentFilters.extend({id:"media-attachment-order",createFilters:function(){var e={};_.each(media_library_organizer_media.order||{},(function(r,i){e[i]={text:r,props:{order:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewAddFiltersToToolbar(){var e;jQuery,_,e=wp.media.view.AttachmentsBrowser,wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){e.prototype.createToolbar.call(this);var r=-75;for(let e in MediaLibraryOrganizerTaxonomyFilter)this.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:this.controller,model:this.collection.props,priority:r}).render()),r++;1==media_library_organizer_media.settings.orderby_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrderBy",new MediaLibraryOrganizerTaxonomyOrderBy({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),1==media_library_organizer_media.settings.order_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrder",new MediaLibraryOrganizerTaxonomyOrder({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),wp.media.events.trigger("mlo:grid:filters:add",{attachments_browser:this,priority:r}),this.controller.on("select:activate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:enabled")})),this.controller.on("select:deactivate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:disabled")})),this.controller.on("selection:action:done",(function(){wp.media.events.trigger("mlo:grid:attachments:bulk_actions:done")})),MediaLibraryOrganizerAttachmentsBrowser=this},createAttachmentsHeading:function(){e.prototype.createAttachmentsHeading.call(this)}})}function mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(){!function($,e){var r;$("body").on("click","table.compat-attachment-fields a.taxonomy-add-new",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm($(this).data("taxonomy"))})),$("body").on("click","table.compat-attachment-fields div.mlo-taxonomy-term-add-fields input[type=button]",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentAddTerm($(this).data("taxonomy"),$("input[type=text]",$(this).parent()).val())})),e.extend(wp.media.view.Attachment.prototype,{updateSave:function(e){var i=this._save=this._save||{status:"ready"};return e&&e!==i.status&&(this.$el.removeClass("save-"+i.status),i.status=e),this.$el.addClass("save-"+i.status),"waiting"!=r||"ready"!=i.status&&"complete"!=i.status||wp.media.events.trigger("mlo:grid:edit-attachment:edited",{attachment_id:this.model.id,attachment:this.model.attributes,changed:this.model.changed,taxonomy_term_changed:void 0!==this.model.changed.compat}),r=i.status,this}}),e.extend(wp.media.view.Attachment.Details.prototype,{moveFocus:function(){wp.media.events.trigger("mlo:grid:edit-attachment:deleted"),this.previousAttachment.length?this.previousAttachment.focus():this.nextAttachment.length?this.nextAttachment.focus():this.controller.uploader&&this.controller.uploader.$browser?this.controller.uploader.$browser.focus():this.moveFocusToLastFallback()}})}(jQuery,_)}function mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e,r,i,a,t){var $;$=jQuery,MediaLibraryOrganizerTaxonomyFilter.hasOwnProperty(e)&&(mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t),MediaLibraryOrganizerAttachmentsBrowser.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:MediaLibraryOrganizerAttachmentsBrowser.controller,model:MediaLibraryOrganizerAttachmentsBrowser.collection.props,priority:-75}).render()))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomies_terms.action,nonce:media_library_organizer_media.get_taxonomies_terms.nonce},(function(e){if(e.success)for(let r in e.data)mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data[r].taxonomy.name,e.data[r].terms,e.data[r].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned);else alert(e.data)}))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilter(e){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomy_terms.action,nonce:media_library_organizer_media.get_taxonomy_terms.nonce,taxonomy_name:e},(function(e){e.success?mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data.taxonomy.name,e.data.terms,e.data.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned):alert(e.data)}))}function mediaLibraryOrganizerListViewReplaceTaxonomyFilter(e,r,i){var $;($=jQuery)("select#"+e).replaceWith(r),i.length>0&&$("select#"+e).val(i)}function mediaLibraryOrganizerListViewUpdateAttachmentTerms(e,r,i){var $;($=jQuery)("td.taxonomy-"+e+" a").each((function(){$(this).text()==r.name&&(i?($(this).text(i.name),$(this).attr("href","upload.php?taxonomy="+e+"&term="+i.slug)):$(this).remove())})),$("td.taxonomy-"+e).each((function(){$(this).html($(this).html().replace(/(^\s*,)|(,\s*$)/g,""))}))}function mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e).hasClass("hidden")?$(".mlo-taxonomy-term-add-fields."+e).removeClass("hidden"):$(".mlo-taxonomy-term-add-fields."+e).addClass("hidden")}function mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e+"input[type=text]").val("")}function mediaLibraryOrganizerEditAttachmentAddTerm(e,r,i){var $,a;$=jQuery,a={action:media_library_organizer_media.create_term.action,nonce:media_library_organizer_media.create_term.nonce,taxonomy_name:e,term_name:r,term_parent_id:i},$.post(media_library_organizer_media.ajaxurl,a,(function(r){r.success?(wp.media.events.trigger("mlo:grid:edit-attachment:added:term",r.data),$("ul#"+r.data.term.taxonomy+"checklist").prepend(r.data.checkbox),mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e),$("ul#"+r.data.term.taxonomy+'checklist li:first input[type="checkbox"]').trigger("change")):alert(r.data)}))}function mediaLibraryOrganizerGridViewRefresh(){void 0!==wp.media.frame.library?wp.media.frame.library.props.set({ignore:+new Date}):wp.media.frame.content.get().collection.props.set({ignore:+new Date})}function mediaLibraryOrganizerInitialize(){mediaLibraryOrganizerQueryInitialize(),mediaLibraryOrganizerUploaderInitializeEvents(),mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(),mediaLibraryOrganizerGridViewInitializeOrderByFilter(),mediaLibraryOrganizerGridViewInitializeOrderFilter(),mediaLibraryOrganizerGridViewAddFiltersToToolbar(),mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(),jQuery(document).ready((function($){"undefined"!=typeof mediaLibraryOrganizerSelectizeInit&&mediaLibraryOrganizerSelectizeInit()}))}var mediaLibraryOrganizerUploader=!1,MediaLibraryOrganizerTaxonomyFilter={},MediaLibraryOrganizerTaxonomyOrderBy,MediaLibraryOrganizerTaxonomyOrder,MediaLibraryOrganizerAttachmentsBrowser;wp.media.events.on("mlo:grid:attachment:upload:init",(function(){if(mediaLibraryOrganizerUploader||void 0===wp.media.frame.uploader||(mediaLibraryOrganizerUploader=wp.media.frame.uploader),mediaLibraryOrganizerUploader){var e={};for(let r in media_library_organizer_media.taxonomies)e[r]=media_library_organizer_media.taxonomies[r].selected_term;mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer=e}})),wp.media.events.on("mlo:grid:filter:change:term",(function(e){mediaLibraryOrganizerUploader&&(mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[e.taxonomy_name]=e.slug)})),wp.media.events.on("mlo:grid:attachment:upload:success",(function(e){mediaLibraryOrganizerGridViewRefresh()})),wp.media.events.on("mlo:grid:edit-attachment:added:term",(function(e){mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.taxonomy.name,e.terms,e.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned)})),wp.media.events.on("mlo:grid:edit-attachment:edited",(function(e){var $;$=jQuery,e.taxonomy_term_changed&&(mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(),mediaLibraryOrganizerGridViewRefresh())})),wp.media.events.on("mlo:grid:edit-attachment:deleted",(function(e){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),wp.media.events.on("mlo:grid:bulk_select:disabled",(function(){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),mediaLibraryOrganizerInitialize();
     1function mediaLibraryOrganizerQueryInitialize(){!function(){wp.media.query=function(e){return new wp.media.model.Attachments(null,{props:_.extend(_.defaults(e||{},{orderby:media_library_organizer_media.defaults.orderby,order:media_library_organizer_media.defaults.order}),{query:!0})})};var e=wp.media.model.Query,r;_.extend(e,{get:(r=[],function(i,a){var t={},n=e.orderby,o=e.defaultProps,d,m=!1;return delete i.query,delete i.cache,_.defaults(i,o),i.order=i.order.toUpperCase(),"DESC"!==i.order&&"ASC"!==i.order&&(i.order=o.order.toUpperCase()),_.contains(n.allowed,i.orderby)||(i.orderby=o.orderby),_.each(["include","exclude"],(function(e){i[e]&&!_.isArray(i[e])&&(i[e]=[i[e]])})),_.each(i,(function(r,i){_.isNull(r)||(t[e.propmap[i]||i]=r)})),_.defaults(t,e.defaultArgs),t.orderby=n.valuemap[i.orderby]||i.orderby,m=!1,r=[],d||(d=new e([],_.extend(a||{},{props:i,args:t})),r.push(d)),wp.media.events.trigger("mlo:grid:query",{query:d}),d})})}(jQuery,_)}function mediaLibraryOrganizerUploaderInitializeEvents(){!function($,e){void 0!==wp.Uploader&&e.extend(wp.Uploader.prototype,{init:function(){wp.media.events.trigger("mlo:grid:attachment:upload:init")},added:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:added",e)},progress:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:progress",e)},success:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:success",e)},error:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:error",e)},complete:function(){wp.media.events.trigger("mlo:grid:attachment:upload:complete")},refresh:function(){wp.media.events.trigger("mlo:grid:attachment:upload:refresh")}})}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(){!function(){for(let e in media_library_organizer_media.taxonomies)mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,media_library_organizer_media.taxonomies[e].terms,media_library_organizer_media.taxonomies[e].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned,media_library_organizer_media.show_attachment_count)}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t){jQuery,_,"0"!=media_library_organizer_media.settings[e+"_enabled"]&&media_library_organizer_media.settings[e+"_enabled"]&&(MediaLibraryOrganizerTaxonomyFilter[e]=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter-"+e,createFilters:function(){var n={},o,o;_.each(r||{},(function(r,i){var a={};a[e]=r.slug;var o=r.name+("1"===t?" ("+r.count+")":"");n[i]={text:o,props:a}})),(o={})[e]="",n.all={text:i,props:o,priority:10},(o={})[e]="-1",n.unassigned={text:a,props:o,priority:10},this.filters=n},change:function(){var r=this.filters[this.el.value];r&&(this.model.set(r.props),wp.media.events.trigger("mlo:grid:filter:change:term",{taxonomy_name:e,slug:r.props[e]}))},select:function(){var e=this.model,r="all",i=e.toJSON();wp.media.events.trigger("mlo:grid:filter:select",{props:i}),_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderByFilter(){jQuery,_,1==media_library_organizer_media.settings.orderby_enabled&&(MediaLibraryOrganizerTaxonomyOrderBy=wp.media.view.AttachmentFilters.extend({id:"media-attachment-orderby",createFilters:function(){var e={};_.each(media_library_organizer_media.orderby||{},(function(r,i){e[i]={text:r,props:{orderby:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderFilter(){jQuery,_,1==media_library_organizer_media.settings.order_enabled&&(MediaLibraryOrganizerTaxonomyOrder=wp.media.view.AttachmentFilters.extend({id:"media-attachment-order",createFilters:function(){var e={};_.each(media_library_organizer_media.order||{},(function(r,i){e[i]={text:r,props:{order:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewAddFiltersToToolbar(){var e;jQuery,_,e=wp.media.view.AttachmentsBrowser,wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){if(e.prototype.createToolbar.call(this),this.options.search){var r=-75;for(let e in MediaLibraryOrganizerTaxonomyFilter)this.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:this.controller,model:this.collection.props,priority:r}).render()),r++;1==media_library_organizer_media.settings.orderby_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrderBy",new MediaLibraryOrganizerTaxonomyOrderBy({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),1==media_library_organizer_media.settings.order_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrder",new MediaLibraryOrganizerTaxonomyOrder({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),wp.media.events.trigger("mlo:grid:filters:add",{attachments_browser:this,priority:r}),this.controller.on("select:activate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:enabled")})),this.controller.on("select:deactivate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:disabled")})),this.controller.on("selection:action:done",(function(){wp.media.events.trigger("mlo:grid:attachments:bulk_actions:done")})),MediaLibraryOrganizerAttachmentsBrowser=this}},createAttachmentsHeading:function(){e.prototype.createAttachmentsHeading.call(this)},createAttachmentsWrapperView:function(){e.prototype.createAttachmentsWrapperView.call(this),setTimeout((function(){MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top=MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight+10+"px"}),500),window.onresize=function(){MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top=MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight+10+"px"}}})}function mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(){!function($,e){var r;$("body").on("click","table.compat-attachment-fields a.taxonomy-add-new",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm($(this).data("taxonomy"))})),$("body").on("click","table.compat-attachment-fields div.mlo-taxonomy-term-add-fields input[type=button]",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentAddTerm($(this).data("taxonomy"),$("input[type=text]",$(this).parent()).val())})),e.extend(wp.media.view.Attachment.prototype,{updateSave:function(e){var i=this._save=this._save||{status:"ready"};return e&&e!==i.status&&(this.$el.removeClass("save-"+i.status),i.status=e),this.$el.addClass("save-"+i.status),"waiting"!=r||"ready"!=i.status&&"complete"!=i.status||wp.media.events.trigger("mlo:grid:edit-attachment:edited",{attachment_id:this.model.id,attachment:this.model.attributes,changed:this.model.changed,taxonomy_term_changed:void 0!==this.model.changed.compat}),r=i.status,this}}),e.extend(wp.media.view.Attachment.Details.prototype,{moveFocus:function(){wp.media.events.trigger("mlo:grid:edit-attachment:deleted"),this.previousAttachment.length?this.previousAttachment.focus():this.nextAttachment.length?this.nextAttachment.focus():this.controller.uploader&&this.controller.uploader.$browser?this.controller.uploader.$browser.focus():this.moveFocusToLastFallback()}})}(jQuery,_)}function mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e,r,i,a,t){var $;$=jQuery,MediaLibraryOrganizerTaxonomyFilter.hasOwnProperty(e)&&(mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t),MediaLibraryOrganizerAttachmentsBrowser.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:MediaLibraryOrganizerAttachmentsBrowser.controller,model:MediaLibraryOrganizerAttachmentsBrowser.collection.props,priority:-75}).render()))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomies_terms.action,nonce:media_library_organizer_media.get_taxonomies_terms.nonce},(function(e){if(e.success)for(let r in e.data)mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data[r].taxonomy.name,e.data[r].terms,e.data[r].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned);else alert(e.data)}))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilter(e){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomy_terms.action,nonce:media_library_organizer_media.get_taxonomy_terms.nonce,taxonomy_name:e},(function(e){e.success?mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data.taxonomy.name,e.data.terms,e.data.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned):alert(e.data)}))}function mediaLibraryOrganizerListViewReplaceTaxonomyFilter(e,r,i){var $;($=jQuery)("select#"+e).replaceWith(r),i.length>0&&$("select#"+e).val(i)}function mediaLibraryOrganizerListViewUpdateAttachmentTerms(e,r,i){var $;($=jQuery)("td.taxonomy-"+e+" a").each((function(){$(this).text()==r.name&&(i?($(this).text(i.name),$(this).attr("href","upload.php?taxonomy="+e+"&term="+i.slug)):$(this).remove())})),$("td.taxonomy-"+e).each((function(){$(this).html($(this).html().replace(/(^\s*,)|(,\s*$)/g,""))}))}function mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e).hasClass("hidden")?$(".mlo-taxonomy-term-add-fields."+e).removeClass("hidden"):$(".mlo-taxonomy-term-add-fields."+e).addClass("hidden")}function mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e+"input[type=text]").val("")}function mediaLibraryOrganizerEditAttachmentAddTerm(e,r,i){var $,a;$=jQuery,a={action:media_library_organizer_media.create_term.action,nonce:media_library_organizer_media.create_term.nonce,taxonomy_name:e,term_name:r,term_parent_id:i},$.post(media_library_organizer_media.ajaxurl,a,(function(r){r.success?(wp.media.events.trigger("mlo:grid:edit-attachment:added:term",r.data),$("ul#"+r.data.term.taxonomy+"checklist").prepend(r.data.checkbox),mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e),$("ul#"+r.data.term.taxonomy+'checklist li:first input[type="checkbox"]').trigger("change")):alert(r.data)}))}function mediaLibraryOrganizerGridViewRefresh(){void 0!==wp.media.frame.library?wp.media.frame.library.props.set({ignore:+new Date}):wp.media.frame.content.get().collection.props.set({ignore:+new Date})}function mediaLibraryOrganizerInitialize(){mediaLibraryOrganizerQueryInitialize(),mediaLibraryOrganizerUploaderInitializeEvents(),mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(),mediaLibraryOrganizerGridViewInitializeOrderByFilter(),mediaLibraryOrganizerGridViewInitializeOrderFilter(),mediaLibraryOrganizerGridViewAddFiltersToToolbar(),mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(),jQuery(document).ready((function($){"undefined"!=typeof mediaLibraryOrganizerSelectizeInit&&mediaLibraryOrganizerSelectizeInit()}))}var mediaLibraryOrganizerUploader=!1,MediaLibraryOrganizerTaxonomyFilter={},MediaLibraryOrganizerTaxonomyOrderBy,MediaLibraryOrganizerTaxonomyOrder,MediaLibraryOrganizerAttachmentsBrowser;wp.media.events.on("mlo:grid:attachment:upload:init",(function(){if(mediaLibraryOrganizerUploader||void 0===wp.media.frame.uploader||(mediaLibraryOrganizerUploader=wp.media.frame.uploader),mediaLibraryOrganizerUploader&&void 0!==mediaLibraryOrganizerUploader.uploader){var e={};for(let r in media_library_organizer_media.taxonomies)e[r]=media_library_organizer_media.taxonomies[r].selected_term;mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer=e}})),wp.media.events.on("mlo:grid:filter:change:term",(function(e){mediaLibraryOrganizerUploader&&void 0!==mediaLibraryOrganizerUploader.uploader&&(mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[e.taxonomy_name]=e.slug)})),wp.media.events.on("mlo:grid:attachment:upload:success",(function(e){mediaLibraryOrganizerGridViewRefresh()})),wp.media.events.on("mlo:grid:edit-attachment:added:term",(function(e){mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.taxonomy.name,e.terms,e.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned)})),wp.media.events.on("mlo:grid:edit-attachment:edited",(function(e){var $;$=jQuery,e.taxonomy_term_changed&&(mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(),mediaLibraryOrganizerGridViewRefresh())})),wp.media.events.on("mlo:grid:edit-attachment:deleted",(function(e){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),wp.media.events.on("mlo:grid:bulk_select:disabled",(function(){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),mediaLibraryOrganizerInitialize();
  • media-library-organizer/tags/1.4.6/assets/scss/media.scss

    r2688245 r2758024  
    163163
    164164/**
     165 * Grid View: Add padding below filters
     166 */
     167.media-frame-content .attachments-browser .media-toolbar-secondary,
     168.media-modal-content .attachments-browser .media-toolbar-secondary {
     169    padding-bottom: 10px;
     170}
     171
     172/**
    165173 * Grid View: Modal
    166174 * - Adjust widths of items so that all filters display
     
    204212    .attachments-browser {
    205213        .media-toolbar {
    206             height: 50px;
     214            height: auto;
    207215            background-color: #f3f3f3;
    208216            border-bottom: 1px solid #ddd;
    209         }
    210 
    211         .attachments {
    212             top: 50px;
    213217        }
    214218
     
    272276        }
    273277    }
    274 }
    275 @media only screen and (max-width: 1840px) {
    276     .media-modal-content {
    277         .attachments-browser {
    278             .media-toolbar {
    279                 height: 90px;
    280             }
    281 
    282             .attachments {
    283                 top: 90px;
    284             }
    285         }
    286     }
    287 }
    288 @media only screen and (max-width: 1330px) {
    289     .media-modal-content {
    290         .attachments-browser {
    291             .media-toolbar {
    292                 height: 130px;
    293             }
    294 
    295             .attachments {
    296                 top: 130px;
    297             }
    298         }
    299     }
    300 }
    301 @media only screen and (max-width: 1000px) {
    302     .media-modal-content {
    303         .attachments-browser {
    304             .media-toolbar {
    305                 height: 170px;
    306 
    307             }
    308 
    309             .attachments {
    310                 top: 170px;
    311             }
    312         }
    313     }
    314 }
    315 @media only screen and (max-width: 900px) {
    316     .media-modal-content {
    317         .attachments-browser {
    318             .media-toolbar {
    319                 height: 210px;
    320 
    321             }
    322 
    323             .attachments {
    324                 top: 210px;
    325             }
    326         }
    327     }
    328 }
    329 @media only screen and (max-width: 640px) {
    330     .media-modal-content {
    331         .attachments-browser {
    332             .media-toolbar {
    333                 height: 160px;
    334 
    335             }
    336 
    337             .attachments {
    338                 top: 160px;
    339             }
    340         }
    341     }
    342278}
    343279
  • media-library-organizer/tags/1.4.6/includes/admin/class-media-library-organizer-admin.php

    r2688245 r2758024  
    259259     * @param   string $ext        If defined, loads minified JS.
    260260     */
    261     public function enqueue_js_settings( $screen, $screens, $mode, $ext ) { /* phpcs:ignore */
     261    public function enqueue_js_settings( $screen, $screens, $mode, $ext ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    262262
    263263        // JS.
     
    409409
    410410        // Bail if no page given.
    411         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     411        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    412412            return;
    413413        }
    414414
    415415        // Get current screen name.
    416         $screen = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     416        $screen = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    417417
    418418        // Get registered screens.
     
    457457
    458458        // If no page name was given, we're not on a plugin screen.
    459         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     459        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    460460            return false;
    461461        }
    462462
    463463        // Get screen name.
    464         $screen = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     464        $screen = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    465465
    466466        // Return.
     
    485485
    486486        // If no tab defined, get the first tab name from the tabs array.
    487         if ( ! isset( $_REQUEST['tab'] ) ) { /* phpcs:ignore */
     487        if ( ! isset( $_REQUEST['tab'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    488488            foreach ( $tabs as $tab ) {
    489489                return $tab;
     
    492492
    493493        // Return the requested tab, if it exists.
    494         if ( isset( $tabs[ $_REQUEST['tab'] ] ) ) { /* phpcs:ignore */
    495             $tab = $tabs[ sanitize_text_field( $_REQUEST['tab'] ) ]; /* phpcs:ignore */
     494        if ( isset( $tabs[ $_REQUEST['tab'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
     495            $tab = $tabs[ sanitize_text_field( $_REQUEST['tab'] ) ]; // phpcs:ignore WordPress.Security.NonceVerification
    496496            return $tab;
    497497        } else {
     
    862862                 */
    863863                $result = apply_filters( 'media_library_organizer_admin_save_settings', true, $_POST );
    864                 break; /* phpcs:ignore */
     864                break;
    865865
    866866            /**
  • media-library-organizer/tags/1.4.6/includes/admin/class-media-library-organizer-api.php

    r2688245 r2758024  
    238238                    )
    239239                );
    240                 break; /* phpcs:ignore */
    241240        }
    242241
    243242        // Decode JSON.
    244         $body = json_decode( $body ); /* phpcs:ignore */
     243        $body = json_decode( $body );
    245244
    246245        // Bail if an error occured.
  • media-library-organizer/tags/1.4.6/includes/admin/class-media-library-organizer-import.php

    r2688245 r2758024  
    144144     * @return  mixed               WP_Error | bool
    145145     */
    146     public function import( $success, $import ) { /* phpcs:ignore */
     146    public function import( $success, $import ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    147147
    148148        // Bail if no data.
     
    171171     * @return  mixed               WP_Error | bool
    172172     */
    173     public function import_third_party( $success, $import ) { /* phpcs:ignore */
     173    public function import_third_party( $success, $import ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    174174
    175175        // Check which importer we need to run.
     
    446446        $terms = $wpdb->get_results(
    447447            $wpdb->prepare(
    448                 'SELECT  ' . $wpdb->term_taxonomy . '.term_taxonomy_id,
    449                                 ' . $wpdb->term_taxonomy . '.description,
    450                                 ' . $wpdb->term_taxonomy . '.parent,
    451                                 ' . $wpdb->terms . '.name
    452                                 FROM ' . $wpdb->term_taxonomy . '
    453                                 LEFT JOIN  ' . $wpdb->terms . '
    454                                 ON  ' . $wpdb->term_taxonomy . '.term_id =  ' . $wpdb->terms . '.term_id
    455                                 WHERE ' . $wpdb->term_taxonomy . ".taxonomy = '%s'", /* phpcs:ignore */
     448                "SELECT  {$wpdb->term_taxonomy}.term_taxonomy_id,
     449                {$wpdb->term_taxonomy}.description,
     450                {$wpdb->term_taxonomy}.parent,
     451                {$wpdb->terms}.name
     452                FROM {$wpdb->term_taxonomy}
     453                LEFT JOIN {$wpdb->terms}
     454                ON {$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id
     455                WHERE {$wpdb->term_taxonomy}.taxonomy = %s",
    456456                $taxonomy
    457457            )
     
    491491        // Get Attachment IDs that have any of the given Term IDs assigned to them.
    492492        $attachments = $wpdb->get_results(
    493             'SELECT  ' . $wpdb->term_relationships . '.object_id,
    494             ' . $wpdb->term_relationships . '.term_taxonomy_id
    495             FROM ' . $wpdb->term_relationships . '
    496             WHERE ' . $wpdb->term_relationships . '.term_taxonomy_id IN (' . implode( ',', $term_ids ) . ')' /* phpcs:ignore */
     493            "SELECT  {$wpdb->term_relationships}.object_id, {$wpdb->term_relationships}.term_taxonomy_id
     494            FROM {$wpdb->term_relationships}
     495            WHERE {$wpdb->term_relationships}.term_taxonomy_id IN (" . implode( ',', $term_ids ) . ')' // phpcs:ignore WordPress.DB.PreparedSQL
    497496        );
    498497
  • media-library-organizer/tags/1.4.6/includes/admin/class-media-library-organizer-notices.php

    r2688245 r2758024  
    350350            <div class="notice notice-success is-dismissible">
    351351                <p>
    352                     <?php echo implode( '<br />', $this->notices['success'] ); /* phpcs:ignore */ ?>
     352                    <?php
     353                    foreach ( $this->notices['success'] as $notice ) {
     354                        echo esc_html( $notice ) . '<br />';
     355                    }
     356                    ?>
    353357                </p>
    354358            </div>
     
    361365            <div class="notice notice-error is-dismissible">
    362366                <p>
    363                     <?php echo implode( '<br />', $this->notices['error'] ); /* phpcs:ignore */ ?>
     367                    <?php
     368                    foreach ( $this->notices['error'] as $notice ) {
     369                        echo esc_html( $notice ) . '<br />';
     370                    }
     371                    ?>
    364372                </p>
    365373            </div>
  • media-library-organizer/tags/1.4.6/includes/class-media-library-organizer.php

    r2722863 r2758024  
    281281        // If the request global exists, check for specific request keys which tell us
    282282        // that we're using a frontend editor.
    283         if ( isset( $_REQUEST ) && ! empty( $_REQUEST ) ) { /* phpcs:ignore */
     283        if ( isset( $_REQUEST ) && ! empty( $_REQUEST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    284284            // Sanitize request.
    285             $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     285            $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    286286
    287287            // Beaver Builder.
     
    405405                    /* translators: %1$s: Plugin Name, %2$s: PHP class name */
    406406                    __( '%1$s: Error: Could not load Plugin class %2$s', 'media-library-organizer' ),
    407                     $this->plugin->displayName, /* phpcs:ignore */
     407                    $this->plugin->displayName,
    408408                    $name
    409409                )
     
    414414            if ( is_admin() ) {
    415415                wp_die(
    416                     $error, /* phpcs:ignore */
     416                    esc_html( $error->get_error_message() ),
    417417                    sprintf(
    418418                        /* translators: Plugin Name */
    419419                        esc_html__( '%s: Error', 'media-library-organizer' ),
    420                         $this->plugin->displayName /* phpcs:ignore */
     420                        esc_html( $this->plugin->displayName )
    421421                    ),
    422422                    array(
  • media-library-organizer/tags/1.4.6/includes/global/class-media-library-organizer-ajax.php

    r2688245 r2758024  
    260260    public function search_authors() {
    261261
    262         // Get vars.
    263         $query = sanitize_text_field( $_REQUEST['query'] ); /* phpcs:ignore */
     262        // Check nonce.
     263        check_ajax_referer( 'media_library_organizer_search_authors', 'nonce' );
     264
     265        // Get vars.
     266        $query = sanitize_text_field( $_REQUEST['query'] );
    264267
    265268        // Get results.
     
    299302    public function search_taxonomy_terms() {
    300303
     304        // Check nonce.
     305        check_ajax_referer( 'media_library_organizer_search_taxonomy_terms', 'nonce' );
     306
    301307        // Get vars.
    302308        $taxonomy_name = false;
    303         if ( isset( $_REQUEST['taxonomy_name'] ) ) { /* phpcs:ignore */
    304             $taxonomy_name = sanitize_text_field( $_REQUEST['taxonomy_name'] ); /* phpcs:ignore */
    305         } elseif ( isset( $_REQUEST['args'] ) && isset( $_REQUEST['args']['taxonomy_name'] ) ) { /* phpcs:ignore */
    306             $taxonomy_name = sanitize_text_field( $_REQUEST['args']['taxonomy_name'] ); /* phpcs:ignore */
    307         }
    308         $query = sanitize_text_field( $_REQUEST['query'] ); /* phpcs:ignore */
     309        if ( isset( $_REQUEST['taxonomy_name'] ) ) {
     310            $taxonomy_name = sanitize_text_field( $_REQUEST['taxonomy_name'] );
     311        } elseif ( isset( $_REQUEST['args'] ) && isset( $_REQUEST['args']['taxonomy_name'] ) ) {
     312            $taxonomy_name = sanitize_text_field( $_REQUEST['args']['taxonomy_name'] );
     313        }
     314        $query = sanitize_text_field( $_REQUEST['query'] );
    309315
    310316        // Bail if no Taxonomy Name specified.
  • media-library-organizer/tags/1.4.6/includes/global/class-media-library-organizer-common.php

    r2747124 r2758024  
    418418            'image_size_names_choose',
    419419            array(
    420                 'thumbnail' => __( 'Thumbnail' ), /* phpcs:ignore */
    421                 'medium'    => __( 'Medium' ), /* phpcs:ignore */
    422                 'large'     => __( 'Large' ), /* phpcs:ignore */
    423                 'full'      => __( 'Full Size' ), /* phpcs:ignore */
     420                'thumbnail' => __( 'Thumbnail', 'media-library-organizer' ),
     421                'medium'    => __( 'Medium', 'media-library-organizer' ),
     422                'large'     => __( 'Large', 'media-library-organizer' ),
     423                'full'      => __( 'Full Size', 'media-library-organizer' ),
    424424            )
    425425        );
     
    605605
    606606        $keys  = array_keys( $array );
    607         $index = array_search( $key, $keys ); /* phpcs:ignore */
    608         $pos   = false === $index ? count( $array ) : $index + 1; /* phpcs:ignore */
     607        $index = array_search( $key, $keys, true );
     608        $pos   = false === $index ? count( $array ) : $index + 1;
    609609        return array_merge( array_slice( $array, 0, $pos ), $new, array_slice( $array, $pos ) );
    610610
  • media-library-organizer/tags/1.4.6/includes/global/class-media-library-organizer-media.php

    r2747124 r2758024  
    126126
    127127        // Determine the current orderby.
    128         if ( isset( $_REQUEST['orderby'] ) ) { /* phpcs:ignore */
     128        if ( isset( $_REQUEST['orderby'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    129129            // Get from the <select> dropdown.
    130             $current_orderby = sanitize_text_field( $_REQUEST['orderby'] ); /* phpcs:ignore */
     130            $current_orderby = sanitize_text_field( $_REQUEST['orderby'] ); // phpcs:ignore WordPress.Security.NonceVerification
    131131        } else {
    132132            // Get orderby default from the User's Options, if set to persist.
     
    140140
    141141        // Determine the current order.
    142         if ( isset( $_REQUEST['order'] ) ) { /* phpcs:ignore */
     142        if ( isset( $_REQUEST['order'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    143143            // Get from the <select> dropdown.
    144             $current_order = sanitize_text_field( $_REQUEST['order'] ); /* phpcs:ignore */
     144            $current_order = sanitize_text_field( $_REQUEST['order'] ); // phpcs:ignore WordPress.Security.NonceVerification
    145145        } else {
    146146            // Get orderby default from the User's Options, if set to persist.
     
    160160            }
    161161
    162             echo $this->get_list_table_category_filter( $taxonomy_name, sanitize_text_field( $taxonomy['plural_name'] ) ); /* phpcs:ignore */
     162            echo $this->get_list_table_category_filter( $taxonomy_name, sanitize_text_field( $taxonomy['plural_name'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput
    163163        }
    164164
     
    489489
    490490        // Output.
    491         echo $output; /* phpcs:ignore */
     491        echo $output; // phpcs:ignore WordPress.Security.EscapeOutput
    492492
    493493    }
     
    545545        // wp_ajax_query_attachments() doesn't attribute $_REQUEST['query'] attributes to $args that aren't Post or Taxonomy Related.
    546546        // Include these in the below filter so they're accessible to Addons which might need to read the request input to modify $args.
    547         $query = array_map( 'sanitize_text_field', $_REQUEST['query'] ); /* phpcs:ignore */
     547        $query = array_map( 'sanitize_text_field', $_REQUEST['query'] ); // phpcs:ignore WordPress.Security.NonceVerification
    548548
    549549        /**
     
    620620
    621621        // Sanitize request.
    622         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     622        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    623623
    624624        // File Type.
     
    932932                <a href="#" class="taxonomy-add-new" data-taxonomy="' . $taxonomy_name . '">' .
    933933                    /* translators: %s: Add New taxonomy label. */
    934                     sprintf( __( '+ %s' ), $taxonomy->labels->add_new_item ) /* phpcs:ignore */ . '
     934                    sprintf( __( '+ %s', 'media-library-organizer' ), $taxonomy->labels->add_new_item ) . '
    935935                </a>
    936936                <div class="mlo-taxonomy-term-add-fields hidden ' . $taxonomy_name . '">
     
    966966        $taxonomy              = $this->base->get_class( 'taxonomies' )->get_taxonomy( $taxonomy_name );
    967967        $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms );
    968         $comma                 = _x( ',', 'tag delimiter' ); /* phpcs:ignore */
     968        $comma                 = _x( ',', 'tag delimiter', 'media-library-organizer' );
    969969        $terms                 = get_the_terms( $post_id, $taxonomy_name );
    970970
     
    10221022     * @return  string                                      Taxonomy HTML Checkboxes
    10231023     */
    1024     public function terms_checkbox( $taxonomy_name, $field_name, $selected_term_ids = array() ) { /* phpcs:ignore */
     1024    public function terms_checkbox( $taxonomy_name, $field_name, $selected_term_ids = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    10251025
    10261026        // Get Taxonomy Terms.
     
    10801080        }
    10811081
    1082         // Get request.
    1083         $request = $_REQUEST; /* phpcs:ignore */
     1082        // Sanitize request.
     1083        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    10841084
    10851085        // Iterate through Registered Taxonomies.
     
    12571257
    12581258        // Sanitize request.
    1259         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     1259        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    12601260
    12611261        // Check some request variables.
  • media-library-organizer/tags/1.4.6/includes/global/class-media-library-organizer-taxonomy-walker.php

    r2688245 r2758024  
    4848     * @param array  $args   An array of arguments. @see wp_terms_checklist().
    4949     */
    50     public function start_lvl( &$output, $depth = 0, $args = array() ) { /* phpcs:ignore */
     50    public function start_lvl( &$output, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    5151
    5252        $indent  = str_repeat( "\t", $depth );
     
    6666     * @param array  $args   An array of arguments. @see wp_terms_checklist().
    6767     */
    68     public function end_lvl( &$output, $depth = 0, $args = array() ) { /* phpcs:ignore */
     68    public function end_lvl( &$output, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    6969
    7070        $indent  = str_repeat( "\t", $depth );
     
    9090     * @param   int    $id         ID of the current term.
    9191     */
    92     public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { /* phpcs:ignore */
     92    public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    9393
    9494        $taxonomy = $args['taxonomy'];
     
    137137     * @param array  $args     An array of arguments. @see wp_terms_checklist().
    138138     */
    139     public function end_el( &$output, $category, $depth = 0, $args = array() ) { /* phpcs:ignore */
     139    public function end_el( &$output, $category, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    140140
    141141        $output .= "</li>\n";
  • media-library-organizer/tags/1.4.6/includes/global/class-media-library-organizer-upload.php

    r2688245 r2758024  
    164164        foreach ( $this->base->get_class( 'taxonomies' )->get_taxonomies() as $taxonomy_name => $taxonomy ) {
    165165            // Conditionally set Media Categories, as they won't be included in the request if no checkboxes were selected.
    166             if ( ! isset( $_REQUEST['media_library_organizer'] ) ) { /* phpcs:ignore */
     166            if ( ! isset( $_REQUEST['media_library_organizer'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    167167                continue;
    168168            }
    169169
    170170            // Fetch request.
    171             $request = $_REQUEST['media_library_organizer']; /* phpcs:ignore */
     171            $request = stripslashes_deep( $_REQUEST['media_library_organizer'] ); // phpcs:ignore WordPress.Security.NonceVerification
    172172
    173173            // Skip if the Taxonomy isn't specified.
  • media-library-organizer/tags/1.4.6/media-library-organizer.php

    r2747124 r2758024  
    99 * Plugin Name: Media Library Organizer
    1010 * Plugin URI: https://wpmedialibrary.com
    11  * Version: 1.4.5
     11 * Version: 1.4.6
    1212 * Author: WP Media Library
    1313 * Author URI: https://wpmedialibrary.com
     
    2222
    2323// Define Plugin version and build date.
    24 define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_VERSION', '1.4.5' );
    25 define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_BUILD_DATE', '2022-06-23 18:00:00' );
     24define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_VERSION', '1.4.6' );
     25define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_BUILD_DATE', '2022-07-18 18:00:00' );
    2626
    2727// Define Plugin paths.
     
    101101 * @since   1.0.5
    102102 */
    103 function Media_Library_Organizer() { /* phpcs:ignore */
     103function Media_Library_Organizer() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
    104104
    105105    return Media_Library_Organizer::get_instance();
  • media-library-organizer/tags/1.4.6/readme.txt

    r2747124 r2758024  
    44Tags: media categories, media library, media tags, images, organizer
    55Requires at least: 5.0
    6 Tested up to: 6.0
     6Tested up to: 6.0.1
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    173173== Changelog ==
    174174
     175= 1.4.6 (2022-07-18) =
     176* Added: Grid View: Modal: Better method for defining toolbar height and attachments grid
     177* Updated: French translations
     178* Fix: Grid View: Modal: Edit Gallery: Don't display Dropdown Filters, as they have no effect on the selected images
     179* Fix: Code improvements for WordPress Coding Standards
     180
    175181= 1.4.5 (2022-06-23) =
    176182* Added: French translations
  • media-library-organizer/tags/1.4.6/views/admin/import-enhanced-media-library.php

    r2688245 r2758024  
    2424            <div class="right">
    2525                <?php
    26                 foreach ( $import_source['data']['taxonomies'] as $taxonomy_name => $taxonomy ) { /* phpcs:ignore */
     26                foreach ( $import_source['data']['taxonomies'] as $taxonomy_name => $eml_taxonomy ) {
    2727                    // Skip non-EML categories.
    28                     if ( ! $taxonomy['eml_media'] ) {
     28                    if ( ! $eml_taxonomy['eml_media'] ) {
    2929                        continue;
    3030                    }
     
    3232                    <label for="taxonomies_<?php echo esc_attr( $taxonomy_name ); ?>">
    3333                        <input type="checkbox" name="taxonomies[]" id="taxonomies_<?php echo esc_attr( $taxonomy_name ); ?>" value="<?php echo esc_attr( $taxonomy_name ); ?>" />
    34                         <?php echo esc_html( $taxonomy['labels']['name'] ); ?>
     34                        <?php echo esc_html( $eml_taxonomy['labels']['name'] ); ?>
    3535                    </label><br />
    3636                    <?php
  • media-library-organizer/tags/1.4.6/views/admin/settings-general.php

    r2688245 r2758024  
    6464
    6565                <?php
    66                 foreach ( $taxonomies as $taxonomy_name => $taxonomy ) { /* phpcs:ignore */
     66                foreach ( $taxonomies as $taxonomy_name => $mlo_taxonomy ) {
    6767                    ?>
    6868                    <div class="wpzinc-option">
    6969                        <div class="left">
    70                             <label for="general_<?php echo esc_attr( $taxonomy_name ); ?>_enabled"><?php echo esc_html( $taxonomy['plural_name'] ); ?></label>
     70                            <label for="general_<?php echo esc_attr( $taxonomy_name ); ?>_enabled"><?php echo esc_html( $mlo_taxonomy['plural_name'] ); ?></label>
    7171                        </div>
    7272                        <div class="right">
     
    8282                                    /* translators: Taxonomy Label, Singular */
    8383                                        __( 'If enabled, displays a dropdown option to filter Media Library items by %s', 'media-library-organizer' ),
    84                                         $taxonomy['singular_name']
     84                                        $mlo_taxonomy['singular_name']
    8585                                    )
    8686                                );
  • media-library-organizer/tags/1.4.6/views/admin/settings.php

    r2688245 r2758024  
    2222    <?php
    2323    // Output notices.
    24     echo $this->base->get_class( 'notices' )->output_notices(); /* phpcs:ignore */
     24    echo $this->base->get_class( 'notices' )->output_notices(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    2525    ?>
    2626
  • media-library-organizer/trunk/_modules/dashboard/class-wpzincdashboardwidget.php

    r2747124 r2758024  
    438438
    439439        // Define minimum capability for accessing Import and Export Sub Menu.
    440         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    441 
    442         add_submenu_page( $slug, __( 'Import & Export', $this->plugin->name ), __( 'Import & Export', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-import-export', array( $this, 'import_export_screen' ) ); /* phpcs:ignore */
     440        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     441
     442        add_submenu_page( $slug, __( 'Import & Export', $this->plugin->name ), __( 'Import & Export', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-import-export', array( $this, 'import_export_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    443443
    444444    }
     
    463463
    464464        // Define minimum capability for accessing Support Menu.
    465         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    466 
    467         add_submenu_page( $slug, __( 'Support', $this->plugin->name ), __( 'Support', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-support', array( $this, 'support_screen' ) ); /* phpcs:ignore */
     465        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     466
     467        add_submenu_page( $slug, __( 'Support', $this->plugin->name ), __( 'Support', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-support', array( $this, 'support_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    468468
    469469    }
     
    488488
    489489        // Define minimum capability for accessing Upgrade Menu.
    490         $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); /* phpcs:ignore */
    491 
    492         add_submenu_page( $slug, __( 'Upgrade', $this->plugin->name ), __( 'Upgrade', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-upgrade', array( $this, 'upgrade_screen' ) ); /* phpcs:ignore */
     490        $minimum_capability = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_admin_admin_menu_minimum_capability', 'manage_options' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
     491
     492        add_submenu_page( $slug, __( 'Upgrade', $this->plugin->name ), __( 'Upgrade', $this->plugin->name ), $minimum_capability, $this->plugin->name . '-upgrade', array( $this, 'upgrade_screen' ) ); // phpcs:ignore WordPress.WP.I18n
    493493
    494494    }
     
    531531     * @return  array           Action Links
    532532     */
    533     public function add_action_link( $links, $file ) { /* phpcs:ignore */
     533    public function add_action_link( $links, $file ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    534534
    535535        // Bail if the licensing class exists,as this means we're on a Pro version.
     
    558558        // Add Links.
    559559        if ( $this->get_upgrade_url( 'plugins' ) ) {
    560             $links[] = '<a href="' . $this->get_upgrade_url( 'plugins' ) . '" rel="noopener" target="_blank">' . __( 'Upgrade', $this->plugin->name ) . '</a>'; /* phpcs:ignore */
     560            $links[] = '<a href="' . esc_attr( $this->get_upgrade_url( 'plugins' ) ) . '" rel="noopener" target="_blank">' . __( 'Upgrade', $this->plugin->name ) . '</a>'; //phpcs:ignore WordPress.WP.I18n
    561561        }
    562562
     
    586586        // Define the deactivation reasons.
    587587        $reasons = array(
    588             'not_working'        => __( 'The Plugin didn\'t work', $this->plugin->name ), /* phpcs:ignore */
    589             'better_alternative' => __( 'I found a better Plugin', $this->plugin->name ), /* phpcs:ignore */
    590             'other'              => __( 'Other', $this->plugin->name ), /* phpcs:ignore */
     588            'not_working'        => __( 'The Plugin didn\'t work', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
     589            'better_alternative' => __( 'I found a better Plugin', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
     590            'other'              => __( 'Other', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    591591        );
    592592
     
    620620
    621621        // Build args.
     622        // phpcs:disable WordPress.Security.NonceVerification
    622623        $args = array(
    623             'product'      => sanitize_text_field( $_REQUEST['product'] ), /* phpcs:ignore */
    624             'version'      => sanitize_text_field( $_REQUEST['version'] ), /* phpcs:ignore */
    625             'reason'       => sanitize_text_field( $_REQUEST['reason'] ), /* phpcs:ignore */
    626             'reason_text'  => sanitize_text_field( $_REQUEST['reason_text'] ), /* phpcs:ignore */
    627             'reason_email' => sanitize_text_field( $_REQUEST['reason_email'] ), /* phpcs:ignore */
     624            'product'      => sanitize_text_field( $_REQUEST['product'] ),
     625            'version'      => sanitize_text_field( $_REQUEST['version'] ),
     626            'reason'       => sanitize_text_field( $_REQUEST['reason'] ),
     627            'reason_text'  => sanitize_text_field( $_REQUEST['reason_text'] ),
     628            'reason_email' => sanitize_text_field( $_REQUEST['reason_email'] ),
    628629            'site_url'     => str_replace( wp_parse_url( get_bloginfo( 'url' ), PHP_URL_SCHEME ) . '://', '', get_bloginfo( 'url' ) ),
    629630        );
     631        // phpcs:enable
    630632
    631633        // Send deactivation reason.
     
    693695
    694696        // Bail if we're not on a Plugin screen.
    695         if ( ! isset( $_REQUEST['page'] ) ) { /* phpcs:ignore */
     697        if ( ! isset( $_REQUEST['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    696698            return $text;
    697699        }
    698         $page = sanitize_text_field( $_REQUEST['page'] ); /* phpcs:ignore */
     700        $page = sanitize_text_field( $_REQUEST['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    699701        if ( strpos( $page, $this->plugin->name ) === false ) {
    700702            return $text;
     
    704706        return sprintf(
    705707            /* translators: %1$s: Plugin Name, %2$s: Five Star Link to Review URL, %3$s: Link to Review URL, %4$s: Plugin Name */
    706             __( 'Please rate %1$s %2$s on %3$s to help us grow %4$s. Thanks!', $this->plugin->name ), /* phpcs:ignore */
     708            __( 'Please rate %1$s %2$s on %3$s to help us grow %4$s. Thanks!', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    707709            '<strong>' . $this->plugin->displayName . '</strong>',
    708710            '<a href="' . $this->get_review_url() . '" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>',
     
    842844    public function import_export_screen() {
    843845
    844         if ( ! empty( $_POST ) ) { /* phpcs:ignore */
     846        if ( ! empty( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    845847            // Check nonce.
    846848            $result = $this->import_export_security_check();
     
    850852            } else {
    851853                // Import JSON.
    852                 if ( isset( $_POST['import'] ) ) { /* phpcs:ignore */
     854                if ( isset( $_POST['import'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    853855                    $this->import();
    854856                } else {
    855857                    // Import from Third Party.
    856858                    $result = true;
    857                     $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_third_party', $result, $_POST ); /* phpcs:ignore */
     859                    $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_third_party', $result, $_POST ); // phpcs:ignore WordPress.NamingConventions.ValidHookName,WordPress.Security.NonceVerification
    858860
    859861                    if ( is_wp_error( $result ) ) {
    860862                        $this->error_message = $result->get_error_message();
    861863                    } else {
    862                         $this->message = __( 'Settings imported.', $this->plugin->name ); /* phpcs:ignore */
     864                        $this->message = __( 'Settings imported.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    863865                    }
    864866                }
     
    867869
    868870        // Allow Plugin to define additional import routines.
    869         $import_sources = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_sources', array() ); /* phpcs:ignore */
     871        $import_sources = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import_sources', array() ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
    870872
    871873        // Output view.
     
    886888        if ( ! isset( $_POST[ $this->plugin->name . '_nonce' ] ) ) {
    887889            // Missing nonce.
    888             return new WP_Error( 'import_export_nonce_missing', __( 'nonce field is missing. Settings NOT saved.', $this->plugin->name ) ); /* phpcs:ignore */
     890            return new WP_Error( 'import_export_nonce_missing', __( 'nonce field is missing. Settings NOT saved.', $this->plugin->name ) ); // phpcs:ignore WordPress.WP.I18n
    889891        }
    890892
    891893        if ( ! wp_verify_nonce( $_POST[ $this->plugin->name . '_nonce' ], $this->plugin->name ) ) {
    892894            // Invalid nonce.
    893             return new WP_Error( 'import_export_nonce_invalid', __( 'Invalid nonce specified. Settings NOT saved.', $this->plugin->name ) ); /* phpcs:ignore */
     895            return new WP_Error( 'import_export_nonce_invalid', __( 'Invalid nonce specified. Settings NOT saved.', $this->plugin->name ) ); // phpcs:ignore WordPress.WP.I18n
    894896        }
    895897
     
    906908
    907909        if ( ! is_array( $_FILES ) ) {
    908             $this->error_message = __( 'No file was uploaded', $this->plugin->name ); /* phpcs:ignore */
     910            $this->error_message = __( 'No file was uploaded', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    909911            return;
    910912        }
    911913
    912914        if ( $_FILES['import']['error'] !== 0 ) {
    913             $this->error_message = __( 'Error when uploading file.', $this->plugin->name ); /* phpcs:ignore */
     915            $this->error_message = __( 'Error when uploading file.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    914916            return;
    915917        }
     
    924926                $zip = new ZipArchive();
    925927                if ( $zip->open( $_FILES['import']['tmp_name'] ) !== true ) {
    926                     $this->error_message = __( 'Could not extract the supplied ZIP file.', $this->plugin->name ); /* phpcs:ignore */
     928                    $this->error_message = __( 'Could not extract the supplied ZIP file.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    927929                    return;
    928930                }
     
    933935
    934936                // Read JSON file.
    935                 $handle = fopen( sys_get_temp_dir() . '/export.json', 'r' ); /* phpcs:ignore */
    936                 $json   = fread( $handle, filesize( sys_get_temp_dir() . '/export.json' ) ); /* phpcs:ignore */
    937                 fclose( $handle ); /* phpcs:ignore */
     937                // phpcs:disable WordPress.WP.AlternativeFunctions
     938                $handle = fopen( sys_get_temp_dir() . '/export.json', 'r' );
     939                $json   = fread( $handle, filesize( sys_get_temp_dir() . '/export.json' ) );
     940                fclose( $handle );
     941                // phpcs:enable
    938942                break;
    939943
    940944            default:
    941945                // Read file.
    942                 $handle = fopen( $_FILES['import']['tmp_name'], 'r' ); /* phpcs:ignore */
    943                 $json   = fread( $handle, $_FILES['import']['size'] ); /* phpcs:ignore */
    944                 fclose( $handle ); /* phpcs:ignore */
     946                // phpcs:disable WordPress.WP.AlternativeFunctions
     947                $handle = fopen( $_FILES['import']['tmp_name'], 'r' );
     948                $json   = fread( $handle, $_FILES['import']['size'] );
     949                fclose( $handle );
     950                // phpcs:enable
    945951
    946952        }
     
    951957
    952958        // Decode.
    953         $import = json_decode( $json, true ); /* phpcs:ignore */
     959        $import = json_decode( $json, true );
    954960
    955961        // Check data is an array.
    956962        if ( ! is_array( $import ) ) {
    957             $this->error_message = __( 'Supplied file is not a valid JSON settings file, or has become corrupt.', $this->plugin->name ); /* phpcs:ignore */
     963            $this->error_message = __( 'Supplied file is not a valid JSON settings file, or has become corrupt.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    958964            return;
    959965        }
     
    961967        // Allow Plugin to run its Import Routine using the supplied data now.
    962968        $result = true;
    963         $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import', $result, $import ); /* phpcs:ignore */
     969        $result = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_import', $result, $import );  // phpcs:ignore WordPress.NamingConventions.ValidHookName
    964970
    965971        // Bail if an error occured.
     
    969975        }
    970976
    971         $this->message = __( 'Settings imported.', $this->plugin->name ); /* phpcs:ignore */
     977        $this->message = __( 'Settings imported.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    972978
    973979    }
     
    9991005
    10001006        // Bail if no POST data.
    1001         if ( empty( $_POST ) ) { /* phpcs:ignore */
     1007        if ( empty( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10021008            return;
    10031009        }
    10041010
    10051011        // Bail if not exporting.
    1006         if ( ! isset( $_POST['export'] ) ) { /* phpcs:ignore */
     1012        if ( ! isset( $_POST['export'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10071013            return;
    10081014        }
     
    10271033         * @param   array   $_POST  POST Data.
    10281034         */
    1029         $data = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_export', $data, $_POST ); /* phpcs:ignore */
     1035        $data = apply_filters( str_replace( '-', '_', $this->plugin->name ) . '_export', $data, $_POST ); // phpcs:ignore WordPress.NamingConventions.ValidHookName,WordPress.Security.NonceVerification
    10301036
    10311037        // Force a file download, depending on the export format.
    1032         switch ( sanitize_text_field( $_POST['format'] ) ) { /* phpcs:ignore */
     1038        switch ( sanitize_text_field( $_POST['format'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    10331039            /**
    10341040             * JSON, Zipped.
     
    10891095        header( 'Pragma: no-cache' );
    10901096        header( 'Expires: 0' );
    1091         readfile( $filename ); /* phpcs:ignore */
     1097        readfile( $filename ); // phpcs:ignore WordPress.WP.AlternativeFunctions
    10921098        unlink( $filename );
    10931099        exit();
     
    11101116        header( 'Pragma: no-cache' );
    11111117        header( 'Expires: 0' );
    1112         echo $json; /* phpcs:ignore */
     1118        echo $json; // phpcs:ignore WordPress.Security.EscapeOutput
    11131119        exit();
    11141120
     
    11301136        header( 'Pragma: no-cache' );
    11311137        header( 'Expires: 0' );
    1132         echo $csv; /* phpcs:ignore */
     1138        echo $csv; // phpcs:ignore WordPress.Security.EscapeOutput
    11331139        exit();
    11341140
     
    11431149
    11441150        // Check we requested the support page.
    1145         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     1151        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    11461152            return;
    11471153        }
    11481154
    11491155        // Sanitize page.
    1150         $page = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     1156        $page = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    11511157
    11521158        // Redirect to Support.
    11531159        if ( $page === $this->plugin->name . '-support' ) {
    1154             wp_redirect( $this->plugin->support_url ); // phpcs:ignore
     1160            wp_redirect( $this->plugin->support_url ); // phpcs:ignore WordPress.Security.SafeRedirect
    11551161            die();
    11561162        }
     
    11581164        // Redirect to Upgrade.
    11591165        if ( $page === $this->plugin->name . '-upgrade' ) {
    1160             wp_redirect( $this->get_upgrade_url( 'menu' ) ); // phpcs:ignore
     1166            wp_redirect( $this->get_upgrade_url( 'menu' ) ); // phpcs:ignore WordPress.Security.SafeRedirect
    11611167            die();
    11621168        }
  • media-library-organizer/trunk/_modules/dashboard/views/deactivation-modal.php

    r2688245 r2758024  
    1818        echo sprintf(
    1919            /* Translators: Plugin Name */
    20             esc_html__( 'Optional: We\'d be super grateful if you could take a moment to let us know why you\'re deactivating %s', $this->plugin->name ), /* phpcs:ignore */
     20            esc_html__( 'Optional: We\'d be super grateful if you could take a moment to let us know why you\'re deactivating %s', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    2121            esc_html( $this->plugin->displayName )
    2222        );
     
    4545            <p>
    4646                <label for="reason_text">
    47                     <?php esc_html_e( 'Optional: Was there a problem, any feedback or something we could do better?', $this->plugin->name ); /* phpcs:ignore */ ?>
     47                    <?php esc_html_e( 'Optional: Was there a problem, any feedback or something we could do better?', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    4848                </label>
    49                 <input type="text" id="reason_text" name="reason_text" value="" placeholder="<?php esc_attr_e( 'e.g. XYZ Plugin because it has this feature...', $this->plugin->name ); /* phpcs:ignore */ ?>" class="widefat" />
     49                <input type="text" id="reason_text" name="reason_text" value="" placeholder="<?php esc_attr_e( 'e.g. XYZ Plugin because it has this feature...', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="widefat" />
    5050            </p>
    5151
    5252            <p>
    53                 <label for="reason_email"><?php esc_html_e( 'Optional: Email Address', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     53                <label for="reason_email"><?php esc_html_e( 'Optional: Email Address', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    5454                <input type="email" id="reason_email" name="reason_email" value="" class="widefat" />
    5555                <small>
    5656                    <?php
    57                     esc_html_e( 'If you\'d like further discuss the problem / feature, enter your email address above and we\'ll be in touch.  This will *never* be used for any marketing.', $this->plugin->name ); /* phpcs:ignore */
     57                    esc_html_e( 'If you\'d like further discuss the problem / feature, enter your email address above and we\'ll be in touch.  This will *never* be used for any marketing.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
    5858                    ?>
    5959                </small>
     
    6161        </div>
    6262
    63         <input type="submit" name="submit" value="<?php esc_attr_e( 'Deactivate', $this->plugin->name );  /* phpcs:ignore */ ?>" class="button button-primary" />
     63        <input type="submit" name="submit" value="<?php esc_attr_e( 'Deactivate', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="button button-primary" />
    6464    </form>
    6565</div>
  • media-library-organizer/trunk/_modules/dashboard/views/footer-upgrade-embedded.php

    r2688245 r2758024  
    1818
    1919    <div class="wpzinc-option ignore-nth-child">
    20         <strong><?php esc_html_e( 'Support', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Access to one on one email support', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     20        <strong><?php esc_html_e( 'Support', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Access to one on one email support', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2121    </div>
    2222
    2323    <div class="wpzinc-option ignore-nth-child">
    24         <strong><?php esc_html_e( 'Documentation', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Detailed documentation on how to install and configure the plugin', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     24        <strong><?php esc_html_e( 'Documentation', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Detailed documentation on how to install and configure the plugin', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2525    </div>
    2626
    2727    <div class="wpzinc-option ignore-nth-child">
    28         <strong><?php esc_html_e( 'Updates', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Receive one click update notifications, right within your WordPress Adminstration panel', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     28        <strong><?php esc_html_e( 'Updates', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Receive one click update notifications, right within your WordPress Adminstration panel', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2929    </div>
    3030
    3131    <div class="wpzinc-option ignore-nth-child">
    32         <strong><?php esc_html_e( 'Seamless Upgrade', $this->base->plugin->name ); /* phpcs:ignore */ ?>:</strong> <?php esc_html_e( 'Retain all current settings when upgrading to Pro', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     32        <strong><?php esc_html_e( 'Seamless Upgrade', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>:</strong> <?php esc_html_e( 'Retain all current settings when upgrading to Pro', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3333    </div>
    3434
    3535    <div class="wpzinc-option">
    3636        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary" rel="noopener" target="_blank">
    37             <?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     37            <?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3838        </a>
    3939    </div>
  • media-library-organizer/trunk/_modules/dashboard/views/footer-upgrade.php

    r2688245 r2758024  
    1212    <div class="wpzinc-upgrade">
    1313        <h3>
    14             <?php esc_html_e( 'Upgrade to Pro', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     14            <?php esc_html_e( 'Upgrade to Pro', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1515        </h3>
    1616
     
    2727            ?>
    2828            <li>
    29                 <strong><?php esc_html_e( 'Support, Documentation and Updates', $this->base->plugin->name ); /* phpcs:ignore */ ?></strong>
    30                 <?php esc_html_e( 'Access to one on one email support, plus detailed documentation on how to install and configure the plugin and one click update notifications, right within the WordPress Administration panel.', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     29                <strong><?php esc_html_e( 'Support, Documentation and Updates', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></strong>
     30                <?php esc_html_e( 'Access to one on one email support, plus detailed documentation on how to install and configure the plugin and one click update notifications, right within the WordPress Administration panel.', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3131            </li>
    3232        </ul>
    3333
    34         <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary button-large" target="_blank"><?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); /* phpcs:ignore */ ?></a>
    35         <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-large" target="_blank"><?php esc_html_e( 'See all Features', $this->base->plugin->name ); /* phpcs:ignore */ ?></a>
     34        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-primary button-large" target="_blank"><?php esc_html_e( 'Upgrade Now', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></a>
     35        <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_footer_upgrade' ) ); ?>" class="button button-large" target="_blank"><?php esc_html_e( 'See all Features', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></a>
    3636    </div>
    3737    <?php
  • media-library-organizer/trunk/_modules/dashboard/views/import-export.php

    r2688245 r2758024  
    1313
    1414        <span>
    15             <?php esc_html_e( 'Import &amp; Export', $this->plugin->name ); /* phpcs:ignore */ ?>
     15            <?php esc_html_e( 'Import &amp; Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1616        </span>
    1717    </h1>
     
    3737        <h2 class="nav-tab-wrapper wpzinc-horizontal-tabbed-ui">
    3838            <a href="<?php echo esc_url( $this->plugin->documentation_url ); ?>" class="nav-tab last documentation" rel="noopener" target="_blank">
    39                 <?php esc_html_e( 'Documentation', $this->plugin->name ); /* phpcs:ignore */ ?>
     39                <?php esc_html_e( 'Documentation', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    4040                <span class="dashicons dashicons-admin-page"></span>
    4141            </a>
     
    5353                                    <li class="wpzinc-nav-tab download">
    5454                                        <a href="#import" class="wpzinc-nav-tab-vertical-active">
    55                                              <?php esc_html_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?>
     55                                            <?php esc_html_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    5656                                        </a>
    5757                                    </li>
     
    7171                                    <li class="wpzinc-nav-tab upload">
    7272                                        <a href="#export">
    73                                              <?php esc_html_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?>
     73                                            <?php esc_html_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    7474                                        </a>
    7575                                    </li>
     
    8282                                        <div class="postbox">
    8383                                            <header>
    84                                                 <h3><?php esc_html_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?></h3>
     84                                                <h3><?php esc_html_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></h3>
    8585                                                <p class="description">
    86                                                     <?php esc_html_e( 'Upload a file generated by this Plugin\'s export functionality (JSON or zipped JSON).  This will overwrite any existing settings stored on this installation.', $this->plugin->name );  /* phpcs:ignore */ ?>
     86                                                    <?php esc_html_e( 'Upload a file generated by this Plugin\'s export functionality (JSON or zipped JSON).  This will overwrite any existing settings stored on this installation.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    8787                                                </p>
    8888                                            </header>
     
    9090                                            <div class="wpzinc-option">
    9191                                                <div class="left">
    92                                                     <label for="file"><?php esc_html_e( 'JSON File', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     92                                                    <label for="file"><?php esc_html_e( 'JSON File', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    9393                                                </div>
    9494                                                <div class="right">
     
    9898
    9999                                            <div class="wpzinc-option">
    100                                                 <input name="import" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', $this->plugin->name ); /* phpcs:ignore */ ?>" />             
     100                                                <input name="import" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" />             
    101101                                            </div>
    102102                                        </div>
     
    115115                                        <div class="postbox">
    116116                                            <header>
    117                                                 <h3><?php esc_html_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?></h3>
     117                                                <h3><?php esc_html_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></h3>
    118118                                                <p class="description">
    119                                                     <?php esc_html_e( 'To export this Plugin\'s settings, choose which item(s) to export, and click the Export button below.', $this->plugin->name ); /* phpcs:ignore */ ?>
     119                                                    <?php esc_html_e( 'To export this Plugin\'s settings, choose which item(s) to export, and click the Export button below.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    120120                                                    <br />
    121                                                     <?php esc_html_e( 'You can then import the generated file into another Plugin installation.', $this->plugin->name ); /* phpcs:ignore */ ?>
     121                                                    <?php esc_html_e( 'You can then import the generated file into another Plugin installation.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    122122                                                    <br />
    123                                                     <?php esc_html_e( 'Including this file in a support request? We recommend setting the Format option to "Export as JSON, Zipped".', $this->plugin->name ); /* phpcs:ignore */ ?>
     123                                                    <?php esc_html_e( 'Including this file in a support request? We recommend setting the Format option to "Export as JSON, Zipped".', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    124124                                                </p>
    125125                                            </header>
     
    131131                                             * @since   1.0.0
    132132                                             */
    133                                             do_action( str_replace( '-', '_', $this->plugin->name ) . '_export_view' ); /* phpcs:ignore */
     133                                            do_action( str_replace( '-', '_', $this->plugin->name ) . '_export_view' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName
    134134                                            ?>
    135135
    136136                                            <div class="wpzinc-option">
    137137                                                <div class="left">
    138                                                     <label for="format"><?php esc_html_e( 'Format', $this->plugin->name ); /* phpcs:ignore */ ?></label>
     138                                                    <label for="format"><?php esc_html_e( 'Format', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
    139139                                                </div>
    140140                                                <div class="right">
    141141                                                    <select name="format" id="format" size="1">
    142                                                         <option value="json"><?php esc_html_e( 'JSON', $this->plugin->name ); /* phpcs:ignore */ ?></option>
    143                                                         <option value="zip"><?php esc_html_e( 'JSON, Zipped', $this->plugin->name ); /* phpcs:ignore */ ?></option>
     142                                                        <option value="json"><?php esc_html_e( 'JSON', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></option>
     143                                                        <option value="zip"><?php esc_html_e( 'JSON, Zipped', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></option>
    144144                                                    </select>
    145145                                                </div>
     
    147147
    148148                                            <div class="wpzinc-option">
    149                                                 <input name="export" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Export', $this->plugin->name ); /* phpcs:ignore */ ?>" />             
     149                                                <input name="export" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Export', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" />             
    150150                                            </div>
    151151                                        </div>
  • media-library-organizer/trunk/_modules/dashboard/views/review-notice.php

    r2688245 r2758024  
    2222        echo sprintf(
    2323            /* translators: Plugin Name */
    24             esc_html__( 'We\'d be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?', $this->plugin->name ),  /* phpcs:ignore */
     24            esc_html__( 'We\'d be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    2525            esc_html( $this->plugin->displayName )
    2626        );
     
    2929    <p>
    3030        <a href="<?php echo esc_url( $this->get_review_url() ); ?>" class="button button-primary" target="_blank">
    31             <?php esc_html_e( 'Yes, Leave Review', $this->plugin->name ); /* phpcs:ignore */ ?>
     31            <?php esc_html_e( 'Yes, Leave Review', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    3232        </a>
    3333        <a href="<?php echo esc_url( $this->plugin->support_url ); ?>" class="button" rel="noopener" target="_blank">
     
    3535            echo sprintf(
    3636                /* translators: Plugin Name */
    37                 esc_html__( 'No, I\'m having issues with %s', $this->plugin->name ), /* phpcs:ignore */
     37                esc_html__( 'No, I\'m having issues with %s', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
    3838                esc_html( $this->plugin->displayName )
    3939            );
  • media-library-organizer/trunk/_modules/dashboard/views/sidebar-upgrade.php

    r2688245 r2758024  
    1616<div class="postbox">
    1717    <h3 class="hndle">
    18         <?php esc_html_e( 'Keep Updated', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     18        <?php esc_html_e( 'Keep Updated', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    1919    </h3>
    2020
    2121    <div class="wpzinc-option">
    2222        <p class="description">
    23             <?php esc_html_e( 'Subscribe to the newsletter and receive updates on our WordPress Plugins.', $this->base->plugin->name ); /* phpcs:ignore */ ?>
     23            <?php esc_html_e( 'Subscribe to the newsletter and receive updates on our WordPress Plugins.', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
    2424        </p>
    2525    </div>
     
    2828        <div class="wpzinc-option">
    2929            <div class="full">                       
    30                 <input id="fieldEmail" name="cm-jdutdyj-jdutdyj" type="email" class="widefat" placeholder="<?php esc_attr_e( 'Your Email Address', $this->base->plugin->name ); /* phpcs:ignore */ ?>" class="widefat" required />
     30                <input id="fieldEmail" name="cm-jdutdyj-jdutdyj" type="email" class="widefat" placeholder="<?php esc_attr_e( 'Your Email Address', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="widefat" required />
    3131            </div>
    3232        </div>
    3333        <div class="wpzinc-option">
    3434            <div class="full">
    35                 <input type="submit" name="submit" value="<?php esc_attr_e( 'Subscribe', $this->base->plugin->name ); /* phpcs:ignore */ ?>" class="button button-primary" />
     35                <input type="submit" name="submit" value="<?php esc_attr_e( 'Subscribe', $this->base->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="button button-primary" />
    3636            </div>
    3737        </div>
  • media-library-organizer/trunk/addons/tree-view/class-media-library-organizer-tree-view.php

    r2688245 r2758024  
    177177            if ( is_admin() ) {
    178178                wp_die(
    179                     $error, /* phpcs:ignore */
     179                    esc_html( $error->get_error_message() ),
    180180                    esc_html__( 'Media Library Organizer: Tree View: Error', 'media-library-organizer' ),
    181181                    array(
     
    273273 * @since   1.1.1
    274274 */
    275 function Media_Library_Organizer_Tree_View() { /* phpcs:ignore */
     275function Media_Library_Organizer_Tree_View() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
    276276
    277277    return Media_Library_Organizer_Tree_View::get_instance();
  • media-library-organizer/trunk/addons/tree-view/includes/global/class-media-library-organizer-tree-view-media.php

    r2688245 r2758024  
    5858     * @param   string    $ext        If defined, loads minified JS.
    5959     */
    60     public function enqueue_js( $screen, $screens, $mode, $ext ) { /* phpcs:ignore */
     60    public function enqueue_js( $screen, $screens, $mode, $ext ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    6161
    6262        // Bail if Tree View isn't enabled.
     
    420420        );
    421421        foreach ( $conditions as $condition ) {
    422             if ( ! isset( $_REQUEST[ $condition ] ) ) { /* phpcs:ignore */
     422            if ( ! isset( $_REQUEST[ $condition ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    423423                continue;
    424424            }
    425425
    426             if ( empty( $_REQUEST[ $condition ] ) ) { /* phpcs:ignore */
     426            if ( empty( $_REQUEST[ $condition ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    427427                continue;
    428428            }
    429429
    430             $args[ $condition ] = sanitize_text_field( $_REQUEST[ $condition ] ); /* phpcs:ignore */
     430            $args[ $condition ] = sanitize_text_field( $_REQUEST[ $condition ] ); // phpcs:ignore WordPress.Security.NonceVerification
    431431        }
    432432
  • media-library-organizer/trunk/addons/tree-view/includes/global/class-media-library-organizer-tree-view-taxonomy-walker.php

    r2688245 r2758024  
    102102
    103103        // Sanitize request.
    104         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     104        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    105105
    106106        foreach ( $conditions as $condition ) {
  • media-library-organizer/trunk/addons/tree-view/views/admin/media.php

    r2688245 r2758024  
    2727
    2828        <div id="media-library-organizer-tree-view-list"<?php echo ( $jstree_enabled ? ' class="media-library-organizer-tree-view-enabled"' : '' ); ?>>
    29             <?php echo $output; /* phpcs:ignore */ ?>
     29            <?php echo $output; // phpcs:ignore WordPress.Security.EscapeOutput ?>
    3030        </div>
    3131    </form>
  • media-library-organizer/trunk/assets/css/media.css

    r2493585 r2758024  
    1 .media-library-organizer-feather-image{background:url(../../_modules/dashboard/assets/feather/image.svg) transparent no-repeat scroll 0 0;background-size:16px 16px;width:16px;height:16px;display:inline-block;vertical-align:text-top}div.selectize-control{display:inline-block;min-width:160px;vertical-align:middle;line-height:1}form.compat-item table.compat-attachment-fields p.help{margin:0}form.compat-item table.compat-attachment-fields tr th{display:block;width:100%;margin:5px 0 0 0;padding:5px 0 0 0;border:none;border-top:1px solid #ddd}form.compat-item table.compat-attachment-fields tr th label span{text-align:left;font-weight:600}form.compat-item table.compat-attachment-fields tr td.field{clear:both;float:left;width:100%;margin:0;border:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel{margin-top:-2px;min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #ddd;background-color:#fdfdfd}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist{list-style:none;margin:15px 0;padding:0}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist li{line-height:1.7}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist ul{margin-left:18px}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields{display:grid;grid-gap:10px;grid-template-columns:4fr 1fr}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields.hidden{display:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv input[type=checkbox]{margin:0 3px 0 0}table.media .column-title .has-media-icon~.row-actions{clear:both;margin-left:0}#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{display:grid;column-gap:10px;row-gap:10px;box-sizing:border-box;margin:10px 0;max-width:33%;width:33%;grid-template-columns:1fr 4fr;grid-template-rows:32px;grid-template-areas:"searchlabel search"}#posts-filter .search-form label.media-search-input-label,.media-frame-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label,.media-modal-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label{position:static !important;line-height:32px;text-align:right;grid-area:searchlabel}#posts-filter .search-form input#media-search-input,.media-frame-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input,.media-modal-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input{grid-area:search;width:100% !important;margin:0;height:32px;line-height:32px}.media-modal-content .media-frame-title h1:before{content:"";margin:0}.media-modal-content .media-attachments-filter-heading:before{content:"";margin:0}.media-modal-content .media-frame .media-toolbar select.attachment-filters{width:auto !important}.media-modal-content .attachments-browser .media-toolbar{height:50px;background-color:#f3f3f3;border-bottom:1px solid #ddd}.media-modal-content .attachments-browser .attachments{top:50px}.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:66%;width:66%}.media-modal-content .attachments-browser .media-toolbar-secondary h2{display:none}.media-modal-content .attachments-browser .media-toolbar-secondary select{margin-top:10px}.media-modal-content .media-content{position:absolute;left:0;padding:20px}.media-modal-content .media-content.has-sidebar{right:300px}.media-modal-content .media-content .media-library-organizer-modal-content-field{padding:0 0 20px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns{display:grid;grid-gap:10px}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-2{grid-template-columns:repeat(2, 50%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-3{grid-template-columns:repeat(3, 33%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-4{grid-template-columns:repeat(4, 25%)}.media-modal-content .media-content .media-library-organizer-modal-content-field label{display:block;font-size:15px;margin:0 0 5px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field input,.media-modal-content .media-content .media-library-organizer-modal-content-field select{font-size:15px}@media only screen and (max-width: 1840px){.media-modal-content .attachments-browser .media-toolbar{height:90px}.media-modal-content .attachments-browser .attachments{top:90px}}@media only screen and (max-width: 1330px){.media-modal-content .attachments-browser .media-toolbar{height:130px}.media-modal-content .attachments-browser .attachments{top:130px}}@media only screen and (max-width: 1000px){.media-modal-content .attachments-browser .media-toolbar{height:170px}.media-modal-content .attachments-browser .attachments{top:170px}}@media only screen and (max-width: 900px){.media-modal-content .attachments-browser .media-toolbar{height:210px}.media-modal-content .attachments-browser .attachments{top:210px}}@media only screen and (max-width: 640px){.media-modal-content .attachments-browser .media-toolbar{height:160px}.media-modal-content .attachments-browser .attachments{top:160px}}@media only screen and (max-width: 1000px){#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{max-width:100%;width:100%;grid-template-columns:50px auto;grid-template-rows:32px;grid-template-areas:"searchlabel search"}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:100%;width:100%;height:auto}}@media only screen and (max-width: 782px){div.media-library-organizer-selectize,div.media-library-organizer-selectize-search{width:200px}div.media-library-organizer-selectize .selectize-input,div.media-library-organizer-selectize-search .selectize-input{min-height:40px;font-size:16px;line-height:1.625;padding:5px 24px 5px 8px}}
     1.media-library-organizer-feather-image{background:url(../../_modules/dashboard/assets/feather/image.svg) rgba(0,0,0,0) no-repeat scroll 0 0;background-size:16px 16px;width:16px;height:16px;display:inline-block;vertical-align:text-top}div.selectize-control{display:inline-block;min-width:160px;vertical-align:middle;line-height:1}form.compat-item table.compat-attachment-fields p.help{margin:0}form.compat-item table.compat-attachment-fields tr th{display:block;width:100%;margin:5px 0 0 0;padding:5px 0 0 0;border:none;border-top:1px solid #ddd}form.compat-item table.compat-attachment-fields tr th label span{text-align:left;font-weight:600}form.compat-item table.compat-attachment-fields tr td.field{clear:both;float:left;width:100%;margin:0;border:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel{margin-top:-2px;min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:solid 1px #ddd;background-color:#fdfdfd}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist{list-style:none;margin:15px 0;padding:0}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist li{line-height:1.7}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv div.tabs-panel ul.categorychecklist ul{margin-left:18px}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields{display:grid;grid-gap:10px;grid-template-columns:4fr 1fr}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv #mlo-taxonomy-term-add .mlo-taxonomy-term-add-fields.hidden{display:none}form.compat-item table.compat-attachment-fields tr td.field div.categorydiv input[type=checkbox]{margin:0 3px 0 0}table.media .column-title .has-media-icon~.row-actions{clear:both;margin-left:0}#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{display:grid;column-gap:10px;row-gap:10px;box-sizing:border-box;margin:10px 0;max-width:33%;width:33%;grid-template-columns:1fr 4fr;grid-template-rows:32px;grid-template-areas:"searchlabel search"}#posts-filter .search-form label.media-search-input-label,.media-frame-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label,.media-modal-content .attachments-browser .media-toolbar-primary.search-form label.media-search-input-label{position:static !important;line-height:32px;text-align:right;grid-area:searchlabel}#posts-filter .search-form input#media-search-input,.media-frame-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input,.media-modal-content .attachments-browser .media-toolbar-primary.search-form input#media-search-input{grid-area:search;width:100% !important;margin:0;height:32px;line-height:32px}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{padding-bottom:10px}.media-modal-content .media-frame-title h1:before{content:"";margin:0}.media-modal-content .media-attachments-filter-heading:before{content:"";margin:0}.media-modal-content .media-frame .media-toolbar select.attachment-filters{width:auto !important}.media-modal-content .attachments-browser .media-toolbar{height:auto;background-color:#f3f3f3;border-bottom:1px solid #ddd}.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:66%;width:66%}.media-modal-content .attachments-browser .media-toolbar-secondary h2{display:none}.media-modal-content .attachments-browser .media-toolbar-secondary select{margin-top:10px}.media-modal-content .media-content{position:absolute;left:0;padding:20px}.media-modal-content .media-content.has-sidebar{right:300px}.media-modal-content .media-content .media-library-organizer-modal-content-field{padding:0 0 20px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns{display:grid;grid-gap:10px}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-2{grid-template-columns:repeat(2, 50%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-3{grid-template-columns:repeat(3, 33%)}.media-modal-content .media-content .media-library-organizer-modal-content-field.columns-4{grid-template-columns:repeat(4, 25%)}.media-modal-content .media-content .media-library-organizer-modal-content-field label{display:block;font-size:15px;margin:0 0 5px 0}.media-modal-content .media-content .media-library-organizer-modal-content-field input,.media-modal-content .media-content .media-library-organizer-modal-content-field select{font-size:15px}@media only screen and (max-width: 1000px){#posts-filter .search-form,.media-frame-content .attachments-browser .media-toolbar-primary.search-form,.media-modal-content .attachments-browser .media-toolbar-primary.search-form{max-width:100%;width:100%;grid-template-columns:50px auto;grid-template-rows:32px;grid-template-areas:"searchlabel search"}.media-frame-content .attachments-browser .media-toolbar-secondary,.media-modal-content .attachments-browser .media-toolbar-secondary{max-width:100%;width:100%;height:auto}}@media only screen and (max-width: 782px){div.media-library-organizer-selectize,div.media-library-organizer-selectize-search{width:200px}div.media-library-organizer-selectize .selectize-input,div.media-library-organizer-selectize-search .selectize-input{min-height:40px;font-size:16px;line-height:1.625;padding:5px 24px 5px 8px}}
  • media-library-organizer/trunk/assets/js/media.js

    r2692053 r2758024  
    573573        wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend(
    574574            {
    575 
    576                 /**
    577                  * When the toolbar is created, add our custom filters to it, which
    578                  * are rendered as select dropdowns.
    579                  *
    580                  * @since   1.0.0
    581                  */
     575                    /**
     576                     * When the toolbar is created, add our custom filters to it, which
     577                     * are rendered as select dropdowns.
     578                     *
     579                     * @since   1.0.0
     580                     */
    582581                createToolbar: function() {
    583582
    584583                    // Make sure to load the original toolbar.
    585584                    AttachmentsBrowser.prototype.createToolbar.call( this );
     585
     586                    // Bail if search is not included in the toolbar, as this means we're on a grid view
     587                    // that doesn't display filters, such as Edit Gallery.
     588                    if ( ! this.options.search ) {
     589                        return;
     590                    }
    586591
    587592                    // Define the priority order at which these filters should begin output in the Grid View Toolbar.
     
    603608                        );
    604609
    605                         // Increment priority so the order of filters remains the same
    606                         // if they're subsequently updated by calling mediaLibraryOrganizerGridViewInitializeTaxonomyFilter().
    607                         priority++;
    608                     }
    609 
    610                     // Add the orderby filter to the toolbar.
     610                            // Increment priority so the order of filters remains the same
     611                            // if they're subsequently updated by calling mediaLibraryOrganizerGridViewInitializeTaxonomyFilter().
     612                            priority++;
     613                    }
     614
     615                        // Add the orderby filter to the toolbar.
    611616                    if ( media_library_organizer_media.settings.orderby_enabled == 1 ) {
    612617                        this.toolbar.set(
     
    626631                    }
    627632
    628                     // Add the order filter to the toolbar.
     633                        // Add the order filter to the toolbar.
    629634                    if ( media_library_organizer_media.settings.order_enabled == 1 ) {
    630635                        this.toolbar.set(
     
    644649                    }
    645650
    646                     // Fire the mlo:grid:filters:add event that Addons can hook into and add their own Filters now.
    647                     wp.media.events.trigger(
    648                         'mlo:grid:filters:add',
    649                         {
    650                             attachments_browser: this,
    651                             priority: priority
    652                         }
     651                        // Fire the mlo:grid:filters:add event that Addons can hook into and add their own Filters now.
     652                        wp.media.events.trigger(
     653                            'mlo:grid:filters:add',
     654                            {
     655                                attachments_browser: this,
     656                                priority: priority
     657                            }
     658                        );
     659
     660                        // Fire the mlo:grid:bulk_select:enabled event that Addons can hook into and listen
     661                        // when Bulk select is enabled by clicking the Bulk Select button.
     662                        this.controller.on(
     663                            'select:activate',
     664                            function() {
     665                                wp.media.events.trigger( 'mlo:grid:bulk_select:enabled' );
     666                            }
     667                        );
     668
     669                        // Fire the mlo:grid:bulk_select:disabled event that Addons can hook into and listen
     670                        // when Bulk select is disabled by clicking the Cancel button.
     671                        this.controller.on(
     672                            'select:deactivate',
     673                            function() {
     674                                wp.media.events.trigger( 'mlo:grid:bulk_select:disabled' );
     675                            }
     676                        );
     677
     678                        // Fire the mlo:grid:attachments:bulk_actions:done event that Addons can hook into and listen
     679                        // when a Bulk select action (e.g. Delete) completes.
     680                        this.controller.on(
     681                            'selection:action:done',
     682                            function() {
     683                                wp.media.events.trigger( 'mlo:grid:attachments:bulk_actions:done' );
     684                            }
     685                        );
     686
     687                        // Store the toolbar in a var so we can interact with it later.
     688                        MediaLibraryOrganizerAttachmentsBrowser = this;
     689
     690                },
     691
     692                createAttachmentsHeading: function() {
     693
     694                    // Make sure to load the original attachments heading. Check if we still need this function.
     695                    AttachmentsBrowser.prototype.createAttachmentsHeading.call( this );
     696
     697                },
     698
     699                    /**
     700                     * Set attachment wrapper view top to match the height of the toolbar, so attachments
     701                     * are not cut off.
     702                     */
     703                createAttachmentsWrapperView: function() {
     704
     705                    // Make sure to load the original attachments wrapper view.
     706                    AttachmentsBrowser.prototype.createAttachmentsWrapperView.call( this );
     707
     708                    // Set wrapper offset on load.
     709                    setTimeout(
     710                        function() {
     711                            MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top = ( MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight + 10 ) + 'px';
     712                        },
     713                        500
    653714                    );
    654715
    655                     // Fire the mlo:grid:bulk_select:enabled event that Addons can hook into and listen
    656                     // when Bulk select is enabled by clicking the Bulk Select button.
    657                     this.controller.on(
    658                         'select:activate',
    659                         function() {
    660                             wp.media.events.trigger( 'mlo:grid:bulk_select:enabled' );
    661                         }
    662                     );
    663 
    664                     // Fire the mlo:grid:bulk_select:disabled event that Addons can hook into and listen
    665                     // when Bulk select is disabled by clicking the Cancel button.
    666                     this.controller.on(
    667                         'select:deactivate',
    668                         function() {
    669                             wp.media.events.trigger( 'mlo:grid:bulk_select:disabled' );
    670                         }
    671                     );
    672 
    673                     // Fire the mlo:grid:attachments:bulk_actions:done event that Addons can hook into and listen
    674                     // when a Bulk select action (e.g. Delete) completes.
    675                     this.controller.on(
    676                         'selection:action:done',
    677                         function() {
    678                             wp.media.events.trigger( 'mlo:grid:attachments:bulk_actions:done' );
    679                         }
    680                     );
    681 
    682                     // Store the toolbar in a var so we can interact with it later.
    683                     MediaLibraryOrganizerAttachmentsBrowser = this;
     716                    // Update wrapper offset on window resize.
     717                    window.onresize = function() {
     718                        MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top = ( MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight + 10 ) + 'px';
     719                    }
    684720
    685721                },
    686 
    687                 createAttachmentsHeading: function() {
    688 
    689                     // Make sure to load the original attachments heading.
    690                     AttachmentsBrowser.prototype.createAttachmentsHeading.call( this );
    691 
    692                 }
    693722
    694723            }
     
    11321161        }
    11331162
    1134         if ( mediaLibraryOrganizerUploader ) {
     1163        if ( mediaLibraryOrganizerUploader && typeof mediaLibraryOrganizerUploader.uploader !== 'undefined' ) {
    11351164            var selected_terms = {};
    11361165            for ( let taxonomy_name in media_library_organizer_media.taxonomies ) {
     
    11581187    function( atts ) {
    11591188
    1160         if ( mediaLibraryOrganizerUploader ) {
     1189        if ( mediaLibraryOrganizerUploader && typeof mediaLibraryOrganizerUploader.uploader !== 'undefined' ) {
    11611190            mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[ atts.taxonomy_name ] = atts.slug;
    11621191        }
  • media-library-organizer/trunk/assets/js/min/media-min.js

    r2692053 r2758024  
    1 function mediaLibraryOrganizerQueryInitialize(){!function(){wp.media.query=function(e){return new wp.media.model.Attachments(null,{props:_.extend(_.defaults(e||{},{orderby:media_library_organizer_media.defaults.orderby,order:media_library_organizer_media.defaults.order}),{query:!0})})};var e=wp.media.model.Query,r;_.extend(e,{get:(r=[],function(i,a){var t={},n=e.orderby,o=e.defaultProps,d,m=!1;return delete i.query,delete i.cache,_.defaults(i,o),i.order=i.order.toUpperCase(),"DESC"!==i.order&&"ASC"!==i.order&&(i.order=o.order.toUpperCase()),_.contains(n.allowed,i.orderby)||(i.orderby=o.orderby),_.each(["include","exclude"],(function(e){i[e]&&!_.isArray(i[e])&&(i[e]=[i[e]])})),_.each(i,(function(r,i){_.isNull(r)||(t[e.propmap[i]||i]=r)})),_.defaults(t,e.defaultArgs),t.orderby=n.valuemap[i.orderby]||i.orderby,m=!1,r=[],d||(d=new e([],_.extend(a||{},{props:i,args:t})),r.push(d)),wp.media.events.trigger("mlo:grid:query",{query:d}),d})})}(jQuery,_)}function mediaLibraryOrganizerUploaderInitializeEvents(){!function($,e){void 0!==wp.Uploader&&e.extend(wp.Uploader.prototype,{init:function(){wp.media.events.trigger("mlo:grid:attachment:upload:init")},added:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:added",e)},progress:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:progress",e)},success:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:success",e)},error:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:error",e)},complete:function(){wp.media.events.trigger("mlo:grid:attachment:upload:complete")},refresh:function(){wp.media.events.trigger("mlo:grid:attachment:upload:refresh")}})}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(){!function(){for(let e in media_library_organizer_media.taxonomies)mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,media_library_organizer_media.taxonomies[e].terms,media_library_organizer_media.taxonomies[e].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned,media_library_organizer_media.show_attachment_count)}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t){jQuery,_,"0"!=media_library_organizer_media.settings[e+"_enabled"]&&media_library_organizer_media.settings[e+"_enabled"]&&(MediaLibraryOrganizerTaxonomyFilter[e]=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter-"+e,createFilters:function(){var n={},o,o;_.each(r||{},(function(r,i){var a={};a[e]=r.slug;var o=r.name+("1"===t?" ("+r.count+")":"");n[i]={text:o,props:a}})),(o={})[e]="",n.all={text:i,props:o,priority:10},(o={})[e]="-1",n.unassigned={text:a,props:o,priority:10},this.filters=n},change:function(){var r=this.filters[this.el.value];r&&(this.model.set(r.props),wp.media.events.trigger("mlo:grid:filter:change:term",{taxonomy_name:e,slug:r.props[e]}))},select:function(){var e=this.model,r="all",i=e.toJSON();wp.media.events.trigger("mlo:grid:filter:select",{props:i}),_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderByFilter(){jQuery,_,1==media_library_organizer_media.settings.orderby_enabled&&(MediaLibraryOrganizerTaxonomyOrderBy=wp.media.view.AttachmentFilters.extend({id:"media-attachment-orderby",createFilters:function(){var e={};_.each(media_library_organizer_media.orderby||{},(function(r,i){e[i]={text:r,props:{orderby:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderFilter(){jQuery,_,1==media_library_organizer_media.settings.order_enabled&&(MediaLibraryOrganizerTaxonomyOrder=wp.media.view.AttachmentFilters.extend({id:"media-attachment-order",createFilters:function(){var e={};_.each(media_library_organizer_media.order||{},(function(r,i){e[i]={text:r,props:{order:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewAddFiltersToToolbar(){var e;jQuery,_,e=wp.media.view.AttachmentsBrowser,wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){e.prototype.createToolbar.call(this);var r=-75;for(let e in MediaLibraryOrganizerTaxonomyFilter)this.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:this.controller,model:this.collection.props,priority:r}).render()),r++;1==media_library_organizer_media.settings.orderby_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrderBy",new MediaLibraryOrganizerTaxonomyOrderBy({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),1==media_library_organizer_media.settings.order_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrder",new MediaLibraryOrganizerTaxonomyOrder({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),wp.media.events.trigger("mlo:grid:filters:add",{attachments_browser:this,priority:r}),this.controller.on("select:activate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:enabled")})),this.controller.on("select:deactivate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:disabled")})),this.controller.on("selection:action:done",(function(){wp.media.events.trigger("mlo:grid:attachments:bulk_actions:done")})),MediaLibraryOrganizerAttachmentsBrowser=this},createAttachmentsHeading:function(){e.prototype.createAttachmentsHeading.call(this)}})}function mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(){!function($,e){var r;$("body").on("click","table.compat-attachment-fields a.taxonomy-add-new",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm($(this).data("taxonomy"))})),$("body").on("click","table.compat-attachment-fields div.mlo-taxonomy-term-add-fields input[type=button]",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentAddTerm($(this).data("taxonomy"),$("input[type=text]",$(this).parent()).val())})),e.extend(wp.media.view.Attachment.prototype,{updateSave:function(e){var i=this._save=this._save||{status:"ready"};return e&&e!==i.status&&(this.$el.removeClass("save-"+i.status),i.status=e),this.$el.addClass("save-"+i.status),"waiting"!=r||"ready"!=i.status&&"complete"!=i.status||wp.media.events.trigger("mlo:grid:edit-attachment:edited",{attachment_id:this.model.id,attachment:this.model.attributes,changed:this.model.changed,taxonomy_term_changed:void 0!==this.model.changed.compat}),r=i.status,this}}),e.extend(wp.media.view.Attachment.Details.prototype,{moveFocus:function(){wp.media.events.trigger("mlo:grid:edit-attachment:deleted"),this.previousAttachment.length?this.previousAttachment.focus():this.nextAttachment.length?this.nextAttachment.focus():this.controller.uploader&&this.controller.uploader.$browser?this.controller.uploader.$browser.focus():this.moveFocusToLastFallback()}})}(jQuery,_)}function mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e,r,i,a,t){var $;$=jQuery,MediaLibraryOrganizerTaxonomyFilter.hasOwnProperty(e)&&(mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t),MediaLibraryOrganizerAttachmentsBrowser.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:MediaLibraryOrganizerAttachmentsBrowser.controller,model:MediaLibraryOrganizerAttachmentsBrowser.collection.props,priority:-75}).render()))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomies_terms.action,nonce:media_library_organizer_media.get_taxonomies_terms.nonce},(function(e){if(e.success)for(let r in e.data)mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data[r].taxonomy.name,e.data[r].terms,e.data[r].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned);else alert(e.data)}))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilter(e){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomy_terms.action,nonce:media_library_organizer_media.get_taxonomy_terms.nonce,taxonomy_name:e},(function(e){e.success?mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data.taxonomy.name,e.data.terms,e.data.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned):alert(e.data)}))}function mediaLibraryOrganizerListViewReplaceTaxonomyFilter(e,r,i){var $;($=jQuery)("select#"+e).replaceWith(r),i.length>0&&$("select#"+e).val(i)}function mediaLibraryOrganizerListViewUpdateAttachmentTerms(e,r,i){var $;($=jQuery)("td.taxonomy-"+e+" a").each((function(){$(this).text()==r.name&&(i?($(this).text(i.name),$(this).attr("href","upload.php?taxonomy="+e+"&term="+i.slug)):$(this).remove())})),$("td.taxonomy-"+e).each((function(){$(this).html($(this).html().replace(/(^\s*,)|(,\s*$)/g,""))}))}function mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e).hasClass("hidden")?$(".mlo-taxonomy-term-add-fields."+e).removeClass("hidden"):$(".mlo-taxonomy-term-add-fields."+e).addClass("hidden")}function mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e+"input[type=text]").val("")}function mediaLibraryOrganizerEditAttachmentAddTerm(e,r,i){var $,a;$=jQuery,a={action:media_library_organizer_media.create_term.action,nonce:media_library_organizer_media.create_term.nonce,taxonomy_name:e,term_name:r,term_parent_id:i},$.post(media_library_organizer_media.ajaxurl,a,(function(r){r.success?(wp.media.events.trigger("mlo:grid:edit-attachment:added:term",r.data),$("ul#"+r.data.term.taxonomy+"checklist").prepend(r.data.checkbox),mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e),$("ul#"+r.data.term.taxonomy+'checklist li:first input[type="checkbox"]').trigger("change")):alert(r.data)}))}function mediaLibraryOrganizerGridViewRefresh(){void 0!==wp.media.frame.library?wp.media.frame.library.props.set({ignore:+new Date}):wp.media.frame.content.get().collection.props.set({ignore:+new Date})}function mediaLibraryOrganizerInitialize(){mediaLibraryOrganizerQueryInitialize(),mediaLibraryOrganizerUploaderInitializeEvents(),mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(),mediaLibraryOrganizerGridViewInitializeOrderByFilter(),mediaLibraryOrganizerGridViewInitializeOrderFilter(),mediaLibraryOrganizerGridViewAddFiltersToToolbar(),mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(),jQuery(document).ready((function($){"undefined"!=typeof mediaLibraryOrganizerSelectizeInit&&mediaLibraryOrganizerSelectizeInit()}))}var mediaLibraryOrganizerUploader=!1,MediaLibraryOrganizerTaxonomyFilter={},MediaLibraryOrganizerTaxonomyOrderBy,MediaLibraryOrganizerTaxonomyOrder,MediaLibraryOrganizerAttachmentsBrowser;wp.media.events.on("mlo:grid:attachment:upload:init",(function(){if(mediaLibraryOrganizerUploader||void 0===wp.media.frame.uploader||(mediaLibraryOrganizerUploader=wp.media.frame.uploader),mediaLibraryOrganizerUploader){var e={};for(let r in media_library_organizer_media.taxonomies)e[r]=media_library_organizer_media.taxonomies[r].selected_term;mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer=e}})),wp.media.events.on("mlo:grid:filter:change:term",(function(e){mediaLibraryOrganizerUploader&&(mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[e.taxonomy_name]=e.slug)})),wp.media.events.on("mlo:grid:attachment:upload:success",(function(e){mediaLibraryOrganizerGridViewRefresh()})),wp.media.events.on("mlo:grid:edit-attachment:added:term",(function(e){mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.taxonomy.name,e.terms,e.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned)})),wp.media.events.on("mlo:grid:edit-attachment:edited",(function(e){var $;$=jQuery,e.taxonomy_term_changed&&(mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(),mediaLibraryOrganizerGridViewRefresh())})),wp.media.events.on("mlo:grid:edit-attachment:deleted",(function(e){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),wp.media.events.on("mlo:grid:bulk_select:disabled",(function(){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),mediaLibraryOrganizerInitialize();
     1function mediaLibraryOrganizerQueryInitialize(){!function(){wp.media.query=function(e){return new wp.media.model.Attachments(null,{props:_.extend(_.defaults(e||{},{orderby:media_library_organizer_media.defaults.orderby,order:media_library_organizer_media.defaults.order}),{query:!0})})};var e=wp.media.model.Query,r;_.extend(e,{get:(r=[],function(i,a){var t={},n=e.orderby,o=e.defaultProps,d,m=!1;return delete i.query,delete i.cache,_.defaults(i,o),i.order=i.order.toUpperCase(),"DESC"!==i.order&&"ASC"!==i.order&&(i.order=o.order.toUpperCase()),_.contains(n.allowed,i.orderby)||(i.orderby=o.orderby),_.each(["include","exclude"],(function(e){i[e]&&!_.isArray(i[e])&&(i[e]=[i[e]])})),_.each(i,(function(r,i){_.isNull(r)||(t[e.propmap[i]||i]=r)})),_.defaults(t,e.defaultArgs),t.orderby=n.valuemap[i.orderby]||i.orderby,m=!1,r=[],d||(d=new e([],_.extend(a||{},{props:i,args:t})),r.push(d)),wp.media.events.trigger("mlo:grid:query",{query:d}),d})})}(jQuery,_)}function mediaLibraryOrganizerUploaderInitializeEvents(){!function($,e){void 0!==wp.Uploader&&e.extend(wp.Uploader.prototype,{init:function(){wp.media.events.trigger("mlo:grid:attachment:upload:init")},added:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:added",e)},progress:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:progress",e)},success:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:success",e)},error:function(e){wp.media.events.trigger("mlo:grid:attachment:upload:error",e)},complete:function(){wp.media.events.trigger("mlo:grid:attachment:upload:complete")},refresh:function(){wp.media.events.trigger("mlo:grid:attachment:upload:refresh")}})}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(){!function(){for(let e in media_library_organizer_media.taxonomies)mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,media_library_organizer_media.taxonomies[e].terms,media_library_organizer_media.taxonomies[e].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned,media_library_organizer_media.show_attachment_count)}(jQuery,_)}function mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t){jQuery,_,"0"!=media_library_organizer_media.settings[e+"_enabled"]&&media_library_organizer_media.settings[e+"_enabled"]&&(MediaLibraryOrganizerTaxonomyFilter[e]=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter-"+e,createFilters:function(){var n={},o,o;_.each(r||{},(function(r,i){var a={};a[e]=r.slug;var o=r.name+("1"===t?" ("+r.count+")":"");n[i]={text:o,props:a}})),(o={})[e]="",n.all={text:i,props:o,priority:10},(o={})[e]="-1",n.unassigned={text:a,props:o,priority:10},this.filters=n},change:function(){var r=this.filters[this.el.value];r&&(this.model.set(r.props),wp.media.events.trigger("mlo:grid:filter:change:term",{taxonomy_name:e,slug:r.props[e]}))},select:function(){var e=this.model,r="all",i=e.toJSON();wp.media.events.trigger("mlo:grid:filter:select",{props:i}),_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderByFilter(){jQuery,_,1==media_library_organizer_media.settings.orderby_enabled&&(MediaLibraryOrganizerTaxonomyOrderBy=wp.media.view.AttachmentFilters.extend({id:"media-attachment-orderby",createFilters:function(){var e={};_.each(media_library_organizer_media.orderby||{},(function(r,i){e[i]={text:r,props:{orderby:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewInitializeOrderFilter(){jQuery,_,1==media_library_organizer_media.settings.order_enabled&&(MediaLibraryOrganizerTaxonomyOrder=wp.media.view.AttachmentFilters.extend({id:"media-attachment-order",createFilters:function(){var e={};_.each(media_library_organizer_media.order||{},(function(r,i){e[i]={text:r,props:{order:i}}})),this.filters=e},select:function(){var e=this.model,r="all",i=e.toJSON();_.find(this.filters,(function(e,a){var t;if(_.all(e.props,(function(e,r){return e===(_.isUndefined(i[r])?null:i[r])})))return r=a})),this.$el.val(r)}}))}function mediaLibraryOrganizerGridViewAddFiltersToToolbar(){var e;jQuery,_,e=wp.media.view.AttachmentsBrowser,wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){if(e.prototype.createToolbar.call(this),this.options.search){var r=-75;for(let e in MediaLibraryOrganizerTaxonomyFilter)this.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:this.controller,model:this.collection.props,priority:r}).render()),r++;1==media_library_organizer_media.settings.orderby_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrderBy",new MediaLibraryOrganizerTaxonomyOrderBy({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),1==media_library_organizer_media.settings.order_enabled&&(this.toolbar.set("MediaLibraryOrganizerTaxonomyOrder",new MediaLibraryOrganizerTaxonomyOrder({controller:this.controller,model:this.collection.props,priority:r}).render()),r++),wp.media.events.trigger("mlo:grid:filters:add",{attachments_browser:this,priority:r}),this.controller.on("select:activate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:enabled")})),this.controller.on("select:deactivate",(function(){wp.media.events.trigger("mlo:grid:bulk_select:disabled")})),this.controller.on("selection:action:done",(function(){wp.media.events.trigger("mlo:grid:attachments:bulk_actions:done")})),MediaLibraryOrganizerAttachmentsBrowser=this}},createAttachmentsHeading:function(){e.prototype.createAttachmentsHeading.call(this)},createAttachmentsWrapperView:function(){e.prototype.createAttachmentsWrapperView.call(this),setTimeout((function(){MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top=MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight+10+"px"}),500),window.onresize=function(){MediaLibraryOrganizerAttachmentsBrowser.attachmentsWrapper.el.style.top=MediaLibraryOrganizerAttachmentsBrowser.toolbar.el.clientHeight+10+"px"}}})}function mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(){!function($,e){var r;$("body").on("click","table.compat-attachment-fields a.taxonomy-add-new",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm($(this).data("taxonomy"))})),$("body").on("click","table.compat-attachment-fields div.mlo-taxonomy-term-add-fields input[type=button]",(function(e){e.preventDefault(),mediaLibraryOrganizerEditAttachmentAddTerm($(this).data("taxonomy"),$("input[type=text]",$(this).parent()).val())})),e.extend(wp.media.view.Attachment.prototype,{updateSave:function(e){var i=this._save=this._save||{status:"ready"};return e&&e!==i.status&&(this.$el.removeClass("save-"+i.status),i.status=e),this.$el.addClass("save-"+i.status),"waiting"!=r||"ready"!=i.status&&"complete"!=i.status||wp.media.events.trigger("mlo:grid:edit-attachment:edited",{attachment_id:this.model.id,attachment:this.model.attributes,changed:this.model.changed,taxonomy_term_changed:void 0!==this.model.changed.compat}),r=i.status,this}}),e.extend(wp.media.view.Attachment.Details.prototype,{moveFocus:function(){wp.media.events.trigger("mlo:grid:edit-attachment:deleted"),this.previousAttachment.length?this.previousAttachment.focus():this.nextAttachment.length?this.nextAttachment.focus():this.controller.uploader&&this.controller.uploader.$browser?this.controller.uploader.$browser.focus():this.moveFocusToLastFallback()}})}(jQuery,_)}function mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e,r,i,a,t){var $;$=jQuery,MediaLibraryOrganizerTaxonomyFilter.hasOwnProperty(e)&&(mediaLibraryOrganizerGridViewInitializeTaxonomyFilter(e,r,i,a,t),MediaLibraryOrganizerAttachmentsBrowser.toolbar.set(e,new MediaLibraryOrganizerTaxonomyFilter[e]({controller:MediaLibraryOrganizerAttachmentsBrowser.controller,model:MediaLibraryOrganizerAttachmentsBrowser.collection.props,priority:-75}).render()))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomies_terms.action,nonce:media_library_organizer_media.get_taxonomies_terms.nonce},(function(e){if(e.success)for(let r in e.data)mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data[r].taxonomy.name,e.data[r].terms,e.data[r].taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned);else alert(e.data)}))}function mediaLibraryOrganizerGridViewUpdateTaxonomyFilter(e){var $;($=jQuery).post(media_library_organizer_media.ajaxurl,{action:media_library_organizer_media.get_taxonomy_terms.action,nonce:media_library_organizer_media.get_taxonomy_terms.nonce,taxonomy_name:e},(function(e){e.success?mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.data.taxonomy.name,e.data.terms,e.data.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned):alert(e.data)}))}function mediaLibraryOrganizerListViewReplaceTaxonomyFilter(e,r,i){var $;($=jQuery)("select#"+e).replaceWith(r),i.length>0&&$("select#"+e).val(i)}function mediaLibraryOrganizerListViewUpdateAttachmentTerms(e,r,i){var $;($=jQuery)("td.taxonomy-"+e+" a").each((function(){$(this).text()==r.name&&(i?($(this).text(i.name),$(this).attr("href","upload.php?taxonomy="+e+"&term="+i.slug)):$(this).remove())})),$("td.taxonomy-"+e).each((function(){$(this).html($(this).html().replace(/(^\s*,)|(,\s*$)/g,""))}))}function mediaLibraryOrganizerEditAttachmentToggleTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e).hasClass("hidden")?$(".mlo-taxonomy-term-add-fields."+e).removeClass("hidden"):$(".mlo-taxonomy-term-add-fields."+e).addClass("hidden")}function mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e){var $;($=jQuery)(".mlo-taxonomy-term-add-fields."+e+"input[type=text]").val("")}function mediaLibraryOrganizerEditAttachmentAddTerm(e,r,i){var $,a;$=jQuery,a={action:media_library_organizer_media.create_term.action,nonce:media_library_organizer_media.create_term.nonce,taxonomy_name:e,term_name:r,term_parent_id:i},$.post(media_library_organizer_media.ajaxurl,a,(function(r){r.success?(wp.media.events.trigger("mlo:grid:edit-attachment:added:term",r.data),$("ul#"+r.data.term.taxonomy+"checklist").prepend(r.data.checkbox),mediaLibraryOrganizerEditAttachmentResetTaxonomyTermForm(e),$("ul#"+r.data.term.taxonomy+'checklist li:first input[type="checkbox"]').trigger("change")):alert(r.data)}))}function mediaLibraryOrganizerGridViewRefresh(){void 0!==wp.media.frame.library?wp.media.frame.library.props.set({ignore:+new Date}):wp.media.frame.content.get().collection.props.set({ignore:+new Date})}function mediaLibraryOrganizerInitialize(){mediaLibraryOrganizerQueryInitialize(),mediaLibraryOrganizerUploaderInitializeEvents(),mediaLibraryOrganizerGridViewInitializeTaxonomyFilters(),mediaLibraryOrganizerGridViewInitializeOrderByFilter(),mediaLibraryOrganizerGridViewInitializeOrderFilter(),mediaLibraryOrganizerGridViewAddFiltersToToolbar(),mediaLibraryOrganizerGridViewInitializeEditAttachmentListeners(),jQuery(document).ready((function($){"undefined"!=typeof mediaLibraryOrganizerSelectizeInit&&mediaLibraryOrganizerSelectizeInit()}))}var mediaLibraryOrganizerUploader=!1,MediaLibraryOrganizerTaxonomyFilter={},MediaLibraryOrganizerTaxonomyOrderBy,MediaLibraryOrganizerTaxonomyOrder,MediaLibraryOrganizerAttachmentsBrowser;wp.media.events.on("mlo:grid:attachment:upload:init",(function(){if(mediaLibraryOrganizerUploader||void 0===wp.media.frame.uploader||(mediaLibraryOrganizerUploader=wp.media.frame.uploader),mediaLibraryOrganizerUploader&&void 0!==mediaLibraryOrganizerUploader.uploader){var e={};for(let r in media_library_organizer_media.taxonomies)e[r]=media_library_organizer_media.taxonomies[r].selected_term;mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer=e}})),wp.media.events.on("mlo:grid:filter:change:term",(function(e){mediaLibraryOrganizerUploader&&void 0!==mediaLibraryOrganizerUploader.uploader&&(mediaLibraryOrganizerUploader.uploader.uploader.settings.multipart_params.media_library_organizer[e.taxonomy_name]=e.slug)})),wp.media.events.on("mlo:grid:attachment:upload:success",(function(e){mediaLibraryOrganizerGridViewRefresh()})),wp.media.events.on("mlo:grid:edit-attachment:added:term",(function(e){mediaLibraryOrganizerGridViewReplaceTaxonomyFilter(e.taxonomy.name,e.terms,e.taxonomy.labels.all_items,media_library_organizer_media.labels.unassigned)})),wp.media.events.on("mlo:grid:edit-attachment:edited",(function(e){var $;$=jQuery,e.taxonomy_term_changed&&(mediaLibraryOrganizerGridViewUpdateTaxonomyFilters(),mediaLibraryOrganizerGridViewRefresh())})),wp.media.events.on("mlo:grid:edit-attachment:deleted",(function(e){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),wp.media.events.on("mlo:grid:bulk_select:disabled",(function(){mediaLibraryOrganizerGridViewUpdateTaxonomyFilters()})),mediaLibraryOrganizerInitialize();
  • media-library-organizer/trunk/assets/scss/media.scss

    r2688245 r2758024  
    163163
    164164/**
     165 * Grid View: Add padding below filters
     166 */
     167.media-frame-content .attachments-browser .media-toolbar-secondary,
     168.media-modal-content .attachments-browser .media-toolbar-secondary {
     169    padding-bottom: 10px;
     170}
     171
     172/**
    165173 * Grid View: Modal
    166174 * - Adjust widths of items so that all filters display
     
    204212    .attachments-browser {
    205213        .media-toolbar {
    206             height: 50px;
     214            height: auto;
    207215            background-color: #f3f3f3;
    208216            border-bottom: 1px solid #ddd;
    209         }
    210 
    211         .attachments {
    212             top: 50px;
    213217        }
    214218
     
    272276        }
    273277    }
    274 }
    275 @media only screen and (max-width: 1840px) {
    276     .media-modal-content {
    277         .attachments-browser {
    278             .media-toolbar {
    279                 height: 90px;
    280             }
    281 
    282             .attachments {
    283                 top: 90px;
    284             }
    285         }
    286     }
    287 }
    288 @media only screen and (max-width: 1330px) {
    289     .media-modal-content {
    290         .attachments-browser {
    291             .media-toolbar {
    292                 height: 130px;
    293             }
    294 
    295             .attachments {
    296                 top: 130px;
    297             }
    298         }
    299     }
    300 }
    301 @media only screen and (max-width: 1000px) {
    302     .media-modal-content {
    303         .attachments-browser {
    304             .media-toolbar {
    305                 height: 170px;
    306 
    307             }
    308 
    309             .attachments {
    310                 top: 170px;
    311             }
    312         }
    313     }
    314 }
    315 @media only screen and (max-width: 900px) {
    316     .media-modal-content {
    317         .attachments-browser {
    318             .media-toolbar {
    319                 height: 210px;
    320 
    321             }
    322 
    323             .attachments {
    324                 top: 210px;
    325             }
    326         }
    327     }
    328 }
    329 @media only screen and (max-width: 640px) {
    330     .media-modal-content {
    331         .attachments-browser {
    332             .media-toolbar {
    333                 height: 160px;
    334 
    335             }
    336 
    337             .attachments {
    338                 top: 160px;
    339             }
    340         }
    341     }
    342278}
    343279
  • media-library-organizer/trunk/includes/admin/class-media-library-organizer-admin.php

    r2688245 r2758024  
    259259     * @param   string $ext        If defined, loads minified JS.
    260260     */
    261     public function enqueue_js_settings( $screen, $screens, $mode, $ext ) { /* phpcs:ignore */
     261    public function enqueue_js_settings( $screen, $screens, $mode, $ext ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    262262
    263263        // JS.
     
    409409
    410410        // Bail if no page given.
    411         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     411        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    412412            return;
    413413        }
    414414
    415415        // Get current screen name.
    416         $screen = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     416        $screen = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    417417
    418418        // Get registered screens.
     
    457457
    458458        // If no page name was given, we're not on a plugin screen.
    459         if ( ! isset( $_GET['page'] ) ) { /* phpcs:ignore */
     459        if ( ! isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    460460            return false;
    461461        }
    462462
    463463        // Get screen name.
    464         $screen = sanitize_text_field( $_GET['page'] ); /* phpcs:ignore */
     464        $screen = sanitize_text_field( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification
    465465
    466466        // Return.
     
    485485
    486486        // If no tab defined, get the first tab name from the tabs array.
    487         if ( ! isset( $_REQUEST['tab'] ) ) { /* phpcs:ignore */
     487        if ( ! isset( $_REQUEST['tab'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    488488            foreach ( $tabs as $tab ) {
    489489                return $tab;
     
    492492
    493493        // Return the requested tab, if it exists.
    494         if ( isset( $tabs[ $_REQUEST['tab'] ] ) ) { /* phpcs:ignore */
    495             $tab = $tabs[ sanitize_text_field( $_REQUEST['tab'] ) ]; /* phpcs:ignore */
     494        if ( isset( $tabs[ $_REQUEST['tab'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
     495            $tab = $tabs[ sanitize_text_field( $_REQUEST['tab'] ) ]; // phpcs:ignore WordPress.Security.NonceVerification
    496496            return $tab;
    497497        } else {
     
    862862                 */
    863863                $result = apply_filters( 'media_library_organizer_admin_save_settings', true, $_POST );
    864                 break; /* phpcs:ignore */
     864                break;
    865865
    866866            /**
  • media-library-organizer/trunk/includes/admin/class-media-library-organizer-api.php

    r2688245 r2758024  
    238238                    )
    239239                );
    240                 break; /* phpcs:ignore */
    241240        }
    242241
    243242        // Decode JSON.
    244         $body = json_decode( $body ); /* phpcs:ignore */
     243        $body = json_decode( $body );
    245244
    246245        // Bail if an error occured.
  • media-library-organizer/trunk/includes/admin/class-media-library-organizer-import.php

    r2688245 r2758024  
    144144     * @return  mixed               WP_Error | bool
    145145     */
    146     public function import( $success, $import ) { /* phpcs:ignore */
     146    public function import( $success, $import ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    147147
    148148        // Bail if no data.
     
    171171     * @return  mixed               WP_Error | bool
    172172     */
    173     public function import_third_party( $success, $import ) { /* phpcs:ignore */
     173    public function import_third_party( $success, $import ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    174174
    175175        // Check which importer we need to run.
     
    446446        $terms = $wpdb->get_results(
    447447            $wpdb->prepare(
    448                 'SELECT  ' . $wpdb->term_taxonomy . '.term_taxonomy_id,
    449                                 ' . $wpdb->term_taxonomy . '.description,
    450                                 ' . $wpdb->term_taxonomy . '.parent,
    451                                 ' . $wpdb->terms . '.name
    452                                 FROM ' . $wpdb->term_taxonomy . '
    453                                 LEFT JOIN  ' . $wpdb->terms . '
    454                                 ON  ' . $wpdb->term_taxonomy . '.term_id =  ' . $wpdb->terms . '.term_id
    455                                 WHERE ' . $wpdb->term_taxonomy . ".taxonomy = '%s'", /* phpcs:ignore */
     448                "SELECT  {$wpdb->term_taxonomy}.term_taxonomy_id,
     449                {$wpdb->term_taxonomy}.description,
     450                {$wpdb->term_taxonomy}.parent,
     451                {$wpdb->terms}.name
     452                FROM {$wpdb->term_taxonomy}
     453                LEFT JOIN {$wpdb->terms}
     454                ON {$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id
     455                WHERE {$wpdb->term_taxonomy}.taxonomy = %s",
    456456                $taxonomy
    457457            )
     
    491491        // Get Attachment IDs that have any of the given Term IDs assigned to them.
    492492        $attachments = $wpdb->get_results(
    493             'SELECT  ' . $wpdb->term_relationships . '.object_id,
    494             ' . $wpdb->term_relationships . '.term_taxonomy_id
    495             FROM ' . $wpdb->term_relationships . '
    496             WHERE ' . $wpdb->term_relationships . '.term_taxonomy_id IN (' . implode( ',', $term_ids ) . ')' /* phpcs:ignore */
     493            "SELECT  {$wpdb->term_relationships}.object_id, {$wpdb->term_relationships}.term_taxonomy_id
     494            FROM {$wpdb->term_relationships}
     495            WHERE {$wpdb->term_relationships}.term_taxonomy_id IN (" . implode( ',', $term_ids ) . ')' // phpcs:ignore WordPress.DB.PreparedSQL
    497496        );
    498497
  • media-library-organizer/trunk/includes/admin/class-media-library-organizer-notices.php

    r2688245 r2758024  
    350350            <div class="notice notice-success is-dismissible">
    351351                <p>
    352                     <?php echo implode( '<br />', $this->notices['success'] ); /* phpcs:ignore */ ?>
     352                    <?php
     353                    foreach ( $this->notices['success'] as $notice ) {
     354                        echo esc_html( $notice ) . '<br />';
     355                    }
     356                    ?>
    353357                </p>
    354358            </div>
     
    361365            <div class="notice notice-error is-dismissible">
    362366                <p>
    363                     <?php echo implode( '<br />', $this->notices['error'] ); /* phpcs:ignore */ ?>
     367                    <?php
     368                    foreach ( $this->notices['error'] as $notice ) {
     369                        echo esc_html( $notice ) . '<br />';
     370                    }
     371                    ?>
    364372                </p>
    365373            </div>
  • media-library-organizer/trunk/includes/class-media-library-organizer.php

    r2722863 r2758024  
    281281        // If the request global exists, check for specific request keys which tell us
    282282        // that we're using a frontend editor.
    283         if ( isset( $_REQUEST ) && ! empty( $_REQUEST ) ) { /* phpcs:ignore */
     283        if ( isset( $_REQUEST ) && ! empty( $_REQUEST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    284284            // Sanitize request.
    285             $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     285            $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    286286
    287287            // Beaver Builder.
     
    405405                    /* translators: %1$s: Plugin Name, %2$s: PHP class name */
    406406                    __( '%1$s: Error: Could not load Plugin class %2$s', 'media-library-organizer' ),
    407                     $this->plugin->displayName, /* phpcs:ignore */
     407                    $this->plugin->displayName,
    408408                    $name
    409409                )
     
    414414            if ( is_admin() ) {
    415415                wp_die(
    416                     $error, /* phpcs:ignore */
     416                    esc_html( $error->get_error_message() ),
    417417                    sprintf(
    418418                        /* translators: Plugin Name */
    419419                        esc_html__( '%s: Error', 'media-library-organizer' ),
    420                         $this->plugin->displayName /* phpcs:ignore */
     420                        esc_html( $this->plugin->displayName )
    421421                    ),
    422422                    array(
  • media-library-organizer/trunk/includes/global/class-media-library-organizer-ajax.php

    r2688245 r2758024  
    260260    public function search_authors() {
    261261
    262         // Get vars.
    263         $query = sanitize_text_field( $_REQUEST['query'] ); /* phpcs:ignore */
     262        // Check nonce.
     263        check_ajax_referer( 'media_library_organizer_search_authors', 'nonce' );
     264
     265        // Get vars.
     266        $query = sanitize_text_field( $_REQUEST['query'] );
    264267
    265268        // Get results.
     
    299302    public function search_taxonomy_terms() {
    300303
     304        // Check nonce.
     305        check_ajax_referer( 'media_library_organizer_search_taxonomy_terms', 'nonce' );
     306
    301307        // Get vars.
    302308        $taxonomy_name = false;
    303         if ( isset( $_REQUEST['taxonomy_name'] ) ) { /* phpcs:ignore */
    304             $taxonomy_name = sanitize_text_field( $_REQUEST['taxonomy_name'] ); /* phpcs:ignore */
    305         } elseif ( isset( $_REQUEST['args'] ) && isset( $_REQUEST['args']['taxonomy_name'] ) ) { /* phpcs:ignore */
    306             $taxonomy_name = sanitize_text_field( $_REQUEST['args']['taxonomy_name'] ); /* phpcs:ignore */
    307         }
    308         $query = sanitize_text_field( $_REQUEST['query'] ); /* phpcs:ignore */
     309        if ( isset( $_REQUEST['taxonomy_name'] ) ) {
     310            $taxonomy_name = sanitize_text_field( $_REQUEST['taxonomy_name'] );
     311        } elseif ( isset( $_REQUEST['args'] ) && isset( $_REQUEST['args']['taxonomy_name'] ) ) {
     312            $taxonomy_name = sanitize_text_field( $_REQUEST['args']['taxonomy_name'] );
     313        }
     314        $query = sanitize_text_field( $_REQUEST['query'] );
    309315
    310316        // Bail if no Taxonomy Name specified.
  • media-library-organizer/trunk/includes/global/class-media-library-organizer-common.php

    r2747124 r2758024  
    418418            'image_size_names_choose',
    419419            array(
    420                 'thumbnail' => __( 'Thumbnail' ), /* phpcs:ignore */
    421                 'medium'    => __( 'Medium' ), /* phpcs:ignore */
    422                 'large'     => __( 'Large' ), /* phpcs:ignore */
    423                 'full'      => __( 'Full Size' ), /* phpcs:ignore */
     420                'thumbnail' => __( 'Thumbnail', 'media-library-organizer' ),
     421                'medium'    => __( 'Medium', 'media-library-organizer' ),
     422                'large'     => __( 'Large', 'media-library-organizer' ),
     423                'full'      => __( 'Full Size', 'media-library-organizer' ),
    424424            )
    425425        );
     
    605605
    606606        $keys  = array_keys( $array );
    607         $index = array_search( $key, $keys ); /* phpcs:ignore */
    608         $pos   = false === $index ? count( $array ) : $index + 1; /* phpcs:ignore */
     607        $index = array_search( $key, $keys, true );
     608        $pos   = false === $index ? count( $array ) : $index + 1;
    609609        return array_merge( array_slice( $array, 0, $pos ), $new, array_slice( $array, $pos ) );
    610610
  • media-library-organizer/trunk/includes/global/class-media-library-organizer-media.php

    r2747124 r2758024  
    126126
    127127        // Determine the current orderby.
    128         if ( isset( $_REQUEST['orderby'] ) ) { /* phpcs:ignore */
     128        if ( isset( $_REQUEST['orderby'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    129129            // Get from the <select> dropdown.
    130             $current_orderby = sanitize_text_field( $_REQUEST['orderby'] ); /* phpcs:ignore */
     130            $current_orderby = sanitize_text_field( $_REQUEST['orderby'] ); // phpcs:ignore WordPress.Security.NonceVerification
    131131        } else {
    132132            // Get orderby default from the User's Options, if set to persist.
     
    140140
    141141        // Determine the current order.
    142         if ( isset( $_REQUEST['order'] ) ) { /* phpcs:ignore */
     142        if ( isset( $_REQUEST['order'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    143143            // Get from the <select> dropdown.
    144             $current_order = sanitize_text_field( $_REQUEST['order'] ); /* phpcs:ignore */
     144            $current_order = sanitize_text_field( $_REQUEST['order'] ); // phpcs:ignore WordPress.Security.NonceVerification
    145145        } else {
    146146            // Get orderby default from the User's Options, if set to persist.
     
    160160            }
    161161
    162             echo $this->get_list_table_category_filter( $taxonomy_name, sanitize_text_field( $taxonomy['plural_name'] ) ); /* phpcs:ignore */
     162            echo $this->get_list_table_category_filter( $taxonomy_name, sanitize_text_field( $taxonomy['plural_name'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput
    163163        }
    164164
     
    489489
    490490        // Output.
    491         echo $output; /* phpcs:ignore */
     491        echo $output; // phpcs:ignore WordPress.Security.EscapeOutput
    492492
    493493    }
     
    545545        // wp_ajax_query_attachments() doesn't attribute $_REQUEST['query'] attributes to $args that aren't Post or Taxonomy Related.
    546546        // Include these in the below filter so they're accessible to Addons which might need to read the request input to modify $args.
    547         $query = array_map( 'sanitize_text_field', $_REQUEST['query'] ); /* phpcs:ignore */
     547        $query = array_map( 'sanitize_text_field', $_REQUEST['query'] ); // phpcs:ignore WordPress.Security.NonceVerification
    548548
    549549        /**
     
    620620
    621621        // Sanitize request.
    622         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     622        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    623623
    624624        // File Type.
     
    932932                <a href="#" class="taxonomy-add-new" data-taxonomy="' . $taxonomy_name . '">' .
    933933                    /* translators: %s: Add New taxonomy label. */
    934                     sprintf( __( '+ %s' ), $taxonomy->labels->add_new_item ) /* phpcs:ignore */ . '
     934                    sprintf( __( '+ %s', 'media-library-organizer' ), $taxonomy->labels->add_new_item ) . '
    935935                </a>
    936936                <div class="mlo-taxonomy-term-add-fields hidden ' . $taxonomy_name . '">
     
    966966        $taxonomy              = $this->base->get_class( 'taxonomies' )->get_taxonomy( $taxonomy_name );
    967967        $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms );
    968         $comma                 = _x( ',', 'tag delimiter' ); /* phpcs:ignore */
     968        $comma                 = _x( ',', 'tag delimiter', 'media-library-organizer' );
    969969        $terms                 = get_the_terms( $post_id, $taxonomy_name );
    970970
     
    10221022     * @return  string                                      Taxonomy HTML Checkboxes
    10231023     */
    1024     public function terms_checkbox( $taxonomy_name, $field_name, $selected_term_ids = array() ) { /* phpcs:ignore */
     1024    public function terms_checkbox( $taxonomy_name, $field_name, $selected_term_ids = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    10251025
    10261026        // Get Taxonomy Terms.
     
    10801080        }
    10811081
    1082         // Get request.
    1083         $request = $_REQUEST; /* phpcs:ignore */
     1082        // Sanitize request.
     1083        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    10841084
    10851085        // Iterate through Registered Taxonomies.
     
    12571257
    12581258        // Sanitize request.
    1259         $request = array_map( 'sanitize_text_field', $_REQUEST ); /* phpcs:ignore */
     1259        $request = array_map( 'sanitize_text_field', $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification
    12601260
    12611261        // Check some request variables.
  • media-library-organizer/trunk/includes/global/class-media-library-organizer-taxonomy-walker.php

    r2688245 r2758024  
    4848     * @param array  $args   An array of arguments. @see wp_terms_checklist().
    4949     */
    50     public function start_lvl( &$output, $depth = 0, $args = array() ) { /* phpcs:ignore */
     50    public function start_lvl( &$output, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    5151
    5252        $indent  = str_repeat( "\t", $depth );
     
    6666     * @param array  $args   An array of arguments. @see wp_terms_checklist().
    6767     */
    68     public function end_lvl( &$output, $depth = 0, $args = array() ) { /* phpcs:ignore */
     68    public function end_lvl( &$output, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    6969
    7070        $indent  = str_repeat( "\t", $depth );
     
    9090     * @param   int    $id         ID of the current term.
    9191     */
    92     public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { /* phpcs:ignore */
     92    public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    9393
    9494        $taxonomy = $args['taxonomy'];
     
    137137     * @param array  $args     An array of arguments. @see wp_terms_checklist().
    138138     */
    139     public function end_el( &$output, $category, $depth = 0, $args = array() ) { /* phpcs:ignore */
     139    public function end_el( &$output, $category, $depth = 0, $args = array() ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    140140
    141141        $output .= "</li>\n";
  • media-library-organizer/trunk/includes/global/class-media-library-organizer-upload.php

    r2688245 r2758024  
    164164        foreach ( $this->base->get_class( 'taxonomies' )->get_taxonomies() as $taxonomy_name => $taxonomy ) {
    165165            // Conditionally set Media Categories, as they won't be included in the request if no checkboxes were selected.
    166             if ( ! isset( $_REQUEST['media_library_organizer'] ) ) { /* phpcs:ignore */
     166            if ( ! isset( $_REQUEST['media_library_organizer'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
    167167                continue;
    168168            }
    169169
    170170            // Fetch request.
    171             $request = $_REQUEST['media_library_organizer']; /* phpcs:ignore */
     171            $request = stripslashes_deep( $_REQUEST['media_library_organizer'] ); // phpcs:ignore WordPress.Security.NonceVerification
    172172
    173173            // Skip if the Taxonomy isn't specified.
  • media-library-organizer/trunk/media-library-organizer.php

    r2747124 r2758024  
    99 * Plugin Name: Media Library Organizer
    1010 * Plugin URI: https://wpmedialibrary.com
    11  * Version: 1.4.5
     11 * Version: 1.4.6
    1212 * Author: WP Media Library
    1313 * Author URI: https://wpmedialibrary.com
     
    2222
    2323// Define Plugin version and build date.
    24 define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_VERSION', '1.4.5' );
    25 define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_BUILD_DATE', '2022-06-23 18:00:00' );
     24define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_VERSION', '1.4.6' );
     25define( 'MEDIA_LIBRARY_ORGANIZER_PLUGIN_BUILD_DATE', '2022-07-18 18:00:00' );
    2626
    2727// Define Plugin paths.
     
    101101 * @since   1.0.5
    102102 */
    103 function Media_Library_Organizer() { /* phpcs:ignore */
     103function Media_Library_Organizer() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
    104104
    105105    return Media_Library_Organizer::get_instance();
  • media-library-organizer/trunk/readme.txt

    r2747124 r2758024  
    44Tags: media categories, media library, media tags, images, organizer
    55Requires at least: 5.0
    6 Tested up to: 6.0
     6Tested up to: 6.0.1
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    173173== Changelog ==
    174174
     175= 1.4.6 (2022-07-18) =
     176* Added: Grid View: Modal: Better method for defining toolbar height and attachments grid
     177* Updated: French translations
     178* Fix: Grid View: Modal: Edit Gallery: Don't display Dropdown Filters, as they have no effect on the selected images
     179* Fix: Code improvements for WordPress Coding Standards
     180
    175181= 1.4.5 (2022-06-23) =
    176182* Added: French translations
  • media-library-organizer/trunk/views/admin/import-enhanced-media-library.php

    r2688245 r2758024  
    2424            <div class="right">
    2525                <?php
    26                 foreach ( $import_source['data']['taxonomies'] as $taxonomy_name => $taxonomy ) { /* phpcs:ignore */
     26                foreach ( $import_source['data']['taxonomies'] as $taxonomy_name => $eml_taxonomy ) {
    2727                    // Skip non-EML categories.
    28                     if ( ! $taxonomy['eml_media'] ) {
     28                    if ( ! $eml_taxonomy['eml_media'] ) {
    2929                        continue;
    3030                    }
     
    3232                    <label for="taxonomies_<?php echo esc_attr( $taxonomy_name ); ?>">
    3333                        <input type="checkbox" name="taxonomies[]" id="taxonomies_<?php echo esc_attr( $taxonomy_name ); ?>" value="<?php echo esc_attr( $taxonomy_name ); ?>" />
    34                         <?php echo esc_html( $taxonomy['labels']['name'] ); ?>
     34                        <?php echo esc_html( $eml_taxonomy['labels']['name'] ); ?>
    3535                    </label><br />
    3636                    <?php
  • media-library-organizer/trunk/views/admin/settings-general.php

    r2688245 r2758024  
    6464
    6565                <?php
    66                 foreach ( $taxonomies as $taxonomy_name => $taxonomy ) { /* phpcs:ignore */
     66                foreach ( $taxonomies as $taxonomy_name => $mlo_taxonomy ) {
    6767                    ?>
    6868                    <div class="wpzinc-option">
    6969                        <div class="left">
    70                             <label for="general_<?php echo esc_attr( $taxonomy_name ); ?>_enabled"><?php echo esc_html( $taxonomy['plural_name'] ); ?></label>
     70                            <label for="general_<?php echo esc_attr( $taxonomy_name ); ?>_enabled"><?php echo esc_html( $mlo_taxonomy['plural_name'] ); ?></label>
    7171                        </div>
    7272                        <div class="right">
     
    8282                                    /* translators: Taxonomy Label, Singular */
    8383                                        __( 'If enabled, displays a dropdown option to filter Media Library items by %s', 'media-library-organizer' ),
    84                                         $taxonomy['singular_name']
     84                                        $mlo_taxonomy['singular_name']
    8585                                    )
    8686                                );
  • media-library-organizer/trunk/views/admin/settings.php

    r2688245 r2758024  
    2222    <?php
    2323    // Output notices.
    24     echo $this->base->get_class( 'notices' )->output_notices(); /* phpcs:ignore */
     24    echo $this->base->get_class( 'notices' )->output_notices(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    2525    ?>
    2626
Note: See TracChangeset for help on using the changeset viewer.