WordPress.org

Plugin Directory

Changeset 631940


Ignore:
Timestamp:
11/29/12 19:20:18 (17 months ago)
Author:
MadtownLems
Message:

minor cleanup. notices, warnings. tested through 3.4.2

Location:
wpmu-new-blog-defaults/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpmu-new-blog-defaults/trunk/cets_blog_defaults.php

    r487121 r631940  
    22/****************************************************************************************************************** 
    33  
    4 Plugin Name: cets_blog_defaults 
    5  
     4Plugin Name: New Blog Defaults (CETS) 
    65Plugin URI: 
    7  
    86Description: WordPress Multisite plugin for network admin to set defaults for new blogs.  
    9  
    10 Version: 2.2 
    11  
    12 Author: Deanna Schneider, Jason Lemahieu 
     7Version: 2.2.2 
     8Author: Deanna Schneider, Jason Lemahieu (MadtownLems) 
    139 
    1410Copyright: 
    1511 
    16     Copyright 2008 - 2011 CETS 
     12    Copyright 2008 - 2012 CETS 
    1713 
    1814    This program is free software; you can redistribute it and/or modify 
     
    107103             'default_link_cat' => 'Links', 
    108104             'delete_first_post' => 0, 
     105             'delete_initial_widgets' => 0, 
    109106             'delete_first_comment' => 0, 
    110107             'default_links' => '', 
     
    251248        } 
    252249        unset($options['delete_first_post']); 
     250         
     251        // Delete Initial Widgets 
     252        if (isset($options['delete_initial_widgets']) && $options['delete_initial_widgets'] == 1){ 
     253            delete_option('sidebars_widgets'); 
     254        } 
     255        unset($options['delete_initial_widgets']); 
     256         
    253257         
    254258        // Add Default Links 
     
    484488        $newoptions['default_cat_name'] = $_POST['default_cat_name']; 
    485489        $newoptions['default_link_cat'] = $_POST['default_link_cat']; 
    486         if ($_POST['delete_first_post'] == 1) { 
     490     
     491    if ($_POST['delete_first_post'] == 1) { 
    487492        $newoptions['delete_first_post'] = 1; } 
    488493        else {$newoptions['delete_first_post'] = 0;} 
     494         
     495        if ($_POST['delete_initial_widgets'] == 1) { 
     496        $newoptions['delete_initial_widgets'] = 1; } 
     497        else {$newoptions['delete_initial_widgets'] = 0;} 
     498     
    489499        if ($_POST['delete_first_comment'] == 1) { 
    490500        $newoptions['delete_first_comment'] = 1; } 
    491501        else {$newoptions['delete_first_comment'] = 0;} 
     502         
    492503        if ($_POST['add_user_to_blog'] == 1) { 
    493504        $newoptions['add_user_to_blog'] = 1; } 
    494505        else {$newoptions['add_user_to_blog'] = 0;} 
     506         
    495507        $newoptions['add_user_to_blog_role'] = $_POST['add_user_to_blog_role']; 
    496508        $newoptions['add_user_to_blog_id'] = $_POST['add_user_to_blog_id']; 
     509         
    497510        if ($_POST['close_comments_on_hello_world'] == 1) { 
    498511        $newoptions['close_comments_on_hello_world'] = 1; } 
    499512        else {$newoptions['close_comments_on_hello_world'] = 0;} 
     513         
    500514        if ($_POST['close_comments_on_about_page'] == 1) { 
    501515        $newoptions['close_comments_on_about_page'] = 1; } 
     
    13441358        </td> 
    13451359        </tr> 
     1360         
     1361        <tr> 
     1362            <th>Delete Initial Widgets</th> 
     1363            <td> 
     1364            <input name="delete_initial_widgets" type="checkbox" id="delete_initial_widgets" value="1" <?php if ($opt['delete_initial_widgets'] == 1) echo('checked="checked"'); ?> /> <?php _e('Yes') ?> 
     1365            </td> 
     1366        </tr> 
     1367         
    13461368        <tr> 
    13471369            <th colspan="2"> 
     
    14481470        } 
    14491471 
    1450  
    1451  
    1452  
    1453  
    1454  
    1455  
    1456  
    1457  
    1458  
    1459  
    1460  
    1461        
    1462  
    1463 ?> 
  • wpmu-new-blog-defaults/trunk/readme.txt

    r368842 r631940  
    33Tags: WPMU, Wordpress Mu, Wordpress Multiuser, Blog Defaults, Set Defaults  
    44Requires at least: 3.0 
    5 Tested up to: 3.1 
     5Tested up to: 3.4.2 
    66Stable tag: trunk 
    77 
     
    4949 
    5050== Changelog == 
     51 
     522.2.2 - Minor cleanup and removed some notices 
     53 
    51542.2 - Moved admin page to Network->Settings for 3.1.  Increased required WP Version to 3.0. (stopped support for lower version) 
    5255 
Note: See TracChangeset for help on using the changeset viewer.