Plugin Directory

Changeset 780031


Ignore:
Timestamp:
09/29/2013 09:36:06 PM (13 years ago)
Author:
suboptimist
Message:

Version 0.1.2

  • CSS class current_division_item is also added to menu items that have "no division" attached"
  • Divisions menu entry in admin interface is displayed after second seperator
  • Divisions configuration is only available for administrators
Location:
divisions/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • divisions/trunk/divisions.php

    r779299 r780031  
    44Plugin URI: http://www.nachstedt.com/en/divisions-wordpress-plugin-en
    55Description: 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.1
     6Version: 0.1.2
    77Author: Timo Nachstedt
    88Author URI: http://www.nachstedt.com
     
    155155        public function setup_nav_menu_item_filter($menu_item)
    156156        {
    157             if (is_admin()) return $menu_item;
     157            if (is_admin()) {return $menu_item;}
    158158            $division_enabled = esc_attr( get_post_meta(
    159159                $menu_item->ID,
     
    166166            if ($division_enabled)
    167167            {
    168                 // chosen_division <0 means "no division"
    169                 if ($chosen_division <0 ) return $menu_item;
    170168                $division = $chosen_division;
    171169            }
     
    174172                $division = $this->get_current_division();
    175173            }
    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            }
    180182            if ($division_enabled && $division==$this->get_current_division())
     183            {
    181184                $menu_item->classes[] =
    182185                    dvs_Constants::CSS_CLASS_MENU_ITEM_CURRENT_DIVISION;
     186            }
    183187            return $menu_item;
    184188        }
  • divisions/trunk/includes/dvs_constants.php

    r779299 r780031  
    66    class dvs_Constants {
    77
    8         const VERSION = '0.1.1';
     8        const VERSION = '0.1.2';
    99        const DATABASE_VERSION_OPTION = "divisions_plugion_version";
    1010
  • divisions/trunk/includes/dvs_division.php

    r779299 r780031  
    4343                    'show_in_nav_menus'    => false,
    4444                    '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                    ),
    4555                    'has_archive'          => false,
    4656                    'supports'             => array(
  • divisions/trunk/readme.txt

    r779299 r780031  
    55Requires at least: 3.6
    66Tested up to: 3.6
    7 Stable tag: 0.1.1
     7Stable tag: 0.1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717navigation menus and header images. At the same time, all divisions share the
    1818same 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.
     19Navigation menu entries are used to switch between divisions. Technically, the
     20division is determined by an additional argument in the URL.
    2421
    2522== Installation ==
     
    4643== Changelog ==
    4744
     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
    4850= 0.1.1 =
    4951* fixing paths issues of php and script files
     
    5860== Upgrade Notice ==
    5961
     62= 0.1.2 =
     63Some minor improvements.
     64
    6065= 0.1.1 =
    6166This version fixes several critical bugs.
Note: See TracChangeset for help on using the changeset viewer.