Changeset 780031
- Timestamp:
- 09/29/2013 09:36:06 PM (13 years ago)
- Location:
- divisions/trunk
- Files:
-
- 4 edited
-
divisions.php (modified) (4 diffs)
-
includes/dvs_constants.php (modified) (1 diff)
-
includes/dvs_division.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
divisions/trunk/divisions.php
r779299 r780031 4 4 Plugin URI: http://www.nachstedt.com/en/divisions-wordpress-plugin-en 5 5 Description: Create multiple divisions in your site with individual menus, sidebars and header images. Divisions may easily change share content of all types while maintaining a consistent look. 6 Version: 0.1. 16 Version: 0.1.2 7 7 Author: Timo Nachstedt 8 8 Author URI: http://www.nachstedt.com … … 155 155 public function setup_nav_menu_item_filter($menu_item) 156 156 { 157 if (is_admin()) return $menu_item;157 if (is_admin()) {return $menu_item;} 158 158 $division_enabled = esc_attr( get_post_meta( 159 159 $menu_item->ID, … … 166 166 if ($division_enabled) 167 167 { 168 // chosen_division <0 means "no division"169 if ($chosen_division <0 ) return $menu_item;170 168 $division = $chosen_division; 171 169 } … … 174 172 $division = $this->get_current_division(); 175 173 } 176 $menu_item->url = add_query_arg( 177 dvs_Constants::QUERY_ARG_NAME_DIVISION, 178 $division, 179 $menu_item->url); 174 // chosen_division <0 means "no division" 175 if ($division >= 0) 176 { 177 $menu_item->url = add_query_arg( 178 dvs_Constants::QUERY_ARG_NAME_DIVISION, 179 $division, 180 $menu_item->url); 181 } 180 182 if ($division_enabled && $division==$this->get_current_division()) 183 { 181 184 $menu_item->classes[] = 182 185 dvs_Constants::CSS_CLASS_MENU_ITEM_CURRENT_DIVISION; 186 } 183 187 return $menu_item; 184 188 } -
divisions/trunk/includes/dvs_constants.php
r779299 r780031 6 6 class dvs_Constants { 7 7 8 const VERSION = '0.1. 1';8 const VERSION = '0.1.2'; 9 9 const DATABASE_VERSION_OPTION = "divisions_plugion_version"; 10 10 -
divisions/trunk/includes/dvs_division.php
r779299 r780031 43 43 'show_in_nav_menus' => false, 44 44 'show_in_menu' => true, 45 'menu_position' => 100, 46 'capabilities' => array( 47 'edit_post' => 'manage_options', 48 'read_post' => 'manage_options', 49 'delete_post' => 'manage_options', 50 'edit_posts' => 'manage_options', 51 'edit_others_posts' => 'manage_options', 52 'publish_posts' => 'manage_options', 53 'read_private_posts' => 'manage_options' 54 ), 45 55 'has_archive' => false, 46 56 'supports' => array( -
divisions/trunk/readme.txt
r779299 r780031 5 5 Requires at least: 3.6 6 6 Tested up to: 3.6 7 Stable tag: 0.1. 17 Stable tag: 0.1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 17 17 navigation menus and header images. At the same time, all divisions share the 18 18 same content data and a single posts can be displayed in any division. 19 Navigation menu entries are used to switch between divisions. 20 21 Technically, the division is just determined by an additional argument in the 22 URL. Be aware that as of now, there is no check to prevent certain content to 23 be displayed in a given division. It is really just about the look and feel. 19 Navigation menu entries are used to switch between divisions. Technically, the 20 division is determined by an additional argument in the URL. 24 21 25 22 == Installation == … … 46 43 == Changelog == 47 44 45 = 0.1.2 = 46 * CSS class current_division_item is also added to menu items that have "no division" attached" 47 * Divisions menu entry in admin interface is displayed after second seperator 48 * Divisions configuration is only available for administrators 49 48 50 = 0.1.1 = 49 51 * fixing paths issues of php and script files … … 58 60 == Upgrade Notice == 59 61 62 = 0.1.2 = 63 Some minor improvements. 64 60 65 = 0.1.1 = 61 66 This version fixes several critical bugs.
Note: See TracChangeset
for help on using the changeset viewer.