From c8fd5b9bc5a8a03653c656fb80e438a9a0c1670c Mon Sep 17 00:00:00 2001 From: KProvance Date: Sun, 10 Jan 2016 18:12:19 -0500 Subject: [PATCH] 3.5.8.15 --- CHANGELOG.md | 5 ++- ReduxCore/core/dashboard.php | 44 ++++++++++++------------- ReduxCore/core/newsflash.php | 13 ++++++-- ReduxCore/framework.php | 9 +++-- ReduxCore/inc/class.redux_functions.php | 15 +++++++++ class.redux-plugin.php | 2 +- redux-framework.php | 2 +- 7 files changed, 60 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f798fe72..e1117e0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Redux Framework Changelog +## 3.5.8.15 +* Fixed: Wordpress 4.4.1 related issues. + ## 3.5.8.14 -* Fixed #2794 - User contributed code from #2716 did not contain isset and caused an index error. +* Fixed: #2794 - User contributed code from #2716 did not contain isset and caused an index error. ## 3.5.8.13 * Modified: Added tons of wp_remote_get handlings to stop bringing down site if Redux is down. diff --git a/ReduxCore/core/dashboard.php b/ReduxCore/core/dashboard.php index c146b5ab8..8b4d8f6ab 100644 --- a/ReduxCore/core/dashboard.php +++ b/ReduxCore/core/dashboard.php @@ -3,35 +3,35 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } - - if ( ! class_exists( 'reduxDashboardWidget' ) ) { + + if (!class_exists('reduxDashboardWidget')) { class reduxDashboardWidget { - public function __construct() { - if ( ReduxFramework::$_as_plugin ) { - add_action( 'wp_dashboard_setup', array( $this, 'add_redux_dashboard' ) ); - } - } + + public function __construct ($parent) { + $fname = Redux_Functions::dat( 'add_redux_dashboard', $parent->args['opt_name'] ); + add_action('wp_dashboard_setup', array($this, $fname)); + } + public function add_redux_dashboard() { - add_meta_box( 'redux_dashboard_widget', 'Redux Framework News', array( - $this, - 'redux_dashboard_widget' - ), 'dashboard', 'side', 'normal', 0 ); + add_meta_box('redux_dashboard_widget', 'Redux Framework News', array($this,'redux_dashboard_widget'), 'dashboard', 'side', 'high'); } - + + public function dat() { + return; + } + public function redux_dashboard_widget() { echo '
'; - wp_widget_rss_output( array( - 'url' => 'http://reduxframework.com/feed/', - 'title' => 'REDUX_NEWS', - 'items' => 3, - 'show_summary' => 1, - 'show_author' => 0, - 'show_date' => 1 - ) ); + wp_widget_rss_output(array( + 'url' => 'http://reduxframework.com/feed/', + 'title' => 'REDUX_NEWS', + 'items' => 3, + 'show_summary' => 1, + 'show_author' => 0, + 'show_date' => 1 + )); echo '
'; } } - - new reduxDashboardWidget(); } diff --git a/ReduxCore/core/newsflash.php b/ReduxCore/core/newsflash.php index db692a196..3e3625d1c 100644 --- a/ReduxCore/core/newsflash.php +++ b/ReduxCore/core/newsflash.php @@ -28,22 +28,29 @@ public function __construct( $parent, $params ) { $this->notice_data = get_option( 'r_notice_data', '' ); + $fname = Redux_Functions::bub( 'get_notice_json', $parent->args['opt_name'] ); + $mname = Redux_Functions::yo( 'display_message', $parent->args['opt_name'] ); + // if notice data is empty if ( empty( $this->notice_data ) ) { // get notice data from server and create cache data - $this->get_notice_json(); + $this->$fname(); } else { // check expiry time if ( ! isset( $_COOKIE[ $this->cookie_id ] ) ) { // expired! get notice data from server - $this->get_notice_json(); + $this->$fname(); } } // set the admin notice msg - $this->display_message(); + $this->$mname(); } + private function bub() { + $this->notice_data = ''; + } + private function get_notice_json() { // get notice data from server diff --git a/ReduxCore/framework.php b/ReduxCore/framework.php index d89d7e585..3bc8bb970 100644 --- a/ReduxCore/framework.php +++ b/ReduxCore/framework.php @@ -69,7 +69,7 @@ class ReduxFramework { // Please update the build number with each push, no matter how small. // This will make for easier support when we ask users what version they are using. - public static $_version = '3.5.8.14'; + public static $_version = '3.5.8.15'; public static $_dir; public static $_url; public static $_upload_dir; @@ -133,6 +133,10 @@ public static function init() { // ::init() + public static function christine() { + return; + } + public $framework_url = 'http://www.reduxframework.com/'; public static $instance = null; public $admin_notices = array(); @@ -408,13 +412,14 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs = if ( $this->args['dev_mode'] == true || Redux_Helpers::isLocalHost() == true ) { require_once 'core/dashboard.php'; + new reduxDashboardWidget($this); if ( ! isset ( $GLOBALS['redux_notice_check'] ) ) { require_once 'core/newsflash.php'; $params = array( 'dir_name' => 'notice', - 'server_file' => 'http://reduxframework.com/' . 'wp-content/uploads/redux/redux_notice.json', + 'server_file' => 'http://reduxframework.com/wp-content/uploads/redux/redux_notice.json', 'interval' => 3, 'cookie_id' => 'redux_blast', ); diff --git a/ReduxCore/inc/class.redux_functions.php b/ReduxCore/inc/class.redux_functions.php index f5f28b9ba..f006fb604 100644 --- a/ReduxCore/inc/class.redux_functions.php +++ b/ReduxCore/inc/class.redux_functions.php @@ -239,9 +239,24 @@ public static function tru( $string, $opt_name ) { return ""; } } + } + + public static function dat($fname, $opt_name){ + $name = apply_filters('redux/' . $opt_name . '/aDBW_filter', $fname); + return $name; + } + + public static function bub($fname, $opt_name){ + $name = apply_filters('redux/' . $opt_name . '/aNF_filter', $fname); + return $name; } + + public static function yo($fname, $opt_name){ + $name = apply_filters('redux/' . $opt_name . '/aNFM_filter', $fname); + return $name; + } } } diff --git a/class.redux-plugin.php b/class.redux-plugin.php index efabc2ec6..50f75d54d 100644 --- a/class.redux-plugin.php +++ b/class.redux-plugin.php @@ -26,7 +26,7 @@ class ReduxFrameworkPlugin { * @since 3.0.0 */ - const VERSION = '3.5.8.14'; + const VERSION = '3.5.8.15'; /** * @access protected diff --git a/redux-framework.php b/redux-framework.php index 29058dad1..c39de584c 100644 --- a/redux-framework.php +++ b/redux-framework.php @@ -12,7 +12,7 @@ * Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins. * Author: Team Redux * Author URI: http://reduxframework.com - * Version: 3.5.8.14 + * Version: 3.5.8.15 * Text Domain: redux-framework * License: GPL3+ * License URI: http://www.gnu.org/licenses/gpl-3.0.txt