Changeset 1242718
- Timestamp:
- 09/10/2015 06:58:54 PM (11 years ago)
- Location:
- sf-category-menu/trunk
- Files:
-
- 3 added
- 1 edited
-
languages (added)
-
languages/sf-category-menu-en_EN.mo (added)
-
languages/sf-category-menu-en_EN.po (added)
-
sf-category-menu.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sf-category-menu/trunk/sf-category-menu.php
r1167414 r1242718 5 5 * Plugin URI: http://studiofreya.com/sf-category-menu/ 6 6 * Description: Easy treeview menu for WordPress categories. 7 * Version: 1. 17 * Version: 1.2 8 8 * Author: Studiofreya AS 9 9 * Author URI: http://studiofreya.com … … 11 11 */ 12 12 13 function getPostCount($catid)13 function sf_getPostCount($catid) 14 14 { 15 15 $args = array( … … 66 66 } 67 67 68 function doCategories( $categories, $select_style, $parent = 0 )68 function sf_doCategories( $categories, $select_style, $parent = 0 ) 69 69 { 70 70 $num = count( $categories ); … … 87 87 { 88 88 $ID = $category->cat_ID; 89 $subcatcount = getPostCount($ID);89 $subcatcount = sf_getPostCount($ID); 90 90 91 91 $category_link = esc_url( get_category_link( $category->term_id ) ); 92 $link_title = sprintf( __( "View all posts in %s (%s)"), $category->name, $subcatcount );92 $link_title = sprintf( __( 'View all posts in %s (%s)', 'sf-category' ), $category->name, $subcatcount ); 93 93 $catname = $category->name; 94 94 … … 111 111 $childcats = get_categories( $childargs ); 112 112 113 doCategories( $childcats, $select_style, $ID );113 sf_doCategories( $childcats, $select_style, $ID ); 114 114 115 115 echo " … … 152 152 echo '<div class="dynamic_sidemenu">'; 153 153 154 doCategories( $categories, $select_style );154 sf_doCategories( $categories, $select_style ); 155 155 156 156 echo '</div>'; … … 191 191 192 192 <p> 193 <label for="<?php echo $this->get_field_id('select_style'); ?>"><?php _e('Style:', ' wp_widget_plugin'); ?></label>193 <label for="<?php echo $this->get_field_id('select_style'); ?>"><?php _e('Style:', 'sf-category'); ?></label> 194 194 <select name="<?php echo $this->get_field_name('select_style'); ?>" id="<?php echo $this->get_field_id('select_style'); ?>"> 195 195 <?php … … 203 203 204 204 <p> 205 <label for="<?php echo $this->get_field_id('exclude_cat'); ?>"><?php _e('Exclude ID:', ' wp_widget_plugin'); ?></label>205 <label for="<?php echo $this->get_field_id('exclude_cat'); ?>"><?php _e('Exclude ID:', 'sf-category'); ?></label> 206 206 <input id="<?php echo $this->get_field_id('exclude_cat'); ?>" name="<?php echo $this->get_field_name('exclude_cat'); ?>" type="text" value="<?php echo $exclude_cat; ?>" /> 207 207 </p> … … 216 216 add_action( 'widgets_init', 'sf_category_menu_widget_register_widgets' ); 217 217 218 function load_jquery() {218 function sf_category_load() { 219 219 wp_enqueue_script( 'jquery' ); 220 220 … … 224 224 } 225 225 226 add_action( 'wp_enqueue_scripts', 'load_jquery' ); 226 add_action( 'wp_enqueue_scripts', 'sf_category_load' ); 227 228 function sf_category_init() { 229 load_textdomain( 'sf-category', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 230 } 231 add_action( 'plugins_loaded', 'sf_category_init' ); 227 232 228 233
Note: See TracChangeset
for help on using the changeset viewer.