Plugin Directory

Changeset 3201945


Ignore:
Timestamp:
12/03/2024 08:51:37 PM (13 months ago)
Author:
everpress
Message:

fix WordPress Repo

Location:
snapshots
Files:
5 added
4 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • snapshots/trunk/assets/script.js

    r3025636 r3201945  
    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    }
    2736
    2837    function createSnapshot() {
     
    3544                'snaphot_create=' + encodeURIComponent(snapshotsname)
    3645            );
    37             this.href += '&snapshot_location=' + encodeURIComponent(document.location.pathname+document.location.search+document.location.hash);
    3846            $('#wp-admin-bar-snapshots').addClass('loading create');
     47            localStorage.setItem('snapshot_current', snapshotsname);
    3948        }
    4049
     
    4756            confirm(sprintf(snapshots.restore, $(this).data('date')))
    4857        ) {
     58            localStorage.setItem('snapshot_current', this.innerText);
    4959            $('#wp-admin-bar-snapshots').addClass('loading');
    5060            return true;
     
    101111
    102112    function getLastName() {
    103         return $('#wp-admin-bar-snapshots .snapshot-extra-title').text() || '';
     113        return localStorage.getItem('snapshot_current') || '';
    104114    }
    105115
  • snapshots/trunk/assets/style.css

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

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