Exemplo n.º 1
0
/**
 * Register all the option pages
 */
function dslc_plugin_options_setup()
{
    global $dslc_plugin_options;
    do_action('dslc_hook_register_options');
    // Base 64 encoded SVG image.
    $icon_svg = dslc_get_menu_svg();
    add_menu_page(__('Live Composer', 'live-composer-page-builder'), __('Live Composer', 'live-composer-page-builder'), 'manage_options', 'dslc_plugin_options', 'dslc_plugin_options_display', $icon_svg, '99.99');
    // Custom options extension.
    global $dslc_options_extender;
    $dslc_options_extender->construct_panels();
}
Exemplo n.º 2
0
/**
 * Register hidden page in WP Admin used as a wrapper for LC editing.
 *
 * Create /wp-admin/admin.php?page=livecomposer_editor&page_id=XX page.
 * Page has no menu item in WP Admin Panel.
 *
 * @since 1.1
 */
function dslc_editing_screen()
{
    global $dslc_plugin_options;
    $capability = dslc_get_option('lc_min_capability_page', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    // Base 64 encoded SVG image.
    $icon_svg = dslc_get_menu_svg();
    add_menu_page(__('Live Composer Editing', 'live-composer-page-builder'), __('Live Composer Editing', 'live-composer-page-builder'), $capability, 'livecomposer_editor', 'dslc_editing_screen_content', $icon_svg, '99');
    remove_menu_page('livecomposer_editor', 'livecomposer_editor');
}