Plugin Directory

Changeset 3201946


Ignore:
Timestamp:
12/03/2024 08:52:50 PM (15 months ago)
Author:
everpress
Message:

Update to version 3.0.0 from GitHub

Location:
snapshots
Files:
16 added
10 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • snapshots/tags/3.0.0/assets/script.js

    r3201945 r3201946  
    2525        .on('keydown', toggleMenu);
    2626
    27     if (last) {
    28         $('#wp-admin-bar-snapshots > a').append(
    29             '<span class="snapshot-extra-title" title="' +
    30                 sprintf(snapshots.currently, last) +
    31                 '">' +
    32                 last +
    33                 '</span>'
    34         );
    35     }
    3627
    3728    function createSnapshot() {
     
    4435                'snaphot_create=' + encodeURIComponent(snapshotsname)
    4536            );
     37            this.href += '&snapshot_location=' + encodeURIComponent(document.location.pathname+document.location.search+document.location.hash);
    4638            $('#wp-admin-bar-snapshots').addClass('loading create');
    47             localStorage.setItem('snapshot_current', snapshotsname);
    4839        }
    4940
     
    5647            confirm(sprintf(snapshots.restore, $(this).data('date')))
    5748        ) {
    58             localStorage.setItem('snapshot_current', this.innerText);
    5949            $('#wp-admin-bar-snapshots').addClass('loading');
    6050            return true;
     
    111101
    112102    function getLastName() {
    113         return localStorage.getItem('snapshot_current') || '';
     103        return $('#wp-admin-bar-snapshots .snapshot-extra-title').text() || '';
    114104    }
    115105
  • snapshots/tags/3.0.0/assets/style.css

    r3201945 r3201946  
    3535}
    3636#wp-admin-bar-snapshots .search-snapshot input {
     37    all:revert;
    3738    border: 0;
     39    font-size: 16px;
    3840    width: 100%;
    3941    background: none;
  • snapshots/tags/3.0.0/snapshots.php

    r3201945 r3201946  
    55Description:     Quickly Create SnapShots of your development sites and restore them with a click.
    66Author:          EverPress
    7 Author URI:      https://about.me/xaver
     7Author URI:      https://xaver.dev
    88Text Domain:     snapshots
    9 Version:         2.7.0
     9Version:         3.0.0
    1010 */
    1111
     
    4141}
    4242
    43 require_once dirname( __FILE__ ) . '/common.php';
     43require_once __DIR__ . '/includes/common.php';
    4444
    4545if ( defined( 'WP_CLI' ) && WP_CLI ) :
    4646
    47     require_once dirname( __FILE__ ) . '/cli.php';
     47    error_reporting( 0 );
     48
     49    require_once __DIR__ . '/includes/cli.php';
    4850
    4951    WP_CLI::add_command( 'snapshot', 'Snapshots' );
     
    5153else :
    5254
    53     require_once dirname( __FILE__ ) . '/plugin.php';
    54     require_once dirname( __FILE__ ) . '/upgrade.php';
     55    require_once __DIR__ . '/includes/plugin.php';
     56    require_once __DIR__ . '/includes/upgrade.php';
    5557
    5658    Snapshots_Plugin::get_instance();
  • snapshots/trunk/assets/script.js

    r3201945 r3201946  
    2525        .on('keydown', toggleMenu);
    2626
    27     if (last) {
    28         $('#wp-admin-bar-snapshots > a').append(
    29             '<span class="snapshot-extra-title" title="' +
    30                 sprintf(snapshots.currently, last) +
    31                 '">' +
    32                 last +
    33                 '</span>'
    34         );
    35     }
    3627
    3728    function createSnapshot() {
     
    4435                'snaphot_create=' + encodeURIComponent(snapshotsname)
    4536            );
     37            this.href += '&snapshot_location=' + encodeURIComponent(document.location.pathname+document.location.search+document.location.hash);
    4638            $('#wp-admin-bar-snapshots').addClass('loading create');
    47             localStorage.setItem('snapshot_current', snapshotsname);
    4839        }
    4940
     
    5647            confirm(sprintf(snapshots.restore, $(this).data('date')))
    5748        ) {
    58             localStorage.setItem('snapshot_current', this.innerText);
    5949            $('#wp-admin-bar-snapshots').addClass('loading');
    6050            return true;
     
    111101
    112102    function getLastName() {
    113         return localStorage.getItem('snapshot_current') || '';
     103        return $('#wp-admin-bar-snapshots .snapshot-extra-title').text() || '';
    114104    }
    115105
  • snapshots/trunk/assets/style.css

    r3201945 r3201946  
    3535}
    3636#wp-admin-bar-snapshots .search-snapshot input {
     37    all:revert;
    3738    border: 0;
     39    font-size: 16px;
    3840    width: 100%;
    3941    background: none;
  • snapshots/trunk/snapshots.php

    r3201945 r3201946  
    55Description:     Quickly Create SnapShots of your development sites and restore them with a click.
    66Author:          EverPress
    7 Author URI:      https://about.me/xaver
     7Author URI:      https://xaver.dev
    88Text Domain:     snapshots
    9 Version:         2.7.0
     9Version:         3.0.0
    1010 */
    1111
     
    4141}
    4242
    43 require_once dirname( __FILE__ ) . '/common.php';
     43require_once __DIR__ . '/includes/common.php';
    4444
    4545if ( defined( 'WP_CLI' ) && WP_CLI ) :
    4646
    47     require_once dirname( __FILE__ ) . '/cli.php';
     47    error_reporting( 0 );
     48
     49    require_once __DIR__ . '/includes/cli.php';
    4850
    4951    WP_CLI::add_command( 'snapshot', 'Snapshots' );
     
    5153else :
    5254
    53     require_once dirname( __FILE__ ) . '/plugin.php';
    54     require_once dirname( __FILE__ ) . '/upgrade.php';
     55    require_once __DIR__ . '/includes/plugin.php';
     56    require_once __DIR__ . '/includes/upgrade.php';
    5557
    5658    Snapshots_Plugin::get_instance();
Note: See TracChangeset for help on using the changeset viewer.