WordPress.org

Plugin Directory

Changeset 444976


Ignore:
Timestamp:
09/28/11 20:49:58 (3 years ago)
Author:
MrWiblog
Message:

0.4 Updated menu position, and added Network capability

Location:
sitewide-newsletter/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sitewide-newsletter/trunk/newsletter.php

    r255303 r444976  
    33Plugin Name: Sitewide newsletters 
    44Description: Allows site administrators to send a newsletter to all users 
    5 Version: 0.3.2 
     5Version: 0.4 
    66Author: Chris Taylor 
    77Author URI: http://www.stillbreathing.co.uk 
     
    99*/ 
    1010// when the admin menu is built 
    11 add_action('admin_menu', 'sitewide_newsletters_add_admin'); 
     11if (defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE) { 
     12    add_action('network_admin_menu', 'sitewide_newsletters_add_admin'); 
     13} else { 
     14    add_action('admin_menu', 'sitewide_newsletters_add_admin'); 
     15} 
    1216 
    1317// add the admin newsletters button 
    1418function sitewide_newsletters_add_admin() { 
    1519    global $current_user; 
    16     if (version_compare(get_bloginfo('version'), "3") >= 0) { 
    17         add_submenu_page('ms-admin.php', 'Sitewide newsletters', 'Sitewide newsletters', 'edit_users', 'sitewide_newsletters', 'sitewide_newsletters'); 
    18     } else { 
    19         add_submenu_page('wpmu-admin.php', 'Sitewide newsletters', 'Sitewide newsletters', 'edit_users', 'sitewide_newsletters', 'sitewide_newsletters'); 
    20     } 
     20    add_submenu_page('users.php', 'Sitewide newsletters', 'Sitewide newsletters', 'edit_users', 'sitewide_newsletters', 'sitewide_newsletters'); 
    2121} 
    2222 
     
    2828     
    2929    $message = ""; 
    30      
    31     $wpmums = "wpmu"; 
    32     if (version_compare(get_bloginfo('version'), "3") >= 0) { 
    33             $wpmums = "ms"; 
    34     } 
    35      
     30 
    3631    // if sending a newsletter 
    3732    if ( @$_POST["newsletter"] != "" && @$_POST["subject"] != "" && @$_POST["fromname"] != "" && @$_POST["fromemail"] != "" ) 
     
    117112    <p>Enter your newsletter below which will be emailed to ' . $users . ' users.</p> 
    118113     
    119     <form action="'.$wpmums.'-admin.php?page=sitewide_newsletters" method="post"> 
     114    <form action="users.php?page=sitewide_newsletters" method="post"> 
    120115     
    121116        <fieldset> 
  • sitewide-newsletter/trunk/readme.txt

    r255303 r444976  
    44Tags: wordpress mu, buddypress, personal, welcome, email, message, greet 
    55Requires at least: 2.7 
    6 Tested up to: 3 
    7 Stable tag: 0.3.2 
     6Tested up to: 3.2 
     7Stable tag: 0.4 
    88 
    99Sitewide Newsletters is a Wordpress MU plugin that allows site administrators to send an email message to all users. 
     
    3535== Changelog == 
    3636 
     370.4 Updated menu position, and added Network capability 
    37380.3.2 Compatibility with WP 3.0, several small bugfixes 
    38390.3.1 Updated plugin URI 
Note: See TracChangeset for help on using the changeset viewer.