Version Description
- Removed rollback functionality
Download this release
Release Info
| Developer | machothemes |
| Plugin | |
| Version | 3.1.6 |
| Comparing to | |
| See all releases | |
Code changes from version 3.1.5 to 3.1.6
- assets/js/rollback.js +0 -11
- fancybox.php +2 -24
- lib/class-fbfw-plugin-rollback.php +0 -71
- lib/class-fbfw-rollback.php +0 -178
- readme.txt +5 -2
assets/js/rollback.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
jQuery(document).ready(function(){
|
| 2 |
-
//rollback function
|
| 3 |
-
jQuery('.fbfw-rollback-button').on('click', function (event) {
|
| 4 |
-
var checkD = confirm('Are you sure you want to reinstall previous version?');
|
| 5 |
-
if( checkD == true ){
|
| 6 |
-
return true;
|
| 7 |
-
} else {
|
| 8 |
-
return false;
|
| 9 |
-
}
|
| 10 |
-
});
|
| 11 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fancybox.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin Name: FancyBox for WordPress
|
| 5 |
Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
|
| 6 |
Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
|
| 7 |
-
Version: 3.1.
|
| 8 |
Author: Colorlib
|
| 9 |
Author URI: https://colorlib.com/wp/
|
| 10 |
|
|
@@ -19,7 +19,7 @@ Author URI: https://colorlib.com/wp/
|
|
| 19 |
* Plugin Init
|
| 20 |
*/
|
| 21 |
// Constants
|
| 22 |
-
define( 'FBFW_VERSION', '3.1.
|
| 23 |
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
|
| 24 |
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
|
| 25 |
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
|
|
@@ -374,23 +374,6 @@ function mfbfw_textdomain() {
|
|
| 374 |
|
| 375 |
add_action( 'init', 'mfbfw_textdomain' );
|
| 376 |
|
| 377 |
-
|
| 378 |
-
/**
|
| 379 |
-
* Insert Rollback link for plugin in plugins page
|
| 380 |
-
*/
|
| 381 |
-
|
| 382 |
-
function extra_settings_links( $links ) {
|
| 383 |
-
|
| 384 |
-
if ( apply_filters( 'fbfw_show_rollback_link', true ) ) {
|
| 385 |
-
$links['rollback'] = sprintf( '<a href="%s" class="fbfw-rollback-button">%s</a>', wp_nonce_url( admin_url( 'admin-post.php?action=fbfw_rollback' ), 'fbfw_rollback' ), __( 'Rollback version', 'mfbfw' ) );
|
| 386 |
-
}
|
| 387 |
-
|
| 388 |
-
return $links;
|
| 389 |
-
}
|
| 390 |
-
|
| 391 |
-
add_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'extra_settings_links' );
|
| 392 |
-
|
| 393 |
-
|
| 394 |
/**
|
| 395 |
* Register options
|
| 396 |
*/
|
|
@@ -449,11 +432,6 @@ function mfbfw_admin_scripts() {
|
|
| 449 |
/**
|
| 450 |
* Settings Button on Plugins Panel
|
| 451 |
*/
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
require FBFW_PATH . '/lib/class-fbfw-plugin-rollback.php';
|
| 455 |
-
require FBFW_PATH . '/lib/class-fbfw-rollback.php';
|
| 456 |
-
|
| 457 |
function mfbfw_plugin_action_links(
|
| 458 |
$links,
|
| 459 |
$file
|
| 4 |
Plugin Name: FancyBox for WordPress
|
| 5 |
Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
|
| 6 |
Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
|
| 7 |
+
Version: 3.1.6
|
| 8 |
Author: Colorlib
|
| 9 |
Author URI: https://colorlib.com/wp/
|
| 10 |
|
| 19 |
* Plugin Init
|
| 20 |
*/
|
| 21 |
// Constants
|
| 22 |
+
define( 'FBFW_VERSION', '3.1.6' );
|
| 23 |
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
|
| 24 |
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
|
| 25 |
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
|
| 374 |
|
| 375 |
add_action( 'init', 'mfbfw_textdomain' );
|
| 376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
/**
|
| 378 |
* Register options
|
| 379 |
*/
|
| 432 |
/**
|
| 433 |
* Settings Button on Plugins Panel
|
| 434 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
function mfbfw_plugin_action_links(
|
| 436 |
$links,
|
| 437 |
$file
|
lib/class-fbfw-plugin-rollback.php
DELETED
|
@@ -1,71 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class FBFW_Plugin_RollBack {
|
| 4 |
-
|
| 5 |
-
public function __construct() {
|
| 6 |
-
|
| 7 |
-
/**
|
| 8 |
-
* $_POST action hook
|
| 9 |
-
*
|
| 10 |
-
* @see: https://codex.wordpress.org/Plugin_API/Action_Reference/admin_post_(action)
|
| 11 |
-
*
|
| 12 |
-
*/
|
| 13 |
-
add_action( 'admin_post_fbfw_rollback', array( $this, 'post_fbfw_rollback' ) );
|
| 14 |
-
|
| 15 |
-
/**
|
| 16 |
-
* Hook responsible for loading our Rollback JS script
|
| 17 |
-
*/
|
| 18 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'rollback_scripts' ) );
|
| 19 |
-
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
/**
|
| 23 |
-
* FBFW version rollback.
|
| 24 |
-
*
|
| 25 |
-
* Rollback to previous {plugin} version.
|
| 26 |
-
*
|
| 27 |
-
* Fired by `admin_post_epfw_rollback` action.
|
| 28 |
-
*
|
| 29 |
-
* @since 1.5.0
|
| 30 |
-
* @access public
|
| 31 |
-
*/
|
| 32 |
-
public function post_fbfw_rollback() {
|
| 33 |
-
|
| 34 |
-
check_admin_referer( 'fbfw_rollback' );
|
| 35 |
-
|
| 36 |
-
$plugin_slug = basename( FBFW_FILE_, '.php' );
|
| 37 |
-
|
| 38 |
-
// check for const defines
|
| 39 |
-
if ( ! defined( 'FBFW_PREVIOUS_PLUGIN_VERSION' ) || ! defined( 'FBFW_PLUGIN_BASE' ) ) {
|
| 40 |
-
wp_die(
|
| 41 |
-
new WP_Error( 'broke', esc_html__( 'Previous plugin version or plugin basename CONST aren\'t defined.', 'epfw' ) )
|
| 42 |
-
);
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
if ( class_exists( 'FBFW_Rollback' ) ) {
|
| 46 |
-
$rollback = new FBFW_Rollback(
|
| 47 |
-
array(
|
| 48 |
-
'version' => FBFW_PREVIOUS_PLUGIN_VERSION,
|
| 49 |
-
'plugin_name' => FBFW_PLUGIN_BASE,
|
| 50 |
-
'plugin_slug' => $plugin_slug,
|
| 51 |
-
'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', PLUGIN_NAME, FBFW_PREVIOUS_PLUGIN_VERSION ),
|
| 52 |
-
)
|
| 53 |
-
);
|
| 54 |
-
$rollback->run();
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
wp_die(
|
| 58 |
-
'', __( 'Rollback to Previous Version', 'mfbfw' ), array(
|
| 59 |
-
'response' => 200,
|
| 60 |
-
)
|
| 61 |
-
);
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
public function rollback_scripts() {
|
| 65 |
-
wp_enqueue_script('rollback-script', FBFW_URL . 'assets/js/rollback.js', FBFW_VERSION); // Load Rollback script
|
| 66 |
-
wp_enqueue_script( 'rollback-script' );
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
new FBFW_Plugin_Rollback();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/class-fbfw-rollback.php
DELETED
|
@@ -1,178 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
| 4 |
-
exit; // Exit if accessed directly.
|
| 5 |
-
}
|
| 6 |
-
|
| 7 |
-
/**
|
| 8 |
-
* EPFW rollback class.
|
| 9 |
-
*
|
| 10 |
-
* EPFW rollback handler class is responsible for rolling back EPFW to
|
| 11 |
-
* previous version.
|
| 12 |
-
*
|
| 13 |
-
* @since 1.0.0
|
| 14 |
-
*/
|
| 15 |
-
class FBFW_Rollback {
|
| 16 |
-
|
| 17 |
-
/**
|
| 18 |
-
* Package URL.
|
| 19 |
-
*
|
| 20 |
-
* Holds the package URL.
|
| 21 |
-
*
|
| 22 |
-
* @since 1.0.0
|
| 23 |
-
* @access protected
|
| 24 |
-
*
|
| 25 |
-
* @var string Package URL.
|
| 26 |
-
*/
|
| 27 |
-
protected $package_url;
|
| 28 |
-
|
| 29 |
-
/**
|
| 30 |
-
* Version.
|
| 31 |
-
*
|
| 32 |
-
* Holds the version.
|
| 33 |
-
*
|
| 34 |
-
* @since 1.0.0
|
| 35 |
-
* @access protected
|
| 36 |
-
*
|
| 37 |
-
* @var string Package URL.
|
| 38 |
-
*/
|
| 39 |
-
protected $version;
|
| 40 |
-
|
| 41 |
-
/**
|
| 42 |
-
* Plugin name.
|
| 43 |
-
*
|
| 44 |
-
* Holds the plugin name.
|
| 45 |
-
*
|
| 46 |
-
* @since 1.0.0
|
| 47 |
-
* @access protected
|
| 48 |
-
*
|
| 49 |
-
* @var string Plugin name.
|
| 50 |
-
*/
|
| 51 |
-
protected $plugin_name;
|
| 52 |
-
|
| 53 |
-
/**
|
| 54 |
-
* Plugin slug.
|
| 55 |
-
*
|
| 56 |
-
* Holds the plugin slug.
|
| 57 |
-
*
|
| 58 |
-
* @since 1.0.0
|
| 59 |
-
* @access protected
|
| 60 |
-
*
|
| 61 |
-
* @var string Plugin slug.
|
| 62 |
-
*/
|
| 63 |
-
protected $plugin_slug;
|
| 64 |
-
|
| 65 |
-
/**
|
| 66 |
-
* Rollback constructor.
|
| 67 |
-
*
|
| 68 |
-
* Initializing EPFW rollback.
|
| 69 |
-
*
|
| 70 |
-
* @since 1.0.0
|
| 71 |
-
* @access public
|
| 72 |
-
*
|
| 73 |
-
* @param array $args Optional. Rollback arguments. Default is an empty array.
|
| 74 |
-
*/
|
| 75 |
-
public function __construct( $args = array() ) {
|
| 76 |
-
foreach ( $args as $key => $value ) {
|
| 77 |
-
$this->{$key} = $value;
|
| 78 |
-
}
|
| 79 |
-
}
|
| 80 |
-
|
| 81 |
-
/**
|
| 82 |
-
* Print inline style.
|
| 83 |
-
*
|
| 84 |
-
* Add an inline CSS to the rollback page.
|
| 85 |
-
*
|
| 86 |
-
* @since 1.0.0
|
| 87 |
-
* @access private
|
| 88 |
-
*/
|
| 89 |
-
private function print_inline_style() {
|
| 90 |
-
?>
|
| 91 |
-
<style>
|
| 92 |
-
.wrap {
|
| 93 |
-
overflow: hidden;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
h1 {
|
| 97 |
-
background: #9b0a46;
|
| 98 |
-
text-align: center;
|
| 99 |
-
color: #fff !important;
|
| 100 |
-
padding: 70px !important;
|
| 101 |
-
text-transform: uppercase;
|
| 102 |
-
letter-spacing: 1px;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
h1 img {
|
| 106 |
-
max-width: 300px;
|
| 107 |
-
display: block;
|
| 108 |
-
margin: auto auto 50px;
|
| 109 |
-
}
|
| 110 |
-
</style>
|
| 111 |
-
<?php
|
| 112 |
-
}
|
| 113 |
-
|
| 114 |
-
/**
|
| 115 |
-
* Apply package.
|
| 116 |
-
*
|
| 117 |
-
* Change the plugin data when WordPress checks for updates. This method
|
| 118 |
-
* modifies package data to update the plugin from a specific URL containing
|
| 119 |
-
* the version package.
|
| 120 |
-
*
|
| 121 |
-
* @since 1.0.0
|
| 122 |
-
* @access protected
|
| 123 |
-
*/
|
| 124 |
-
protected function apply_package() {
|
| 125 |
-
$update_plugins = get_site_transient( 'update_plugins' );
|
| 126 |
-
if ( ! is_object( $update_plugins ) ) {
|
| 127 |
-
$update_plugins = new \stdClass();
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
$plugin_info = new \stdClass();
|
| 131 |
-
$plugin_info->new_version = $this->version;
|
| 132 |
-
$plugin_info->slug = $this->plugin_slug;
|
| 133 |
-
$plugin_info->package = $this->package_url;
|
| 134 |
-
|
| 135 |
-
$update_plugins->response[ $this->plugin_name ] = $plugin_info;
|
| 136 |
-
|
| 137 |
-
set_site_transient( 'update_plugins', $update_plugins );
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
/**
|
| 141 |
-
* Upgrade.
|
| 142 |
-
*
|
| 143 |
-
* Run WordPress upgrade to rollback EPFW to previous version.
|
| 144 |
-
*
|
| 145 |
-
* @since 1.0.0
|
| 146 |
-
* @access protected
|
| 147 |
-
*/
|
| 148 |
-
protected function upgrade() {
|
| 149 |
-
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
| 150 |
-
|
| 151 |
-
$logo_url = FBFW_URL . 'assets/images/icon.jpg';
|
| 152 |
-
|
| 153 |
-
$upgrader_args = array(
|
| 154 |
-
'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ),
|
| 155 |
-
'plugin' => $this->plugin_name,
|
| 156 |
-
'nonce' => 'upgrade-plugin_' . $this->plugin_name,
|
| 157 |
-
'title' => '<img src="' . $logo_url . '" alt="FBFW logo">' . __( 'Rollback to Previous Version', 'epfw' ),
|
| 158 |
-
);
|
| 159 |
-
|
| 160 |
-
$this->print_inline_style();
|
| 161 |
-
|
| 162 |
-
$upgrader = new \Plugin_Upgrader( new \Plugin_Upgrader_Skin( $upgrader_args ) );
|
| 163 |
-
$upgrader->upgrade( $this->plugin_name );
|
| 164 |
-
}
|
| 165 |
-
|
| 166 |
-
/**
|
| 167 |
-
* Run.
|
| 168 |
-
*
|
| 169 |
-
* Rollback EPFW to previous versions.
|
| 170 |
-
*
|
| 171 |
-
* @since 1.0.0
|
| 172 |
-
* @access public
|
| 173 |
-
*/
|
| 174 |
-
public function run() {
|
| 175 |
-
$this->apply_package();
|
| 176 |
-
$this->upgrade();
|
| 177 |
-
}
|
| 178 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: silkalns
|
| 3 |
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
|
| 4 |
Requires at least: 3.4
|
| 5 |
-
Tested up to:
|
| 6 |
-
Stable tag: 3.1.
|
| 7 |
License: GPL/MIT
|
| 8 |
|
| 9 |
Seamlessly integrates FancyBox lightbox into your WordPress blog: Upload, activate, and you're done. Additional configuration optional.
|
|
@@ -31,6 +31,9 @@ If you enjoy using FancyBox lightbox for WordPress please leave a [positive feed
|
|
| 31 |
|
| 32 |
== Changelog ==
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
= 3.1.5 =
|
| 35 |
* Added support for mp4 and webp files
|
| 36 |
|
| 2 |
Contributors: silkalns
|
| 3 |
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
|
| 4 |
Requires at least: 3.4
|
| 5 |
+
Tested up to: 5.0
|
| 6 |
+
Stable tag: 3.1.6
|
| 7 |
License: GPL/MIT
|
| 8 |
|
| 9 |
Seamlessly integrates FancyBox lightbox into your WordPress blog: Upload, activate, and you're done. Additional configuration optional.
|
| 31 |
|
| 32 |
== Changelog ==
|
| 33 |
|
| 34 |
+
= 3.1.6 =
|
| 35 |
+
* Removed rollback functionality
|
| 36 |
+
|
| 37 |
= 3.1.5 =
|
| 38 |
* Added support for mp4 and webp files
|
| 39 |
|
