WordPress.org

Ready to get started?Download WordPress

Forums

New Blog Defaults
New Blog Defaults broken in WP 3.1 - fix (9 posts)

  1. dbvista
    Member
    Posted 3 years ago #

    New Blog Defaults doesn't display its admin page in WordPress 3.1. You can fix it in cets_blog_defaults.php, function add_siteadmin_page(), by replacing its body with this:

    add_options_page('New Blog Defaults',
                     'New Blog Defaults',
                     'manage_network_options',
                     'cets_blog_defaults_management_page',
                     array(&$this,
                           'cets_blog_defaults_management_page'));

    instead of the call to "add_submenu_page".

  2. raskull
    Member
    Posted 3 years ago #

    Thanks a million!!!

    Also used your idea to fix cets_blogtopics:

    Change add_submenu_page to add_options_page, and remove the first parameter -- 'wpmu-admin.php'

  3. illum
    Member
    Posted 3 years ago #

    Thanks - your hack works :)

  4. Helen Hou-Sandi
    WordPress Dev
    Posted 3 years ago #

    Actually, even better, you can add it to the network menu instead. Use

    add_submenu_page('settings.php', 'New Blog Defaults',
                     'New Blog Defaults',
                     'manage_network_options',
                     'cets_blog_defaults_management_page',
                     array(&$this,
                           'cets_blog_defaults_management_page'));

    for the add_siteadmin_page() function. Then, where the action for admin_menu is called using the function, use network_admin_menu instead.

  5. Jason Lemahieu (MadtownLems)
    Member
    Plugin Author

    Posted 3 years ago #

    Just FYI - We've updated this.

  6. raskull
    Member
    Posted 3 years ago #

    Thanks! Can you help me insert into this plugin a line or two of code (hopefully) to change the first page default title to About, instead of the default Sample Page. In wp-admin/includes/upgrade.php there is this:

    $wpdb->insert( $wpdb->posts, array(
    'post_title' => __( 'Sample Page' ),
    'post_name' => __( 'sample-page' ),
    etc

    I've tried to override it with various things like:
    update_option(2, array('post_title'=>'About', 'post_name'=>'about'));
    to no avail...
    I don't need an admin control for this, just want to hardwire it under the hood.

    Also, do you work on cets_blogtopics too? I've got it up and limping in 3.1 but need some expert input. Sounds like Deanna is not working on WP these days?

  7. w101
    Member
    Posted 2 years ago #

    Can anyone confirm whether this works out-of-the-box on WP 3.2.1?

    Thanks!

  8. Jason Lemahieu (MadtownLems)
    Member
    Plugin Author

    Posted 2 years ago #

    yes - this works w101

  9. w101
    Member
    Posted 2 years ago #

    Thanks MadtownLems..

    Question: in WP 3.2.1+buddypress, should this be installed in
    wp-content/mu-plugins/wpmu-new-blog-defaults/
    or in
    wp-content/plugins/wpmu-new-blog-defaults/

    If I use the auto-install it places it in wp-content/plugins/wpmu-new-blog-defaults/ yet the install instructions call for placing JUST the cets_blog_defaults.php file in the wp-content/mu-plugins, which by default, doesn't even exist in my installation.

    Thanks...

    P.S.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic