Making WordPress.org

Changeset 2309


Ignore:
Timestamp:
01/18/2016 05:21:51 PM (11 years ago)
Author:
iandunn
Message:

WordCamp Budgets: Group Invoices and Payments under a common menu.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-budgets.css

    r2301 r2309  
    22 * Common
    33 */
    4 .menu-icon-wcp_payment_request .wp-menu-image img,
    5 .menu-icon-wcb_sponsor_invoice .wp-menu-image img {
     4.toplevel_page_wordcamp-budget .wp-menu-image img {
    65        margin-left: 9px;
    76}
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php

    r2299 r2309  
    4646                        'edit_item'          => __( 'Edit Payment Request', 'wordcamporg' ),
    4747                        'view_item'          => __( 'View Payment Request', 'wordcamporg' ),
    48                         'all_items'          => __( 'All Payment Requests', 'wordcamporg' ),
     48                        'all_items'          => __( 'Payment Requests', 'wordcamporg' ),
    4949                        'search_items'       => __( 'Search Payment Requests', 'wordcamporg' ),
    5050                        'parent_item_colon'  => __( 'Parent Payment Requests:', 'wordcamporg' ),
    … …  
    5858                        'public'            => false,
    5959                        'show_ui'           => true,
     60                        'show_in_menu'      => 'wordcamp-budget',
    6061                        'show_in_nav_menus' => true,
    61                         'menu_position'     => 25,
    62                         'menu_icon'         => plugins_url( 'images/dollar-sign-icon.svg', dirname( __FILE__ ) ),
    6362                        'supports'          => array( 'title' ),
    6463                        'has_archive'       => true,
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/sponsor-invoice.php

    r2301 r2309  
    4444                'edit_item'          => __( 'Edit Invoice',               'wordcamporg' ),
    4545                'view_item'          => __( 'View Invoice',               'wordcamporg' ),
    46                 'all_items'          => __( 'Invoices',                   'wordcamporg' ),
     46                'all_items'          => __( 'Sponsor Invoices',           'wordcamporg' ),
    4747                'search_items'       => __( 'Search Invoices',            'wordcamporg' ),
    4848                'not_found'          => __( 'No invoice found.',          'wordcamporg' ),
    … …  
    5555                'public'            => false,
    5656                'show_ui'           => true,
     57                'show_in_menu'      => 'wordcamp-budget',
    5758                'show_in_nav_menus' => true,
    58                 'menu_icon'         => plugins_url( 'images/dollar-sign-icon.svg', dirname( __FILE__ ) ),
    5959                'supports'          => array( 'title' ),
    6060                'has_archive'       => true,
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php

    r2303 r2309  
    55 */
    66class WordCamp_Budgets {
    7         const VERSION = '0.1.2';
     7        const VERSION = '0.1.3';
    88
    99        /**
    … …  
    1111         */
    1212        public function __construct() {
     13                add_action( 'admin_menu',             array( $this, 'register_budgets_menu' )     );
    1314                add_action( 'admin_enqueue_scripts',  array( $this, 'enqueue_common_assets' ), 11 );
     15        }
     16
     17        /**
     18         * Register the Budgets menu
     19         *
     20         * This is just an empty page so that a top-level menu can be created to hold the various post types and pages.
     21         *
     22         * @todo This may no longer be needed once the Budgets post type and Overview pages are added
     23         */
     24        public function register_budgets_menu() {
     25                add_menu_page(
     26                        __( 'WordCamp Budget', 'wordcamporg' ),
     27                        __( 'Budget',          'wordcamporg' ),
     28                        'manage_options',
     29                        'wordcamp-budget',
     30                        '__return_empty_string',
     31                        plugins_url( 'images/dollar-sign-icon.svg', dirname( __FILE__ ) ),
     32                        30
     33                );
    1434        }
    1535
Note: See TracChangeset for help on using the changeset viewer.