Plugin Directory

Changeset 1813564


Ignore:
Timestamp:
02/01/2018 03:18:56 PM (8 years ago)
Author:
pressshack
Message:

Releasing 1.9.7

Location:
publishpress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • publishpress/trunk/includes.php

    r1813548 r1813564  
    4141
    4242    // Define contants
    43     define( 'PUBLISHPRESS_VERSION', '1.9.6' );
     43    define( 'PUBLISHPRESS_VERSION', '1.9.7' );
    4444    define( 'PUBLISHPRESS_ROOT', dirname( __FILE__ ) );
    4545    define( 'PUBLISHPRESS_FILE_PATH', PUBLISHPRESS_ROOT . '/' . basename( __FILE__ ) );
  • publishpress/trunk/publishpress.php

    r1813548 r1813564  
    66 * Author: PublishPress
    77 * Author URI: https://publishpress.com
    8  * Version: 1.9.6
     8 * Version: 1.9.7
    99 * Text Domain: publishpress
    1010 * Domain Path: /languages
     
    421421    public function filter_custom_menu_order( $menu_ord ) {
    422422        global $submenu;
    423 
    424423        if ( isset( $submenu['pp-calendar'] ) ) {
     424
    425425            $submenu_pp  = $submenu['pp-calendar'];
    426426            $new_submenu = array();
    427427
     428            // Get the index for the menus.
     429            $relevantMenus = array(
     430                'pp-calendar' => null,
     431                'pp-content-overview' => null,
     432                'pp-addons' => null,
     433                'pp-modules-settings' => null,
     434                'edit.php?post_type=psppnotif_workflow' => null,
     435            );
     436
     437            foreach ($submenu_pp as $index => $item) {
     438                if (array_key_exists($item[2], $relevantMenus)) {
     439                    $relevantMenus[$item[2]] = $index;
     440                }
     441            }
     442
    428443            // Calendar
    429             if (isset($submenu_pp[0])) {
    430                 $new_submenu[] = $submenu_pp[0];
     444            if (! is_null($relevantMenus['pp-calendar'])) {
     445                $new_submenu[] = $submenu_pp[$relevantMenus['pp-calendar']];
     446
     447                unset($submenu_pp[$relevantMenus['pp-calendar']]);
    431448            }
    432449
    433450            // Content Overview
    434             if (isset($submenu_pp[1])) {
    435                 $new_submenu[] = $submenu_pp[1];
     451            if (! is_null($relevantMenus['pp-content-overview'])) {
     452                $new_submenu[] = $submenu_pp[$relevantMenus['pp-content-overview']];
     453
     454                unset($submenu_pp[$relevantMenus['pp-content-overview']]);
    436455            }
    437456
    438457            // Notifications
    439             if (isset($submenu_pp[4])) {
    440                 $new_submenu[] = $submenu_pp[4];
     458            if (! is_null($relevantMenus['edit.php?post_type=psppnotif_workflow'])) {
     459                $new_submenu[] = $submenu_pp[$relevantMenus['edit.php?post_type=psppnotif_workflow']];
     460
     461                unset($submenu_pp[$relevantMenus['edit.php?post_type=psppnotif_workflow']]);
     462            }
     463
     464            // Check if we have other menu items, except settings and add-ons. They will be added to the end.
     465            if (count($submenu_pp) > 2) {
     466                // Add the additional items
     467                foreach ($submenu_pp as $index => $item) {
     468                    if (! in_array($index, $relevantMenus)) {
     469                        $new_submenu[] = $item;
     470                        unset($submenu_pp[$index]);
     471                    }
     472                }
    441473            }
    442474
    443475            // Settings
    444             if (isset($submenu_pp[3])) {
    445                 $new_submenu[] = $submenu_pp[3];
     476            if (! is_null($relevantMenus['pp-modules-settings'])) {
     477                $new_submenu[] = $submenu_pp[$relevantMenus['pp-modules-settings']];
     478
     479                unset($submenu_pp[$relevantMenus['pp-modules-settings']]);
    446480            }
    447481
    448482            // Add-ons
    449             if (isset($submenu_pp[2])) {
    450                 $new_submenu[] = $submenu_pp[2];
    451             }
    452 
    453             // Contact Us
    454             if (isset($submenu_pp[5])) {
    455                 $new_submenu[] = $submenu_pp[5];
    456             }
    457 
    458             // Check if we have additional items and add to the end
    459             if ( count( $submenu_pp ) > 6 ) {
    460                 $new_submenu = array_merge( $new_submenu, array_splice( $submenu_pp, 6 ) );
     483            if (! is_null($relevantMenus['pp-addons'])) {
     484                $new_submenu[] = $submenu_pp[$relevantMenus['pp-addons']];
     485
     486                unset($submenu_pp[$relevantMenus['pp-addons']]);
    461487            }
    462488
     
    491517    public function notice_editflow_deactivated() {
    492518        ?>
    493         <div class="updated notice">
    494             <p><?php _e( 'Edit Flow was deactivated by PublishPress. If you want to activate it, deactive PublishPress first.', 'publishpress' ); ?></p>
    495         </div>
     519        <div class="updated notice">
     520            <p><?php _e( 'Edit Flow was deactivated by PublishPress. If you want to activate it, deactive PublishPress first.', 'publishpress' ); ?></p>
     521        </div>
    496522        <?php
    497523    }
  • publishpress/trunk/readme.txt

    r1813548 r1813564  
    77Requires PHP: 5.4
    88Tested up to: 4.9
    9 Stable tag: 1.9.6
     9Stable tag: 1.9.7
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    156156and this project adheres to [Semantic Versioning](http://semver.org/).
    157157
     158= [1.9.7] - 2018-02-01 =
     159
     160*Fixed:*
     161
     162* Fixed broken menu;
     163
    158164= [1.9.6] - 2018-02-01 =
    159165
Note: See TracChangeset for help on using the changeset viewer.