Changeset 2998038
- Timestamp:
- 11/18/2023 10:30:11 AM (2 years ago)
- Location:
- categorify/trunk
- Files:
-
- 4 edited
-
assets/js/core.js (modified) (8 diffs)
-
categorify.php (modified) (2 diffs)
-
inc/sidebar.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
categorify/trunk/assets/js/core.js
r2612898 r2998038 99 99 // if has sidebar 100 100 if(jQuery('.cc_categorify_sidebar').length){ 101 101 102 102 103 // remove all wordpress error or notice if has sidebar … … 739 740 jQuery.fn.extend({ 740 741 ccMoveCursorToEnd: function(){ 741 this.focus();742 //this.focus(); 742 743 var thisVal = this.val(); 743 744 this.val('').val(thisVal); … … 1089 1090 e.preventDefault(); 1090 1091 e.stopPropagation(); 1092 1093 1094 1091 1095 jQuery('.cc_categorify_contextmenu').removeClass('popup_opened'); 1092 1096 jQuery('ul.cc_categorify_category_list li').removeClass('active_contextmenu'); … … 1094 1098 // check if button already clicked 1095 1099 if(jQuery('.folder-input').length) { 1100 1096 1101 jQuery('.folder-input').ccMoveCursorToEnd(); 1097 1102 return false; … … 1112 1117 1113 1118 if (self.categorifyCurrentFolder == null) { 1119 1120 1114 1121 jQuery('#categorify_be_folder_list').append(self.newCategoryFormTemplate()); 1115 1122 self.magicSVG(); 1116 1123 self.tripleActionsOnCategories(); 1124 1125 1126 1117 1127 // commented 1118 1128 // self.scrollToElement(jQuery('.folder-input'),800); … … 1121 1131 // },800); 1122 1132 jQuery('.folder-input').ccMoveCursorToEnd(); 1133 1134 1123 1135 }else{ 1124 1136 self.insertCategoryToActive(); … … 1274 1286 1275 1287 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 1277 1293 } 1278 1294 … … 1291 1307 1292 1308 1293 li. contextmenu(function(e){1309 li.on('contextmenu', function(e){ 1294 1310 1295 1311 e.preventDefault(); -
categorify/trunk/categorify.php
r2998026 r2998038 5 5 * Plugin URI: https://frenify.com/project/categorify/ 6 6 * Description: Organize your WordPress media files in categories via drag and drop. 7 * Version: 1.0.7. 27 * Version: 1.0.7.3 8 8 * Author: Frenify 9 9 * Author URI: https://frenify.com/ … … 73 73 define( 'CATEGORIFY_PLUGIN_NAME', 'Categorify' ); 74 74 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' ); 76 76 function categorify_plugins_loaded() 77 77 { -
categorify/trunk/inc/sidebar.php
r2612362 r2998038 50 50 'wp_kses_allowed_html', 51 51 array( $this, 'categorify_allowed_html' ), 52 1 0,52 11, 53 53 2 54 54 ); … … 68 68 return $allowed; 69 69 } 70 70 $common_attributes = array( 71 'id' => true, 72 'class' => true, 73 'style' => true, 74 'data-*' => true, 75 ); 71 76 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 } 85 107 return $allowed; 86 108 } … … 670 692 { 671 693 global $wpdb ; 694 $folderIDs = array(); 672 695 673 696 if ( isset( $_GET['cc_categorify_folder'] ) ) { … … 685 708 'hide_empty' => false, 686 709 ) ); 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 } 690 714 } 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 694 722 } 695 723 -
categorify/trunk/readme.txt
r2998026 r2998038 6 6 Tags: media library folders, media library categories, media library folder, media library category, media folders, media category, subfolders, file manager, directories, folder, folders, organize 7 7 Requires at least: 4.0.0 8 Tested up to: 6. 4.19 Stable tag: 1.0.7. 28 Tested up to: 6.0 9 Stable tag: 1.0.7.3 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.