WordPress.org

Plugin Directory

Changeset 639843


Ignore:
Timestamp:
12/16/12 00:13:47 (16 months ago)
Author:
wpmuguru
Message:

fix deprecated warnings & add translation support, release 2.9

Location:
advanced-export-for-wp-wpmu/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • advanced-export-for-wp-wpmu/trunk/ra-export.php

    r161078 r639843  
    11<?php 
    22/* 
    3 Plugin Name: Advanced Export for WordPress & WordPress MU  
     3Plugin Name: Advanced Export 
    44Plugin URI: http://wpmututorials.com/plugins/advanced-export/ 
    55Description: Adds an Advanced Export to the Tools menu which allows selective exporting of pages, posts, specific categories and/or post statuses by date. 
    6 Version: 2.8.3 
     6Version: 2.9 
    77Author: Ron Rennick 
    88Author URI: http://ronandandrea.com/ 
     
    3535        $author = isset($_GET['author']) ? $_GET['author'] : 'all'; 
    3636        $category = isset($_GET['category']) ? $_GET['category'] : 'all'; 
    37         $post_type = isset($_GET['post_type']) ? wp_specialchars($_GET['post_type']) : 'all'; 
    38         $status = isset($_GET['status']) ? wp_specialchars($_GET['status']) : 'all'; 
     37        $post_type = isset($_GET['post_type']) ? stripslashes($_GET['post_type']) : 'all'; 
     38        $status = isset($_GET['status']) ? stripslashes($_GET['status']) : 'all'; 
    3939        $mm_start = isset($_GET['mm_start']) ? $_GET['mm_start'] : 'all'; 
    4040        $mm_end = isset($_GET['mm_end']) ? $_GET['mm_end'] : 'all'; 
    4141        $aa_start = isset($_GET['aa_start']) ? intval($_GET['aa_start']) : 0; 
    4242        $aa_end = isset($_GET['aa_end']) ? intval($_GET['aa_end']) : 0; 
    43         $terms = isset($_GET['terms']) ? wp_specialchars($_GET['terms']) : 'all'; 
     43        $terms = isset($_GET['terms']) ? stripslashes($_GET['terms']) : 'all'; 
    4444        if($mm_start != 'all' && $aa_start > 0) { 
    4545            $start_date = sprintf( "%04d-%02d-%02d", $aa_start, $mm_start, 1 ); 
     
    246246function ra_export_page() { 
    247247    global $wpdb, $wp_locale;  
    248     if(!current_user_can('edit_files')) { 
     248 
     249    if ( ! current_user_can( 'edit_files' ) ) 
    249250        die( 'You don\'t have permissions to use this page.' ); 
    250     }  
     251 
     252    load_plugin_textdomain( 'ra-export', false, '/advanced-export-for-wp-wpmu/languages/' ); 
     253 
    251254    $months = ""; 
    252255    for ( $i = 1; $i < 13; $i++ ) { 
     
    256259<div class="wrap"> 
    257260<?php screen_icon(); ?> 
    258 <h2><?php echo wp_specialchars( $title ); ?></h2> 
    259  
    260 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 
    261 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p> 
    262 <p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 
     261<h2><?php esc_html_e( 'Advanced Export', 'ra-export' ); ?></h2> 
     262 
     263<p><?php esc_html_e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 
     264<p><?php esc_html_e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p> 
     265<p><?php esc_html_e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 
    263266<form action="" method="get"> 
    264267<input type="hidden" name="page" value="ra_export" /> 
    265 <h3><?php _e('Options'); ?></h3> 
     268<h3><?php esc_html_e('Options', 'ra-export' ); ?></h3> 
    266269 
    267270<table class="form-table"> 
    268271<tr> 
    269 <th><label for="mm_start"><?php _e('Restrict Date'); ?></label></th> 
    270 <td><strong><?php _e('Start:'); ?></strong> <?php _e('Month'); ?>&nbsp; 
     272<th><label for="mm_start"><?php esc_html_e('Restrict Date', 'ra-export' ); ?></label></th> 
     273<td><strong><?php esc_html_e('Start:', 'ra-export' ); ?></strong> <?php esc_html_e('Month', 'ra-export' ); ?>&nbsp; 
    271274<select name="mm_start" id="mm_start"> 
    272 <option value="all" selected="selected"><?php _e('All Dates'); ?></option> 
     275<option value="all" selected="selected"><?php esc_html_e('All Dates', 'ra-export' ); ?></option> 
    273276<?php echo $months; ?> 
    274 </select>&nbsp;<?php _e('Year'); ?>&nbsp; 
     277</select>&nbsp;<?php esc_html_e('Year', 'ra-export' ); ?>&nbsp; 
    275278<input type="text" id="aa_start" name="aa_start" value="" size="4" maxlength="5" /> 
    276279</td> 
    277 <td><strong><?php _e('End:'); ?></strong> <?php _e('Month'); ?>&nbsp; 
     280<td><strong><?php esc_html_e('End:', 'ra-export' ); ?></strong> <?php esc_html_e('Month', 'ra-export' ); ?>&nbsp; 
    278281<select name="mm_end" id="mm_end"> 
    279 <option value="all" selected="selected"><?php _e('All Dates'); ?></option> 
     282<option value="all" selected="selected"><?php esc_html_e('All Dates', 'ra-export' ); ?></option> 
    280283<?php echo $months; ?> 
    281 </select>&nbsp;<?php _e('Year'); ?>&nbsp; 
     284</select>&nbsp;<?php esc_html_e('Year', 'ra-export' ); ?>&nbsp; 
    282285<input type="text" id="aa_end" name="aa_end" value="" size="4" maxlength="5" /> 
    283286</td> 
    284287</tr> 
    285288<tr> 
    286 <th><label for="author"><?php _e('Restrict Author'); ?></label></th> 
     289<th><label for="author"><?php esc_html_e('Restrict Author', 'ra-export' ); ?></label></th> 
    287290<td> 
    288291<select name="author" id="author"> 
    289 <option value="all" selected="selected"><?php _e('All Authors'); ?></option> 
     292<option value="all" selected="selected"><?php esc_html_e('All Authors', 'ra-export' ); ?></option> 
    290293<?php 
    291294$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" ); 
     
    300303<?php if(version_compare($wpdb->db_version(), '4.1', 'ge')) { ?> 
    301304<tr> 
    302 <th><label for="category"><?php _e('Restrict Category'); ?></label></th> 
     305<th><label for="category"><?php esc_html_e('Restrict Category', 'ra-export' ); ?></label></th> 
    303306<td> 
    304307<select name="category" id="category"> 
    305 <option value="all" selected="selected"><?php _e('All Categories'); ?></option> 
     308<option value="all" selected="selected"><?php esc_html_e('All Categories', 'ra-export' ); ?></option> 
    306309<?php 
    307310$categories = (array) get_categories('get=all'); 
     
    317320<?php } ?> 
    318321<tr> 
    319 <th><label for="post_type"><?php _e('Restrict Content'); ?></label></th> 
     322<th><label for="post_type"><?php  esc_html_e('Restrict Content', 'ra-export' ); ?></label></th> 
    320323<td> 
    321324<select name="post_type" id="post_type"> 
    322 <option value="all" selected="selected"><?php _e('All Content'); ?></option> 
    323 <option value="page"><?php _e('Pages'); ?></option> 
    324 <option value="post"><?php _e('Posts'); ?></option> 
     325<option value="all" selected="selected"><?php esc_html_e('All Content', 'ra-export' ); ?></option> 
     326<option value="page"><?php esc_html_e('Pages', 'ra-export' ); ?></option> 
     327<option value="post"><?php esc_html_e('Posts', 'ra-export' ); ?></option> 
    325328</select> 
    326329</td> 
    327330</tr> 
    328331<tr> 
    329 <th><label for="status"><?php _e('Restrict Status'); ?></label></th> 
     332<th><label for="status"><?php esc_html_e('Restrict Status', 'ra-export' ); ?></label></th> 
    330333<td> 
    331334<select name="status" id="status"> 
    332 <option value="all" selected="selected"><?php _e('All Statuses'); ?></option> 
    333 <option value="draft"><?php _e('Draft'); ?></option> 
    334 <option value="private"><?php _e('Privately published'); ?></option> 
    335 <option value="publish"><?php _e('Published'); ?></option> 
    336 <option value="future"><?php _e('Scheduled'); ?></option> 
     335<option value="all" selected="selected"><?php esc_html_e('All Statuses', 'ra-export' ); ?></option> 
     336<option value="draft"><?php esc_html_e('Draft', 'ra-export' ); ?></option> 
     337<option value="private"><?php esc_html_e('Privately published', 'ra-export' ); ?></option> 
     338<option value="publish"><?php esc_html_e('Published', 'ra-export' ); ?></option> 
     339<option value="future"><?php esc_html_e('Scheduled', 'ra-export' ); ?></option> 
    337340</select> 
    338341</td> 
    339342</tr> 
    340343<tr> 
    341 <th><label for="terms"><?php _e('Include Blog Tag/Category Terms'); ?></label></th> 
     344<th><label for="terms"><?php esc_html_e('Include Blog Tag/Category Terms', 'ra-export' ); ?></label></th> 
    342345<td> 
    343346<select name="terms" id="terms"> 
    344 <option value="all" selected="selected"><?php _e('All Terms'); ?></option> 
    345 <option value="cats"><?php _e('Categories'); ?></option> 
    346 <option value="tags"><?php _e('Tags'); ?></option> 
    347 <option value="none"><?php _e('None'); ?></option> 
     347<option value="all" selected="selected"><?php esc_html_e('All Terms', 'ra-export' ); ?></option> 
     348<option value="cats"><?php esc_html_e('Categories', 'ra-export' ); ?></option> 
     349<option value="tags"><?php esc_html_e('Tags', 'ra-export' ); ?></option> 
     350<option value="none"><?php esc_html_e('None', 'ra-export' ); ?></option> 
    348351</select> 
    349352</td> 
    350353</tr> 
    351354</table> 
    352 <p class="submit"><input type="submit" name="submit" class="button" value="<?php _e('Download Export File'); ?>" /> 
     355<p class="submit"><input type="submit" name="submit" class="button" value="<?php esc_html_e('Download Export File', 'ra-export' ); ?>" /> 
    353356<input type="hidden" name="download" value="true" /> 
    354357</p> 
     
    358361} 
    359362function ra_add_export_page() { 
    360     add_management_page('Advanced Export', 'Advanced Export', 10, 'ra_export', 'ra_export_page'); 
     363    add_management_page('Advanced Export', 'Advanced Export', 'manage_options', 'ra_export', 'ra_export_page'); 
    361364} 
    362365add_action('admin_menu', 'ra_add_export_page'); 
  • advanced-export-for-wp-wpmu/trunk/readme.txt

    r424381 r639843  
    11=== Advanced Export for WP & WPMU === 
    22Contributors: wpmuguru 
    3 Tags: export, plugin, wordpress, wpmu  
     3Tags: export, wordpress, wpmu, multisite  
    44Requires at least: 2.7 
    5 Tested up to: 2.9.2 
     5Tested up to: 3.5 
    66Stable tag: trunk 
    77 
     
    2929Support can be obtained through: 
    3030 
    31 [Try the Wordpress Forums first](http://wordpress.org/tags/advanced-export-for-wp-wpmu?forum_id=10#postform) 
    32  
    33 [Twitter](http://twitter.com/wpmuguru) 
    34  
    35 [WPMU Tutorials](http://wpmututorials.com/contact/) 
    36  
    37 [Ron and Andrea](http://ronandandrea.com/contact/) 
     31[WordPress Forums](http://wordpress.org/tags/advanced-export-for-wp-wpmu?forum_id=10#postform) 
    3832 
    3933== Installation == 
    4034 
    41 1. Upload `ra-export.php` to the `/wp-content/plugins/` directory 
     351. Upload the `advanced-export-for-wp-wpmu` folder to the `/wp-content/plugins/` directory 
    42361. Activate the plugin through the 'Plugins' menu in WordPress 
    43371. Go to Tools -> Advanced Export 
    4438 
    4539== Changelog == 
     40 
     41= 2.9 = 
     42* Fix deprecated warnings 
     43* Add translation support 
    4644 
    4745= 2.8.3 = 
Note: See TracChangeset for help on using the changeset viewer.