<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[28496] trunk/src/wp-admin/includes/class-wp-upgrader.php: Add access modifier (`public`) to methods and members of `WP_Upgrader` and its subclasses.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28496">28496</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-05-19 01:28:10 +0000 (Mon, 19 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add access modifier (`public`) to methods and members of `WP_Upgrader` and its subclasses.
See <a href="http://core.trac.wordpress.org/ticket/27881">#27881</a>, <a href="http://core.trac.wordpress.org/ticket/22234">#22234</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasswpupgraderphp">trunk/src/wp-admin/includes/class-wp-upgrader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasswpupgraderphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-upgrader.php (28495 => 28496)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-upgrader.php 2014-05-19 01:22:55 UTC (rev 28495)
+++ trunk/src/wp-admin/includes/class-wp-upgrader.php 2014-05-19 01:28:10 UTC (rev 28496)
</span><span class="lines">@@ -21,23 +21,23 @@
</span><span class="cx"> * @since 2.8.0
</span><span class="cx"> */
</span><span class="cx"> class WP_Upgrader {
</span><del>- var $strings = array();
- var $skin = null;
- var $result = array();
</del><ins>+ public $strings = array();
+ public $skin = null;
+ public $result = array();
</ins><span class="cx">
</span><del>- function __construct($skin = null) {
</del><ins>+ public function __construct($skin = null) {
</ins><span class="cx"> if ( null == $skin )
</span><span class="cx"> $this->skin = new WP_Upgrader_Skin();
</span><span class="cx"> else
</span><span class="cx"> $this->skin = $skin;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function init() {
</del><ins>+ public function init() {
</ins><span class="cx"> $this->skin->set_upgrader($this);
</span><span class="cx"> $this->generic_strings();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function generic_strings() {
</del><ins>+ public function generic_strings() {
</ins><span class="cx"> $this->strings['bad_request'] = __('Invalid Data provided.');
</span><span class="cx"> $this->strings['fs_unavailable'] = __('Could not access filesystem.');
</span><span class="cx"> $this->strings['fs_error'] = __('Filesystem error.');
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> $this->strings['maintenance_end'] = __('Disabling Maintenance mode…');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function fs_connect( $directories = array() ) {
</del><ins>+ public function fs_connect( $directories = array() ) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( false === ($credentials = $this->skin->request_filesystem_credentials()) )
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> } //end fs_connect();
</span><span class="cx">
</span><del>- function download_package($package) {
</del><ins>+ public function download_package($package) {
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Filter whether to return the package.
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> return $download_file;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function unpack_package($package, $delete_package = true) {
</del><ins>+ public function unpack_package($package, $delete_package = true) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> $this->skin->feedback('unpack_package');
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx"> return $working_dir;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function install_package( $args = array() ) {
</del><ins>+ public function install_package( $args = array() ) {
</ins><span class="cx"> global $wp_filesystem, $wp_theme_directories;
</span><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx"> return $this->result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function run( $options ) {
</del><ins>+ public function run( $options ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'package' => '', // Please always pass this.
</span><span class="lines">@@ -441,7 +441,7 @@
</span><span class="cx"> return $result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function maintenance_mode($enable = false) {
</del><ins>+ public function maintenance_mode($enable = false) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx"> $file = $wp_filesystem->abspath() . '.maintenance';
</span><span class="cx"> if ( $enable ) {
</span><span class="lines">@@ -467,10 +467,10 @@
</span><span class="cx"> */
</span><span class="cx"> class Plugin_Upgrader extends WP_Upgrader {
</span><span class="cx">
</span><del>- var $result;
- var $bulk = false;
</del><ins>+ public $result;
+ public $bulk = false;
</ins><span class="cx">
</span><del>- function upgrade_strings() {
</del><ins>+ public function upgrade_strings() {
</ins><span class="cx"> $this->strings['up_to_date'] = __('The plugin is at the latest version.');
</span><span class="cx"> $this->strings['no_package'] = __('Update package not available.');
</span><span class="cx"> $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
</span><span class="lines">@@ -481,7 +481,7 @@
</span><span class="cx"> $this->strings['process_success'] = __('Plugin updated successfully.');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function install_strings() {
</del><ins>+ public function install_strings() {
</ins><span class="cx"> $this->strings['no_package'] = __('Install package not available.');
</span><span class="cx"> $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…');
</span><span class="cx"> $this->strings['unpack_package'] = __('Unpacking the package…');
</span><span class="lines">@@ -491,7 +491,7 @@
</span><span class="cx"> $this->strings['process_success'] = __('Plugin installed successfully.');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function install( $package, $args = array() ) {
</del><ins>+ public function install( $package, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -525,7 +525,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function upgrade( $plugin, $args = array() ) {
</del><ins>+ public function upgrade( $plugin, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -576,7 +576,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function bulk_upgrade( $plugins, $args = array() ) {
</del><ins>+ public function bulk_upgrade( $plugins, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -690,7 +690,7 @@
</span><span class="cx"> return $results;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function check_package($source) {
</del><ins>+ public function check_package($source) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( is_wp_error($source) )
</span><span class="lines">@@ -717,7 +717,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> //return plugin info.
</span><del>- function plugin_info() {
</del><ins>+ public function plugin_info() {
</ins><span class="cx"> if ( ! is_array($this->result) )
</span><span class="cx"> return false;
</span><span class="cx"> if ( empty($this->result['destination_name']) )
</span><span class="lines">@@ -733,7 +733,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> //Hooked to pre_install
</span><del>- function deactivate_plugin_before_upgrade($return, $plugin) {
</del><ins>+ public function deactivate_plugin_before_upgrade($return, $plugin) {
</ins><span class="cx">
</span><span class="cx"> if ( is_wp_error($return) ) //Bypass.
</span><span class="cx"> return $return;
</span><span class="lines">@@ -753,7 +753,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> //Hooked to upgrade_clear_destination
</span><del>- function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
</del><ins>+ public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( is_wp_error($removed) )
</span><span class="lines">@@ -791,10 +791,10 @@
</span><span class="cx"> */
</span><span class="cx"> class Theme_Upgrader extends WP_Upgrader {
</span><span class="cx">
</span><del>- var $result;
- var $bulk = false;
</del><ins>+ public $result;
+ public $bulk = false;
</ins><span class="cx">
</span><del>- function upgrade_strings() {
</del><ins>+ public function upgrade_strings() {
</ins><span class="cx"> $this->strings['up_to_date'] = __('The theme is at the latest version.');
</span><span class="cx"> $this->strings['no_package'] = __('Update package not available.');
</span><span class="cx"> $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
</span><span class="lines">@@ -805,7 +805,7 @@
</span><span class="cx"> $this->strings['process_success'] = __('Theme updated successfully.');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function install_strings() {
</del><ins>+ public function install_strings() {
</ins><span class="cx"> $this->strings['no_package'] = __('Install package not available.');
</span><span class="cx"> $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…');
</span><span class="cx"> $this->strings['unpack_package'] = __('Unpacking the package…');
</span><span class="lines">@@ -825,7 +825,7 @@
</span><span class="cx"> $this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function check_parent_theme_filter($install_result, $hook_extra, $child_result) {
</del><ins>+ public function check_parent_theme_filter($install_result, $hook_extra, $child_result) {
</ins><span class="cx"> // Check to see if we need to install a parent theme
</span><span class="cx"> $theme_info = $this->theme_info();
</span><span class="cx">
</span><span class="lines">@@ -884,12 +884,12 @@
</span><span class="cx"> return $install_result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function hide_activate_preview_actions($actions) {
</del><ins>+ public function hide_activate_preview_actions($actions) {
</ins><span class="cx"> unset($actions['activate'], $actions['preview']);
</span><span class="cx"> return $actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function install( $package, $args = array() ) {
</del><ins>+ public function install( $package, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -925,7 +925,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function upgrade( $theme, $args = array() ) {
</del><ins>+ public function upgrade( $theme, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -975,7 +975,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function bulk_upgrade( $themes, $args = array() ) {
</del><ins>+ public function bulk_upgrade( $themes, $args = array() ) {
</ins><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="cx"> 'clear_update_cache' => true,
</span><span class="lines">@@ -1076,7 +1076,7 @@
</span><span class="cx"> return $results;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function check_package($source) {
</del><ins>+ public function check_package($source) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( is_wp_error($source) )
</span><span class="lines">@@ -1103,7 +1103,7 @@
</span><span class="cx"> return $source;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_before($return, $theme) {
</del><ins>+ public function current_before($return, $theme) {
</ins><span class="cx">
</span><span class="cx"> if ( is_wp_error($return) )
</span><span class="cx"> return $return;
</span><span class="lines">@@ -1119,7 +1119,7 @@
</span><span class="cx"> return $return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function current_after($return, $theme) {
</del><ins>+ public function current_after($return, $theme) {
</ins><span class="cx"> if ( is_wp_error($return) )
</span><span class="cx"> return $return;
</span><span class="cx">
</span><span class="lines">@@ -1141,7 +1141,7 @@
</span><span class="cx"> return $return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
</del><ins>+ public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( is_wp_error( $removed ) )
</span><span class="lines">@@ -1160,7 +1160,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function theme_info($theme = null) {
</del><ins>+ public function theme_info($theme = null) {
</ins><span class="cx">
</span><span class="cx"> if ( empty($theme) ) {
</span><span class="cx"> if ( !empty($this->result['destination_name']) )
</span><span class="lines">@@ -1184,10 +1184,10 @@
</span><span class="cx"> */
</span><span class="cx"> class Language_Pack_Upgrader extends WP_Upgrader {
</span><span class="cx">
</span><del>- var $result;
- var $bulk = true;
</del><ins>+ public $result;
+ public $bulk = true;
</ins><span class="cx">
</span><del>- static function async_upgrade( $upgrader = false ) {
</del><ins>+ public static function async_upgrade( $upgrader = false ) {
</ins><span class="cx"> // Avoid recursion.
</span><span class="cx"> if ( $upgrader && $upgrader instanceof Language_Pack_Upgrader )
</span><span class="cx"> return;
</span><span class="lines">@@ -1205,7 +1205,7 @@
</span><span class="cx"> $lp_upgrader->upgrade();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function upgrade_strings() {
</del><ins>+ public function upgrade_strings() {
</ins><span class="cx"> $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
</span><span class="cx"> $this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case
</span><span class="cx"> $this->strings['no_package'] = __( 'Update package not available.' );
</span><span class="lines">@@ -1215,14 +1215,14 @@
</span><span class="cx"> $this->strings['process_success'] = __( 'Translation updated successfully.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function upgrade( $update = false, $args = array() ) {
</del><ins>+ public function upgrade( $update = false, $args = array() ) {
</ins><span class="cx"> if ( $update )
</span><span class="cx"> $update = array( $update );
</span><span class="cx"> $results = $this->bulk_upgrade( $update, $args );
</span><span class="cx"> return $results[0];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function bulk_upgrade( $language_updates = array(), $args = array() ) {
</del><ins>+ public function bulk_upgrade( $language_updates = array(), $args = array() ) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> $defaults = array(
</span><span class="lines">@@ -1323,7 +1323,7 @@
</span><span class="cx"> return $results;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function check_package( $source, $remote_source ) {
</del><ins>+ public function check_package( $source, $remote_source ) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> if ( is_wp_error( $source ) )
</span><span class="lines">@@ -1348,7 +1348,7 @@
</span><span class="cx"> return $source;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function get_name_for_update( $update ) {
</del><ins>+ public function get_name_for_update( $update ) {
</ins><span class="cx"> switch ( $update->type ) {
</span><span class="cx"> case 'core':
</span><span class="cx"> return 'WordPress'; // Not translated
</span><span class="lines">@@ -1379,7 +1379,7 @@
</span><span class="cx"> */
</span><span class="cx"> class Core_Upgrader extends WP_Upgrader {
</span><span class="cx">
</span><del>- function upgrade_strings() {
</del><ins>+ public function upgrade_strings() {
</ins><span class="cx"> $this->strings['up_to_date'] = __('WordPress is at the latest version.');
</span><span class="cx"> $this->strings['no_package'] = __('Update package not available.');
</span><span class="cx"> $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
</span><span class="lines">@@ -1390,7 +1390,7 @@
</span><span class="cx"> $this->strings['rollback_was_required'] = __( 'Due to an error during updating, WordPress has rolled back to your previous version.' );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function upgrade( $current, $args = array() ) {
</del><ins>+ public function upgrade( $current, $args = array() ) {
</ins><span class="cx"> global $wp_filesystem;
</span><span class="cx">
</span><span class="cx"> include( ABSPATH . WPINC . '/version.php' ); // $wp_version;
</span><span class="lines">@@ -1536,7 +1536,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Determines if this WordPress Core version should update to $offered_ver or not
</span><del>- static function should_update_to_version( $offered_ver /* x.y.z */ ) {
</del><ins>+ public static function should_update_to_version( $offered_ver /* x.y.z */ ) {
</ins><span class="cx"> include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z
</span><span class="cx">
</span><span class="cx"> $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y
</span><span class="lines">@@ -1634,7 +1634,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function check_files() {
</del><ins>+ public function check_files() {
</ins><span class="cx"> global $wp_version, $wp_local_package;
</span><span class="cx">
</span><span class="cx"> $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
</span><span class="lines">@@ -1662,11 +1662,11 @@
</span><span class="cx"> * @since 2.8.0
</span><span class="cx"> */
</span><span class="cx"> class File_Upload_Upgrader {
</span><del>- var $package;
- var $filename;
- var $id = 0;
</del><ins>+ public $package;
+ public $filename;
+ public $id = 0;
</ins><span class="cx">
</span><del>- function __construct($form, $urlholder) {
</del><ins>+ public function __construct($form, $urlholder) {
</ins><span class="cx">
</span><span class="cx"> if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
</span><span class="cx"> wp_die(__('Please select a file'));
</span><span class="lines">@@ -1717,7 +1717,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function cleanup() {
</del><ins>+ public function cleanup() {
</ins><span class="cx"> if ( $this->id )
</span><span class="cx"> wp_delete_attachment( $this->id );
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>