Commit c40bae5d authored by lucha's avatar lucha

Nextgen-gallery 2.1.79

parent 1ca43d9e
NextGEN Gallery
by Imagely
= V2.1.79 - 02.23.2017 =
* Changed: Tag display adjustment
= V2.1.77 - 01.31.2017 =
* Changed: Corrected Facebook link
* Changed: Tags in readme.txt
* Fixed: Problem with deactivating other plugin
= V2.1.69 - 01.18.2017 =
* Fixed: Ensured compatibility with WordPress 4.7.1
* Fixed: Missing option names on setting pages when Wizard active
* Fixed: Ensure that NextGEN Gallery is always loaded after it's extension plugins in WP 4.7
* Fixed: Pope product uninstaller not running during activation
= V2.1.62 - 12.15.2016 =
* Fixed: Typo in notice for launching the gallery wizard
* Fixed: The ability to dismiss the gallery wizard notice
......
{
"name": "imagely/nextgen-gallery",
"description": "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 12 million downloads.",
"description": "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16.5 million downloads.",
"keywords": ["nextgen", "nextgen gallery", "gallery", "galleries", "image", "images", "image gallery", "photo", "photos", "photo gallery", "picture", "pictures", "picture gallery", "album", "albums", "photo albums", "image album", "media", "media gallery", "thumbnails", "thumbnail gallery", "thumbnail galleries", "slideshow", "slideshows", "slideshow gallery", "slideshow galleries", "fancybox", "lightbox", "responsive", "responsive gallery", "responsive galleries", "singlepic", "watermarks", "watermarking", "photography", "photographer"],
"homepage": "https://www.imagely.com/",
"license": "GPLv2",
......
......@@ -3,8 +3,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
/**
* Plugin Name: NextGEN Gallery
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16 million downloads.
* Version: 2.1.62
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16.5 million downloads.
* Version: 2.1.79
* Author: Imagely
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
* Author URI: https://www.imagely.com
......@@ -160,7 +160,7 @@ class C_NextGEN_Bootstrap
function is_activating()
{
$retval = strpos($_SERVER['REQUEST_URI'], 'plugins.php') !== FALSE && isset($_REQUEST['action']) && $_REQUEST['action'] == 'activate';
$retval = strpos($_SERVER['REQUEST_URI'], 'plugins.php') !== FALSE && isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('activate', 'activate-selected'));
if (!$retval && strpos($_SERVER['REQUEST_URI'], 'update.php') !== FALSE && isset($_REQUEST['action']) && $_REQUEST['action'] == 'install-plugin' && isset($_REQUEST['plugin']) && strpos($_REQUEST['plugin'], 'nextgen-gallery') === 0) {
$retval = TRUE;
......@@ -170,11 +170,6 @@ class C_NextGEN_Bootstrap
$retval = TRUE;
}
// Omitted for now; this was merged at the wrong time
/* if (!$retval && isset($_REQUEST['tgmpa-activate']) && $_REQUEST['tgmpa-activate'] == 'activate-plugin' && isset($_REQUEST['plugin']) && strtolower($_REQUEST['plugin']) == 'nextgen-gallery') {
$retval = TRUE;
} */
return $retval;
}
......@@ -209,6 +204,41 @@ class C_NextGEN_Bootstrap
C_NextGen_Shortcode_Manager::get_instance();
}
function fix_loading_order()
{
// If a plugin wasn't activated/deactivated siliently, we can listen for these things
if (did_action('activate_plugin') || did_action('deactivate_plugin')) return;
else if (strpos($_SERVER['REQUEST_URI'], 'plugins') !== FALSE) return;
$plugins = get_option('active_plugins');
// Remove NGG from the list
$ngg = basename(dirname(__FILE__)).'/'.basename(__FILE__);
$order = array();
foreach ($plugins as $plugin) {
if ($plugin != $ngg) $order[] = $plugin;
}
// Get the position of either NGG Pro or NGG Plus
$insert_at = FALSE;
for($i=0; $i<count($order); $i++) {
$plugin = $order[$i];
if (strpos($plugin, 'nggallery-pro') !== FALSE) $insert_at = $i+1;
else if (strpos($plugin, 'ngg-plus') !== FALSE) $insert_at = $i+1;
}
// Re-insert NGG after Pro or Plus
if ($insert_at === FALSE || $insert_at === count($order)) $order[] = $ngg;
elseif ($insert_at === 0) array_unshift($order, $ngg);
else array_splice($order, $insert_at, 0, array($ngg));
if ($order != $plugins) {
$order = array_filter($order);
update_option('active_plugins', $order);
}
}
/**
* Loads the Pope Framework
*/
......@@ -367,6 +397,9 @@ class C_NextGEN_Bootstrap
// Flush pope cache
add_action('init', array(&$this, 'flush_pope_cache'));
// NGG extension plugins should be loaded in a specific order
add_action('shutdown', array(&$this, 'fix_loading_order'));
// Display a warning if an compatible version of NextGEN Pro is installed alongside this
// version of NextGEN Gallery
if ($this->is_pro_incompatible()) {
......@@ -578,6 +611,8 @@ class C_NextGEN_Bootstrap
*/
static function deactivate()
{
include_once('products/photocrati_nextgen/class.nextgen_product_installer.php');
C_Photocrati_Installer::add_handler(NGG_PLUGIN_BASENAME, 'C_NextGen_Product_Installer');
C_Photocrati_Installer::uninstall(NGG_PLUGIN_BASENAME);
}
......@@ -596,7 +631,7 @@ class C_NextGEN_Bootstrap
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
define('NGG_PLUGIN_STARTED_AT', microtime());
define('NGG_PLUGIN_VERSION', '2.1.62');
define('NGG_PLUGIN_VERSION', '2.1.79');
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
......
<?php
if (!defined('POPE_VERSION')) {
define('POPE_VERSION', '0.12');
define('POPE_VERSION', '0.13');
require_once('class.pope_cache.php');
require_once('class.extensibleobject.php');
require_once('interface.component.php');
......
......@@ -787,42 +787,45 @@ class C_Component_Registry
{
$retval = array();
static $recursive_level = 0;
static $exclusions = array('..', '.', 'error_log', 'README', 'CHANGELOG', 'readme.txt', 'changelog.txt');
$recursive_level++;
$abspath = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $abspath);
$contents = @scandir($abspath);
if ($contents) foreach ($contents as $filename) {
if ($filename == '.' || $filename == '..' || $filename == 'error_log') continue;
$filename_abspath = $abspath.DIRECTORY_SEPARATOR.$filename;
// Is this a subdirectory?
// We don't use is_dir(), as it's less efficient than just checking for a 'dot' in the filename.
// The problem is that we're assuming that our directories won't contain a 'dot'.
if ($recursive && strpos($filename, '.') === FALSE) {
// The recursive parameter can either be set to TRUE or the number of levels to navigate
// If we reach the max number of recursive levels we're supported to navigate, then we try
// to guess if there's a module or product file under the directory with the same name as
// the directory
if ($recursive === TRUE || (is_int($recursive) && $recursive_level <= $recursive)) {
$retval = array_merge($retval, $this->find_product_and_module_files($filename_abspath, $recursive));
}
if (!in_array($abspath, $exclusions)) {
$contents = @scandir($abspath);
if ($contents) foreach ($contents as $filename) {
if (in_array($filename, $exclusions)) continue;
$filename_abspath = $abspath.DIRECTORY_SEPARATOR.$filename;
// Is this a subdirectory?
// We don't use is_dir(), as it's less efficient than just checking for a 'dot' in the filename.
// The problem is that we're assuming that our directories won't contain a 'dot'.
if ($recursive && strpos($filename, '.') === FALSE) {
// The recursive parameter can either be set to TRUE or the number of levels to navigate
// If we reach the max number of recursive levels we're supported to navigate, then we try
// to guess if there's a module or product file under the directory with the same name as
// the directory
if ($recursive === TRUE || (is_int($recursive) && $recursive_level <= $recursive)) {
$retval = array_merge($retval, $this->find_product_and_module_files($filename_abspath, $recursive));
}
elseif (@file_exists(($module_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'module.'.$filename.'.php'))) {
$filename = 'module.'.$filename.'.php';
$filename_abspath = $module_abspath;
}
elseif (@file_exists(($product_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'product.'.$filename.'.php'))) {
$filename = 'product.'.$filename.'.php';
$filename_abspath = $module_abspath;
}
elseif (@file_exists(($module_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'module.'.$filename.'.php'))) {
$filename = 'module.'.$filename.'.php';
$filename_abspath = $module_abspath;
}
elseif (@file_exists(($product_abspath = $filename_abspath.DIRECTORY_SEPARATOR.'product.'.$filename.'.php'))) {
$filename = 'product.'.$filename.'.php';
$filename_abspath = $module_abspath;
}
}
}
if ((strpos($filename, 'module.') === 0 OR strpos($filename, 'product.') === 0) AND !$this->is_blacklisted($filename)) {
$retval[] = $filename_abspath;
if ((strpos($filename, 'module.') === 0 OR strpos($filename, 'product.') === 0) AND !$this->is_blacklisted($filename)) {
$retval[] = $filename_abspath;
}
}
}
}
$this->mark_as_searched_path($abspath);
......
......@@ -2450,7 +2450,7 @@ msgid "Server Settings"
msgstr ""
#: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 14 million downloads."
msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 16.5 million downloads."
msgstr ""
#: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
......@@ -3235,7 +3235,7 @@ msgid "https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/"
msgstr ""
#. Description of the plugin/theme
msgid "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 14 million downloads."
msgid "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16.5 million downloads."
msgstr ""
#. Author of the plugin/theme
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment