Changeset 521955
- Timestamp:
- 03/21/2012 10:13:29 PM (14 years ago)
- Location:
- menu-rules/trunk
- Files:
-
- 1 added
- 4 edited
-
admin/meta-box.php (modified) (6 diffs)
-
languages (added)
-
menu-rules.php (modified) (1 diff)
-
rules/active-parent.php (modified) (1 diff)
-
rules/child-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
menu-rules/trunk/admin/meta-box.php
r521950 r521955 30 30 $fields['conditions_adv'] = array( 31 31 array( 32 'title' => __('When these conditions match:' ),32 'title' => __('When these conditions match:', 'menu-rules'), 33 33 'type' => 'textarea', 34 34 'name' => 'menu-rules-conditional-exp', … … 37 37 'rows' => 5, 38 38 'cols' => 60, 39 'placeholder' => __('eg is_single()' ),39 'placeholder' => __('eg is_single()', 'menu-rules'), 40 40 ) 41 41 ), … … 45 45 $fields['rules'] = array( 46 46 array( 47 'title' => __( 'Apply these rules:' ),47 'title' => __( 'Apply these rules:' , 'menu-rules'), 48 48 'type' => 'checkbox', 49 49 'name' => 'menu-rules-rules', 50 'text' => __( 'Choose rules' ),50 'text' => __( 'Choose rules' , 'menu-rules'), 51 51 'value' => array_combine( 52 52 array_keys( Menu_Rules::get_var( 'rules_handlers' ) ), … … 59 59 $fields['nav_menus'] = array( 60 60 array( 61 'title' => __( 'To these menu items:' ),61 'title' => __( 'To these menu items:' , 'menu-rules'), 62 62 'type' => 'select', 63 63 'name' => 'menu-rules-menu-items', 64 64 'value' => $nav_menu_dropdown_values, 65 65 'multiple' => true, 66 'text' => __( 'Select menu items' ),66 'text' => __( 'Select menu items' , 'menu-rules'), 67 67 'extra' => array( 68 68 'class' => 'menu-rules-items-select', … … 82 82 // User need to create a menu before using menu rules 83 83 if ( ! $nav_menus ) { 84 echo '<p class="error-message">' . sprintf( __('You aren\'t using WordPress custom menus. %sCreate one now to start using Menu Rules%s' ), '<a href="' . admin_url( 'nav-menus.php' ) . '">', '</a>' ) . '</p>';84 echo '<p class="error-message">' . sprintf( __('You aren\'t using WordPress custom menus. %sCreate one now to start using Menu Rules%s', 'menu-rules'), '<a href="' . admin_url( 'nav-menus.php' ) . '">', '</a>' ) . '</p>'; 85 85 return; 86 86 } … … 91 91 echo PB_Forms::table( $this->get_fields( 'rules' ), $postmeta ); 92 92 echo PB_Forms::table( $this->get_fields( 'nav_menus' ), $postmeta ); 93 echo '<p>' . sprintf( __('A full list of conditonal tags can be %sfound on the WordPress.org codex%s. Do not include an if statement or a semicolon.' ), '<a href="http://codex.wordpress.org/Conditional_Tags" target="_blank">', '</a>' ) . '</p>';94 echo '<h4>' . __('Condition Examples' ) . '</h4>';95 echo '<p>' . sprintf( __('%sis_single()%s applies rules when viewing a single post.' ), '<code>', '</code>' ) . '</p>';96 echo '<p>' . sprintf( __('%sis_singular( \'product\' )%s applies rules when viewing a single product.' ), '<code>', '</code>' ) . '</p>';97 echo '<p>' . sprintf( __('%s( is_singular( \'book\' ) || is_singular( \'journal\' ) ) && has_tag( \'fiction\' )%s applies rules when showing a single book or journal which is tagged as fiction' ), '<code>', '</code>' ) . '</p>';93 echo '<p>' . sprintf( __('A full list of conditonal tags can be %sfound on the WordPress.org codex%s. Do not include an if statement or a semicolon.', 'menu-rules'), '<a href="http://codex.wordpress.org/Conditional_Tags" target="_blank">', '</a>' ) . '</p>'; 94 echo '<h4>' . __('Condition Examples', 'menu-rules') . '</h4>'; 95 echo '<p>' . sprintf( __('%sis_single()%s applies rules when viewing a single post.', 'menu-rules'), '<code>', '</code>' ) . '</p>'; 96 echo '<p>' . sprintf( __('%sis_singular( \'product\' )%s applies rules when viewing a single product.', 'menu-rules'), '<code>', '</code>' ) . '</p>'; 97 echo '<p>' . sprintf( __('%s( is_singular( \'book\' ) || is_singular( \'journal\' ) ) && has_tag( \'fiction\' )%s applies rules when showing a single book or journal which is tagged as fiction', 'menu-rules'), '<code>', '</code>' ) . '</p>'; 98 98 } 99 99 -
menu-rules/trunk/menu-rules.php
r521950 r521955 66 66 register_post_type( self::get_var( 'post_type' ), array( 67 67 'labels' => array( 68 'name' => _x('Menu Rules', 'post type general name' ),69 'singular_name' => _x('Menu Rule', 'post type singular name' ),70 'add_new' => _x('Add New', 'Menu Rule' ),71 'add_new_item' => __('Add New Menu Rule' ),72 'edit_item' => __('Edit Menu Rule' ),73 'new_item' => __('New Menu Rule' ),74 'view_item' => __('View Menu Rule' ),75 'search_items' => __('Search Menu Rules' ),76 'not_found' => __('No Menu Rules found' ),77 'not_found_in_trash' => __('No Menu Rules found in Trash' ),68 'name' => _x('Menu Rules', 'post type general name', 'menu-rules'), 69 'singular_name' => _x('Menu Rule', 'post type singular name', 'menu-rules'), 70 'add_new' => _x('Add New', 'Menu Rule', 'menu-rules'), 71 'add_new_item' => __('Add New Menu Rule', 'menu-rules'), 72 'edit_item' => __('Edit Menu Rule', 'menu-rules'), 73 'new_item' => __('New Menu Rule', 'menu-rules'), 74 'view_item' => __('View Menu Rule', 'menu-rules'), 75 'search_items' => __('Search Menu Rules', 'menu-rules'), 76 'not_found' => __('No Menu Rules found', 'menu-rules'), 77 'not_found_in_trash' => __('No Menu Rules found in Trash', 'menu-rules'), 78 78 ), 79 79 'public' => false, -
menu-rules/trunk/rules/active-parent.php
r521950 r521955 10 10 11 11 function __construct() { 12 $this->setup( __('Emulate current page as a child but do not create a menu item.' ) );12 $this->setup( __('Emulate current page as a child but do not create a menu item.', 'menu-rules') ); 13 13 } 14 14 -
menu-rules/trunk/rules/child-page.php
r521950 r521955 8 8 9 9 function __construct() { 10 $this->setup( __('Insert the current page into the menu as a child.' ) );10 $this->setup( __('Insert the current page into the menu as a child.', 'menu-rules') ); 11 11 } 12 12
Note: See TracChangeset
for help on using the changeset viewer.