Plugin Directory

Changeset 2998038


Ignore:
Timestamp:
11/18/2023 10:30:11 AM (2 years ago)
Author:
frenify
Message:

readme.txt

Location:
categorify/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • categorify/trunk/assets/js/core.js

    r2612898 r2998038  
    9999            // if has sidebar
    100100            if(jQuery('.cc_categorify_sidebar').length){
     101               
    101102               
    102103                // remove all wordpress error or notice if has sidebar
     
    739740            jQuery.fn.extend({
    740741                ccMoveCursorToEnd: function(){
    741                     this.focus();
     742                    //this.focus();
    742743                    var thisVal = this.val();
    743744                    this.val('').val(thisVal);
     
    10891090                e.preventDefault();
    10901091                e.stopPropagation();
     1092               
     1093               
     1094               
    10911095                jQuery('.cc_categorify_contextmenu').removeClass('popup_opened');
    10921096                jQuery('ul.cc_categorify_category_list li').removeClass('active_contextmenu');
     
    10941098                // check if button already clicked
    10951099                if(jQuery('.folder-input').length) {
     1100                   
    10961101                    jQuery('.folder-input').ccMoveCursorToEnd();
    10971102                    return false;
     
    11121117               
    11131118                if (self.categorifyCurrentFolder == null) {
     1119                   
     1120                   
    11141121                    jQuery('#categorify_be_folder_list').append(self.newCategoryFormTemplate());
    11151122                    self.magicSVG();
    11161123                    self.tripleActionsOnCategories();
     1124                   
     1125                   
     1126                   
    11171127                    // commented
    11181128//                  self.scrollToElement(jQuery('.folder-input'),800);
     
    11211131//                  },800);
    11221132                    jQuery('.folder-input').ccMoveCursorToEnd();
     1133                   
     1134                   
    11231135                }else{
    11241136                    self.insertCategoryToActive(); 
     
    12741286           
    12751287            if(jQuery('body').hasClass('post-type-attachment')){
    1276                 jQuery('body').addClass('categorify_ready');
     1288               
     1289                //if(jQuery('.cc_categorify_category_list').length){
     1290                    jQuery('body').addClass('categorify_ready');   
     1291                //}
     1292           
    12771293            }
    12781294           
     
    12911307           
    12921308           
    1293             li.contextmenu(function(e){
     1309            li.on('contextmenu', function(e){
    12941310               
    12951311                e.preventDefault();
  • categorify/trunk/categorify.php

    r2998026 r2998038  
    55 * Plugin URI:  https://frenify.com/project/categorify/
    66 * Description: Organize your WordPress media files in categories via drag and drop.
    7  * Version:     1.0.7.2
     7 * Version:     1.0.7.3
    88 * Author:      Frenify
    99 * Author URI:  https://frenify.com/
     
    7373    define( 'CATEGORIFY_PLUGIN_NAME', 'Categorify' );
    7474    define( 'CATEGORIFY_PLUGIN_URL', plugin_dir_url( CATEGORIFY__FILE__ ) );
    75     define( 'CATEGORIFY_PLUGIN_VERSION', '1.0.7.2' );
     75    define( 'CATEGORIFY_PLUGIN_VERSION', '1.0.7.3' );
    7676    function categorify_plugins_loaded()
    7777    {
  • categorify/trunk/inc/sidebar.php

    r2612362 r2998038  
    5050            'wp_kses_allowed_html',
    5151            array( $this, 'categorify_allowed_html' ),
    52             10,
     52            11,
    5353            2
    5454        );
     
    6868            return $allowed;
    6969        }
    70        
     70        $common_attributes = array(
     71            'id'     => true,
     72            'class'  => true,
     73            'style'  => true,
     74            'data-*' => true,
     75        );
    7176        if ( $context === 'post' ) {
    72             $allowed['input']['type'] = true;
    73             $allowed['input']['name'] = true;
    74             $allowed['input']['id'] = true;
    75             $allowed['input']['class'] = true;
    76             $allowed['input']['value'] = true;
    77             $allowed['input']['placeholder'] = true;
    78             $allowed['input']['autocomplete'] = true;
    79             $allowed['select']['id'] = true;
    80             $allowed['select']['name'] = true;
    81             $allowed['select']['class'] = true;
    82             $allowed['option']['value'] = true;
    83         }
    84        
     77            $allowed = array(
     78                'input'  => array_merge( $common_attributes, array(
     79                'type'         => array(),
     80                'name'         => array(),
     81                'value'        => array(),
     82                'placeholder'  => array(),
     83                'autocomplete' => array(),
     84            ) ),
     85                'select' => array_merge( $common_attributes, array(
     86                'class' => array(),
     87            ) ),
     88                'option' => array(
     89                'value' => array(),
     90            ),
     91                'img'    => array_merge( $common_attributes, array(
     92                'src'    => true,
     93                'alt'    => true,
     94                'title'  => true,
     95                'width'  => true,
     96                'height' => true,
     97            ) ),
     98                'ul'     => $common_attributes,
     99                'li'     => $common_attributes,
     100                'div'    => $common_attributes,
     101                'a'      => $common_attributes,
     102                'span'   => $common_attributes,
     103                'svg'    => $common_attributes,
     104                'h3'     => $common_attributes,
     105            );
     106        }
    85107        return $allowed;
    86108    }
     
    670692    {
    671693        global  $wpdb ;
     694        $folderIDs = array();
    672695       
    673696        if ( isset( $_GET['cc_categorify_folder'] ) ) {
     
    685708                        'hide_empty' => false,
    686709                    ) );
    687                     $folderIDs = array();
    688                     foreach ( $folders as $k => $folder ) {
    689                         $folderIDs[] = $folder->term_id;
     710                    if ( !empty($folders) ) {
     711                        foreach ( $folders as $k => $folder ) {
     712                            $folderIDs[] = $folder->term_id;
     713                        }
    690714                    }
    691                     $folderIDs = esc_sql( $folderIDs );
    692                     $extraQuery = "SELECT `ID` FROM " . $wpdbPrefix . "posts LEFT JOIN " . $wpdbPrefix . "term_relationships ON (" . $wpdbPrefix . "posts.ID = " . $wpdbPrefix . "term_relationships.object_id) WHERE (" . $wpdbPrefix . "term_relationships.term_taxonomy_id IN (" . implode( ', ', $folderIDs ) . "))";
    693                     $clauses['where'] .= " AND (" . $wpdbPrefix . "posts.ID NOT IN (" . $extraQuery . "))";
     715                   
     716                    if ( !empty(array_filter( $folderIDs )) ) {
     717                        $folderIDs = esc_sql( implode( ', ', array_filter( $folderIDs ) ) );
     718                        $extraQuery = "SELECT `ID` FROM " . $wpdbPrefix . "posts LEFT JOIN " . $wpdbPrefix . "term_relationships ON (" . $wpdbPrefix . "posts.ID = " . $wpdbPrefix . "term_relationships.object_id) WHERE (" . $wpdbPrefix . "term_relationships.term_taxonomy_id IN (" . $folderIDs . "))";
     719                        $clauses['where'] .= " AND (" . $wpdbPrefix . "posts.ID NOT IN (" . $extraQuery . ")) ";
     720                    }
     721               
    694722                }
    695723           
  • categorify/trunk/readme.txt

    r2998026 r2998038  
    66Tags: media library folders, media library categories, media library folder, media library category, media folders, media category, subfolders, file manager, directories, folder, folders, organize
    77Requires at least: 4.0.0
    8 Tested up to: 6.4.1
    9 Stable tag: 1.0.7.2
     8Tested up to: 6.0
     9Stable tag: 1.0.7.3
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.