Changeset 2309886
- Timestamp:
- 05/22/2020 02:02:34 AM (6 years ago)
- Location:
- media-category-library
- Files:
-
- 31 added
- 3 edited
-
tags/2.7 (added)
-
tags/2.7/classes (added)
-
tags/2.7/classes/media-category-library.php (added)
-
tags/2.7/css (added)
-
tags/2.7/css/media-category-library.css (added)
-
tags/2.7/css/media-category-modal.css (added)
-
tags/2.7/images (added)
-
tags/2.7/images/ajax-loader.gif (added)
-
tags/2.7/js (added)
-
tags/2.7/js/media-category-global.js (added)
-
tags/2.7/js/media-category-library.js (added)
-
tags/2.7/js/media-category-modal.js (added)
-
tags/2.7/js/mediacat-library-frontend.js (added)
-
tags/2.7/lang (added)
-
tags/2.7/lang/mediacatlib-de_DE.mo (added)
-
tags/2.7/lang/mediacatlib-de_DE.po (added)
-
tags/2.7/lang/mediacatlib-fr_FR.mo (added)
-
tags/2.7/lang/mediacatlib-fr_FR.po (added)
-
tags/2.7/lang/mediacatlib.pot (added)
-
tags/2.7/media-category-library.php (added)
-
tags/2.7/readme.txt (added)
-
tags/2.7/screenshot-1.png (added)
-
tags/2.7/screenshot-2.png (added)
-
tags/2.7/screenshot-3.png (added)
-
tags/2.7/screenshot-4.png (added)
-
tags/2.7/screenshot-5.png (added)
-
tags/2.7/views (added)
-
tags/2.7/views/admin_settings_form.php (added)
-
tags/2.7/views/list.php (added)
-
tags/2.7/views/search.php (added)
-
tags/2.7/views/shortcode.php (added)
-
trunk/classes/media-category-library.php (modified) (3 diffs)
-
trunk/media-category-library.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-category-library/trunk/classes/media-category-library.php
r2308264 r2309886 9 9 const pname = 'Media Category Library'; 10 10 const term = 'mediacategory'; 11 const version = 2. 6;11 const version = 2.7; 12 12 13 13 /** … … 74 74 75 75 $this->settings_fields = array( 76 'legend_1' => array(77 'label' => 'General Settings',78 'type' => 'legend'79 ),80 'taxonomy_name' => array(81 'label' => 'Taxonomy Name (should be all lowercase)',82 'type' => 'text',83 'default' => 'media-category'84 ),85 'rewrite_url' => array(86 'label' => 'Media Category Library Rewrite URL',87 'type' => 'text',88 'default' => 'mediacat-library'89 ),90 'title' => array(91 'label' => 'Media Category Library Title',92 'type' => 'text',93 'default' => 'Media Category Library'94 ),95 'include_css' => array(96 'label' => 'Include CSS',97 'type' => 'select',98 'values' => array( 'yes' => 'Yes', 'no' => 'No' ),99 'default' => 'yes'100 ),101 'posts_per_page' => array(102 'label' => 'Posts per page (for frontend Media Category Library)',103 'type' => 'text',104 'default' => '20'105 )106 );76 'legend_1' => array( 77 'label' => 'General Settings', 78 'type' => 'legend' 79 ), 80 'taxonomy_name' => array( 81 'label' => 'Taxonomy Name (should be all lowercase)', 82 'type' => 'text', 83 'default' => 'media-category' 84 ), 85 'rewrite_url' => array( 86 'label' => 'Media Category Library Rewrite URL', 87 'type' => 'text', 88 'default' => 'mediacat-library' 89 ), 90 'title' => array( 91 'label' => 'Media Category Library Title', 92 'type' => 'text', 93 'default' => 'Media Category Library' 94 ), 95 'include_css' => array( 96 'label' => 'Include CSS', 97 'type' => 'select', 98 'values' => array( 'yes' => 'Yes', 'no' => 'No' ), 99 'default' => 'yes' 100 ), 101 'posts_per_page' => array( 102 'label' => 'Posts per page (for frontend Media Category Library)', 103 'type' => 'text', 104 'default' => '20' 105 ) 106 ); 107 107 108 108 // add category column to media library … … 139 139 add_shortcode( 'mediacat', array( &$this, 'get_mediacategory_shortcode' ) ); 140 140 add_shortcode( 'mediacatform', array( &$this, 'get_mediacategoryform_shortcode' ) ); 141 142 // update counts when images updated 143 144 add_action( 'edit_attachment', array( &$this, 'edit_attachment' ) ); 145 } 146 147 /** 148 *edit attachment hook 149 * 150 *@return void 151 *@since 1.8 152 */ 153 function edit_attachment( $post_id ) { 154 global $wpdb; 155 $terms = get_terms( $this->settings_data['taxonomy_name'], array( 'hide_empty' => false ) ); 156 foreach ( $terms as $t ) { 157 $sql = "SELECT COUNT(*) FROM " . $wpdb->term_relationships . " WHERE term_taxonomy_id = " . $t->term_id; 158 $count = $wpdb->get_var( $wpdb->prepare( $sql ) ); 159 $wpdb->update( $wpdb->term_taxonomy, array( 'count' => $count ), array( 'term_taxonomy_id' => $t->term_id ) ); 160 } 141 161 } 142 162 -
media-category-library/trunk/media-category-library.php
r2308264 r2309886 5 5 Description: WordPress plugin that allows items in the Media Library to be assigned to a category. 6 6 Author: Convoy 7 Version: 2. 67 Version: 2.7 8 8 Author: Tim McDaniels 9 9 Author URI: http://WeAreConvoy.com -
media-category-library/trunk/readme.txt
r2308264 r2309886 5 5 Requires at least: 3.0.1 6 6 Tested up to: 5.4.1 7 Stable tag: 2. 67 Stable tag: 2.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 52 52 53 53 == Changelog == 54 55 = 2.7 = 56 * Fix taxonomy counts 54 57 55 58 = 2.6 =
Note: See TracChangeset
for help on using the changeset viewer.