Plugin Directory

Changeset 1502904


Ignore:
Timestamp:
09/26/2016 03:39:16 PM (9 years ago)
Author:
joje47
Message:

Moved code for cleaning up Wordpress menu from ngo-menu-deactivate to event-organiser-ngo

Location:
event-organiser-ngo
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • event-organiser-ngo/trunk/event-organiser-ngo.php

    r1501820 r1502904  
    44* Plugin URI: http://ngo-portal.org
    55* Description: Tillägg till Event-organiser för att visa förenings-siters event i portalkalendern + 2 kalenderwidgetar för förenings-siter och en kalenderwidget till portal-siten. Ska vara nätverksaktiverad tillsammans med Event-Organiser.
    6 * Version: 1.1.6
     6* Version: 1.2
    77* Author: George Bredberg
    88* Author URI: http://datagaraget.se
    99* Text Domain: event-organiser-ngo
    1010* Domain Path: /languages
    11 * License   GPL-2.0+
    12 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     11* License GPLv3
     12* License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1313*/
    1414
     
    8787}
    8888
     89/* Clean up WP-admin menu */
     90// Remove Event Organiser Menu items that we don't need
     91function ngo_remove_eo() {
     92    remove_menu_page( 'edit.php?post_type=event' );
     93}
     94if (!(current_user_can('manage_options'))) {
     95    add_action( 'admin_menu', 'ngo_remove_eo' );
     96}
     97
     98// Event organiser - Removes submenu items in WP-admin
     99function ngo_remove_eosubmenu(){
     100    remove_submenu_page('edit.php?post_type=event','debug'); //Events - System info
     101    remove_submenu_page('edit.php?post_type=event','eo-addons'); //Events - Extensions
     102// FIX: How to remove Settings -> Event organiser -> tab permalinks and tab Import/Export?
     103// remove entire settings - event organiser for everyone except super admin for now.
     104    remove_submenu_page('options-general.php','event-settings');  //settings -> event organiser
     105
     106}
     107
     108// Event organiser - Deactivate custom field
     109function remove_eopost_custom_fields(){
     110    remove_meta_box('postcustom', 'event', 'normal');
     111}
     112
     113if(!is_super_admin()){
     114    add_action( 'admin_menu', 'ngo_remove_eosubmenu', 999 ); // Maybe move these to eo-ngo
     115    add_action( 'do_meta_boxes', 'remove_eopost_custom_fields' ); // Maybe move these to eo-ngo
     116}
     117
     118// These widgets could be usefull, but maybe confusing?
     119function ngo_unregister_eo_widgets() {
     120    unregister_widget('EO_Events_Agenda_Widget');
     121    unregister_widget('EO_Event_List_Widget');
     122    unregister_widget('EO_Calendar_Widget');
     123    unregister_widget('EO_Widget_Categories');
     124    unregister_widget('EO_Widget_Venues');
     125}
     126// add_action('widgets_init', 'ngo_unregister_eo_widgets', 11); // Let's keep these until we see if they are confusing or not.
     127/* Done cleaning up menu */
     128
    89129// Some css for calendar widgets
    90130add_action( 'wp_enqueue_scripts', 'eongo_calendar_style', 15 );
  • event-organiser-ngo/trunk/readme.txt

    r1501820 r1502904  
    55Requires at least: 3.0.1
    66Tested up to: 4.6
    7 Stable tag: 1.1.6
    8 License: GPLv2 or later
    9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     7Stable tag: 1.2
     8License GPLv3
     9License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    1111Plugin to share events in a WPMU installation. Creates calendar widgets for sites, and a portal calendar + portal calendar widget to show shared events from site to the network site. This is an add-on plugin to Event-Organiser.
     
    4949
    5050== Changelog ==
     51= 1.2 =
     52* Latest stable release
     53Cleaned up some menu items. This code was in ngo-menu-deactivate before, but it makes more sence to have it here.
     54Also changed license from GPLv2+ to GPLv3
     55
    5156= 1.1.6 =
    52 * Latest stable release
    5357Changed donation link (important stuff ;) )
    5458
     
    5761
    5862= 1.1.4 =
    59 
     63Initital release on Wordpress
Note: See TracChangeset for help on using the changeset viewer.