Changeset 1188388
- Timestamp:
- 06/26/2015 11:16:50 PM (9 years ago)
- Location:
- wp-rollback/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-rollback/trunk/assets/js/themes-wp-rollback.js
r1159162 r1188388 96 96 97 97 98 var rollback_btn_html = '<a href="' + encodeURI( 'index.php?page=wp-rollback&type=theme&theme_file=' + theme + '¤t_version=' + theme_data.version + '&rollback_name=' + theme_data.name + ' ') + '" style="position:absolute;right: ' + (active_theme === true ? '5px' : '80px') + '; bottom: 5px;" class="button wpr-theme-rollback">' + wpr_vars.text_rollback_label + '</a>';98 var rollback_btn_html = '<a href="' + encodeURI( 'index.php?page=wp-rollback&type=theme&theme_file=' + theme + '¤t_version=' + theme_data.version + '&rollback_name=' + theme_data.name + ' ) + '" style="position:absolute;right: ' + (active_theme === true ? '5px' : '80px') + '; bottom: 5px;" class="button wpr-theme-rollback">' + wpr_vars.text_rollback_label + '</a>'; 99 99 100 100 $( '.theme-wrap' ).find( '.theme-actions' ).append( rollback_btn_html ); -
wp-rollback/trunk/includes/rollback-action.php
r1159162 r1188388 10 10 11 11 $nonce = 'upgrade-plugin_' . $this->plugin_slug; 12 $url = 'index.php?page=wp-rollback&plugin_file=' . $args['plugin_file']. 'action=upgrade-plugin';12 $url = 'index.php?page=wp-rollback&plugin_file=' . . 'action=upgrade-plugin'; 13 13 $plugin = $this->plugin_slug; 14 14 $version = $args['plugin_version']; 15 15 16 16 //Theme rollback 17 if ( isset( $_GET['theme_file'] )) {17 if ( ) { 18 18 19 19 //theme specific vars … … 27 27 $upgrader->rollback( $_GET['theme_file'] ); 28 28 29 } elseif ( isset($_GET['plugin_file'] ) ) {29 } elseif ( $_GET['plugin_file'] ) ) { 30 30 //This is a plugin rollback 31 31 $upgrader = new WP_Rollback_Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin', 'version' ) ) ); -
wp-rollback/trunk/includes/rollback-menu.php
r1160921 r1188388 23 23 <h2><img src="<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-icon-final.svg" onerror="this.onerror=null; this.src='<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-logo.png'"><?php _e( 'WP Rollback', 'wpr' ); ?></h2> 24 24 25 <p><?php echo apply_filters( 'wpr_rollback_description', sprintf( __( 'Please select which %1$s version you would like to rollback to from the releases listed below. You currently have version %2$s installed of %3$s.', 'wpr' ), '<span class="type">' . ( $theme_rollback == true ? 'theme' : 'plugin' ) . '</span>', '<span class="current-version">' . $args['current_version'] . '</span>', '<span class="rollback-name">' . $args['rollback_name']. '</span>' ) ); ?></p>25 <p><?php echo apply_filters( 'wpr_rollback_description', sprintf( __( 'Please select which %1$s version you would like to rollback to from the releases listed below. You currently have version %2$s installed of %3$s.', 'wpr' ), '<span class="type">' . ( $theme_rollback == true ? 'theme' : 'plugin' ) . '</span>', '<span class="current-version">' . . '</span>' ) ); ?></p> 26 26 27 27 </div> … … 69 69 //Important: We need the appropriate file to perform a rollback 70 70 if ( $plugin_rollback == true ) { ?> 71 <input type="hidden" name="plugin_file" value="<?php echo $args['plugin_file']; ?>">71 <input type="hidden" name="plugin_file" value="<?php echo ; ?>"> 72 72 <?php } else { ?> 73 <input type="hidden" name="theme_file" value="<?php echo $_GET['theme_file']; ?>">73 <input type="hidden" name="theme_file" value="<?php echo ; ?>"> 74 74 <?php } ?> 75 <input type="hidden" name="rollback_name" value="<?php echo $args['rollback_name']; ?>"> 76 <input type="hidden" name="installed_version" value="<?php echo $args['current_version']; ?>"> 75 <input type="hidden" name="rollback_name" value="<?php echo esc_attr( $args['rollback_name'] ); ?>"> 76 <input type="hidden" name="installed_version" value="<?php echo esc_attr( $args['current_version'] ); ?>"> 77 <?php wp_nonce_field( 'wpr_rollback_nonce' ); ?> 77 78 78 79 -
wp-rollback/trunk/readme.txt
r1167290 r1188388 5 5 Donate Link: https://wordimpress.com 6 6 Tested up to: 4.2.2 7 Stable tag: 1.2. 27 Stable tag: 1.2. 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 110 110 == Changelog == 111 111 112 113 114 115 112 116 = 1.2.2 = 113 117 * New: Russian translations from @Flector - thanks! -
wp-rollback/trunk/wp-rollback.php
r1167290 r1188388 6 6 * Author: WordImpress 7 7 * Author URI: http://wordimpress.com 8 * Version: 1.2. 28 * Version: 1.2. 9 9 * Text Domain: wpr 10 10 * Domain Path: languages … … 204 204 'ajaxurl' => admin_url(), 205 205 'ajax_loader' => admin_url( 'images/spinner.gif' ), 206 206 207 'text_rollback_label' => __( 'Rollback', 'wpr' ), 207 208 'text_not_rollbackable' => __( 'No Rollback Available: This is a non-WordPress.org theme.', 'wpr' ), … … 291 292 if ( ! empty( $args['plugin_version'] ) ) { 292 293 //Plugin: rolling back 294 295 293 296 include WP_ROLLBACK_PLUGIN_DIR . '/includes/class-rollback-plugin-upgrader.php'; 294 297 include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-action.php'; 295 298 } elseif ( ! empty( $args['theme_version'] ) ) { 296 299 //Theme: rolling back 300 301 297 302 include WP_ROLLBACK_PLUGIN_DIR . '/includes/class-rollback-theme-upgrader.php'; 298 303 include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-action.php'; 299 304 } else { 300 305 //This is the menu 306 307 301 308 include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-menu.php'; 302 309 } … … 391 398 foreach ( $this->versions as $version ) { 392 399 393 $versions_html .= '<label><input type="radio" value="' . $version. '" name="' . $type . '_version">' . $version;400 $versions_html .= '<label><input type="radio" value="' . . '" name="' . $type . '_version">' . $version; 394 401 395 402 //Is this the current version? … … 425 432 426 433 $plugin_file = WP_PLUGIN_DIR . '/' . $_GET['plugin_file']; 434 435 436 427 437 428 438 $plugin_data = get_plugin_data( $plugin_file, false, false ); … … 504 514 'current_version' => urlencode( $plugin_data['Version'] ), 505 515 'rollback_name' => urlencode( $plugin_data['Name'] ), 516 506 517 ) ), $rollback_url ); 507 518 }
Note: See TracChangeset
for help on using the changeset viewer.