Changeset 1277266
- Timestamp:
- 11/01/2015 04:50:18 PM (10 years ago)
- Location:
- enhanced-category-pages/trunk
- Files:
-
- 5 edited
-
classes/ecp/Enhanced_Category.php (modified) (2 diffs)
-
classes/ecp/WP_Custom_Post.php (modified) (5 diffs)
-
classes/ecp/WP_Integration.php (modified) (5 diffs)
-
enhanced-category-pages.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
enhanced-category-pages/trunk/classes/ecp/Enhanced_Category.php
r1179798 r1277266 10 10 private $_cp_proprieties; 11 11 12 public function __construct($translation_domain, $table_categ ories_posts) {12 public function __construct($translation_domain, $table_categs_posts) { 13 13 $this->_name = 'Enhanced Category'; 14 14 $this->_name_plural = 'Enhanced Categories'; 15 15 $this->_prevent_update = false; 16 $this->_table_categories_posts = $table_categ ories_posts;16 $this->_table_categories_posts = $table_categs_posts; 17 17 18 18 $this->_cp_proprieties = array( … … 164 164 $cat = get_term($category_id, $taxonomy); 165 165 $post_id = $this->add_new_from_category($cat); 166 } else { 167 $post_id = $posts_array[0]->ID; 168 } 166 167 return $post_id; 168 } 169 170 $post_id = $posts_array[0]->ID; 169 171 170 172 return $post_id; -
enhanced-category-pages/trunk/classes/ecp/WP_Custom_Post.php
r1101510 r1277266 10 10 public $id; 11 11 12 private $meta;12 //private $meta; 13 13 14 14 public function __construct($register_options = array(), $translation_domain = "") { … … 50 50 global $post, $post_ID; 51 51 $_uname = ucfirst($this->_name); 52 $_uname_plural = ucfirst($this->_name_plural); 52 $revision = isset($_GET['revision']) ? (int) isset($_GET['revision']) : 0; 53 //$_uname_plural = ucfirst($this->_name_plural); 53 54 54 55 $messages[$this->get_safe_name()] = array( … … 58 59 3 => __('Custom field deleted.'), 59 60 4 => $this->translate('Successfully updated', $_uname), 60 5 => isset($_GET['revision']) ? $this->translate('Restored to revision from %s', $_uname, wp_post_revision_title((int) $_GET['revision'], false)) : false,61 5 => $revision ? $this->translate('Restored to revision from %s', $_uname, wp_post_revision_title($revision, false)) : false, 61 62 6 => $this->translate('Published. <a href="%s">View</a>', $_uname, esc_url(get_permalink($post_ID)), $this->_name), 62 63 7 => $this->translate('Saved.', $_uname), … … 75 76 //translates all parameters and then they are sprintf-ed in the first parameter 76 77 protected function translate($str1) { 78 $str1; 77 79 $translation = ''; 78 80 … … 81 83 //translate each string received as argument 82 84 array_walk($args, function (&$str, $index, $translation_domain) { 85 $index; 83 86 $str = __($str, $translation_domain); 84 87 }, $this->_translation_domain); -
enhanced-category-pages/trunk/classes/ecp/WP_Integration.php
r1277248 r1277266 90 90 91 91 public function category_description_filter($description, $categoryId = null) { 92 $categoryId; 92 93 93 94 ob_start(); … … 150 151 $taxonomy = get_taxonomy($category->taxonomy); 151 152 152 $a = '<a class="add-new-h2 back-to-categories" href="'153 $anchor = '<a class="add-new-h2 back-to-categories" href="' 153 154 . esc_url(admin_url("edit-tags.php?taxonomy={$category->taxonomy}")) . '">' 154 155 . __("Back to {$taxonomy->labels->name}", $this->_translation_domain) . "</a>"; 155 156 156 echo '<input type="hidden" id="enhanced_category_list_edit_url" value="' . htmlentities($a ) . '" />';157 echo '<input type="hidden" id="enhanced_category_list_edit_url" value="' . htmlentities($anchor) . '" />'; 157 158 158 159 echo '<input type="hidden" id="taxonomy_single_name" value="' . htmlentities($taxonomy->labels->singular_name) . '" />'; … … 221 222 222 223 public function add_category($term_id, $tt_id, $taxonomy) { 223 224 $tt_id; 224 225 $term = get_term($term_id, $taxonomy); 225 226 … … 232 233 233 234 public function update_category($category_id, $tt_id, $taxonomy) { 235 $tt_id; 234 236 $cat = get_term($category_id, $taxonomy); 235 237 … … 257 259 258 260 private function is_valid_taxonomy($taxonomy_name) { 261 $taxonomy_name; 259 262 //always true for the moment 260 263 //TODO: should check the user settings -
enhanced-category-pages/trunk/enhanced-category-pages.php
r1277248 r1277266 4 4 Description: Create custom enhanced pages for categories. Manage category page as a custom post. 5 5 Author: Ciprian Amariei, Diana Amitroaei 6 Version: 2.1. 06 Version: 2.1.1 7 7 Text Domain: enhanced-category-pages 8 8 Text Path: languages -
enhanced-category-pages/trunk/readme.txt
r1277248 r1277266 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.3.1 7 Stable tag: 2.1. 07 Stable tag: 2.1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 157 157 * WooCommerce product category can be enhanced now 158 158 159 = 2.1.1 = 160 * Improve code quality 161 159 162 == Upgrade Notice == 160 163 … … 179 182 = 2.1.0 = 180 183 * New feature: WooCommerce product category can be enhanced now 184 185 = 2.1.1 = 186 * Improve code quality
Note: See TracChangeset
for help on using the changeset viewer.