"No New Pages" plugin

A small plugin I made and posted in the GetSimple forum.

If activated, when you try to create a page you get redirected to the admin panel's main page.

// register plugin
$thisfile = basename(__FILE__, ".php");
    'No New Pages',
    'Carlos Navarro', '#',
    'Prevents creation of new pages', '', ''


function nonewpages() { ?>
    <style type="text/css">
        #sb_newpage { display:none; }
        #submit_line #dropdown { display:none; }
    if (basename($_SERVER['PHP_SELF'])=='edit.php') {
        if (!isset($_GET['id'])) {
            global $cookie_redirect;

// end of file

Copy and save as nonewpages.php in your plugins folder.

Edit, 0.2: I've updated it. Now it also hides the 'create new page' link (in GS 3.1).
Edit, 0.3: Hides dropdown (that allowed creating by cloning an existing page)

blog comments powered by Disqus