Making WordPress.org


Ignore:
Timestamp:
04/08/2016 10:56:13 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Site Cloner: Add a submenu page to help with visibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/wordcamp-site-cloner.php

    r2914 r2921  
    1515
    1616// todo if Jetpack_Custom_CSS:get_css is callable, register these, otherwise fatal errors
     17
    1718add_action( 'plugins_loaded',        __NAMESPACE__ . '\get_wordcamp_sites' );
    1819add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\register_scripts' );
     20add_action( 'admin_menu',            __NAMESPACE__ . '\add_submenu_page' );
    1921add_action( 'customize_register',    __NAMESPACE__ . '\register_customizer_components' );
    2022
     
    3638        1,
    3739        true
     40    );
     41}
     42
     43/**
     44 * Add a submenu page
     45 *
     46 * This helps organizers to realize that this tool exists, because they otherwise wouldn't see it unless
     47 * they opened the Customizer.
     48 */
     49function add_submenu_page() {
     50    \add_submenu_page(
     51        'themes.php',
     52        __( 'Clone Another WordCamp', 'wordcamporg' ),
     53        __( 'Clone Another WordCamp', 'wordcamporg' ),
     54        'switch_themes',
     55        'customize.php?wordcamp-site-cloner'
    3856    );
    3957}
Note: See TracChangeset for help on using the changeset viewer.