Skip to content
This repository was archived by the owner on Dec 4, 2019. It is now read-only.

Commit 7981df9

Browse files
committed
Redux Opti + Some apidae bugfixes
1 parent df4fb6f commit 7981df9

File tree

137 files changed

+188
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+188
-186
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,5 @@ composer.phar
5656
vendor/**/.git
5757
vendor/**/.editorconfig
5858
/admin/redux-extensions/shortcodes/
59+
plugins/redux-extensions-examples
60+
plugins/redux-dev-master

WPlusPlusCore.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Plugin Name: W++ Core
2525
* Plugin URI: https://github.com/tofandel/wplusplus-core/
2626
* Description: A Wordpress Plugin acting as core for other of my plugins and including the Ultimate Redux Framework Bundle and OOP APIs to use it
27-
* Version: 1.8
27+
* Version: 1.8.1
2828
* Author: Adrien Foulon <tofandel@tukan.hu>
2929
* Author URI: https://tukan.fr/a-propos/#adrien-foulon
3030
* Text Domain: wppc
@@ -42,6 +42,11 @@ class WPlusPlusCore extends WP_Plugin implements WP_Plugin_Interface {
4242
protected $no_redux = true;
4343

4444
public function actionsAndFilters() {
45+
add_action('site_transient_update_plugins', [$this, 'WPPBundledUpdate']);
46+
}
47+
48+
public function WPPBundledUpdate() {
49+
4550
}
4651

4752
public function definitions() {
@@ -56,7 +61,7 @@ public function menusAndSettings() {
5661
}
5762

5863
public function upgrade( $last_version ) {
59-
// Nothing yet
64+
$this->copy( 'wplusplus-muloader.php.bak', self::MULOADER_DIR . '/wplusplus-muloader.php' );
6065
}
6166

6267
public function activated() {

functions.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -845,13 +845,14 @@ function wpp_slugify( $string, $slashes = true ) {
845845
/**
846846
* Order a multidimensional array from a subelement set specified as a path "foo.bar.orderValue"
847847
*
848-
* @param $array
849-
* @param $path
848+
* @param array $array
849+
* @param string $path
850+
* @param bool $keep_keys
850851
*
851852
* @return array
852853
* @throws Exception
853854
*/
854-
function wpp_order_by( $array, $path ) {
855+
function wpp_order_by( $array, $path, $keep_keys = false ) {
855856
if ( empty( $array ) ) {
856857
return array();
857858
}
@@ -861,7 +862,7 @@ function wpp_order_by( $array, $path ) {
861862
$path = explode( '.', $path );
862863
$c = count( $path );
863864
// Sort the multidimensional array
864-
usort( $array, function ( $a, $b ) use ( $path, $c ) {
865+
($keep_keys ? 'uasort' : 'usort')( $array, function ( $a, $b ) use ( $path, $c ) {
865866
$v1 = $a;
866867
for ( $i = 0; $i < $c; $i ++ ) {
867868
$k = $path[ $i ];
@@ -892,8 +893,8 @@ function wpp_order_by( $array, $path ) {
892893
*
893894
* If multiple elements exist with the same value they will be grouped and merged recursively (the scalar elements will become indexed array)
894895
*
895-
* @param $array
896-
* @param $path
896+
* @param array $array
897+
* @param string $path
897898
*
898899
* @return array
899900
* @throws Exception

plugins/redux-extensions/codemirror/codemirror/field_codemirror.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
// Don't duplicate me!
26-
if ( ! class_exists( 'ReduxFramework_Field_codemirror' ) ) {
26+
if ( ! class_exists( 'ReduxFramework_Field_codemirror', false ) ) {
2727

2828
/**
2929
* Main ReduxFramework_Field_codemirror class

plugins/redux-extensions/codemirror/extension_codemirror.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626

2727
// Don't duplicate me!
28-
if ( ! class_exists( 'ReduxFramework_extension_codemirror' ) ) {
28+
if ( ! class_exists( 'ReduxFramework_extension_codemirror', false ) ) {
2929

3030

3131
/**

plugins/redux-extensions/color_scheme/color_scheme/attachment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
if ( ! class_exists( 'ReduxColorSchemeImport' ) ) {
3+
if ( ! class_exists( 'ReduxColorSchemeImport', false ) ) {
44
class ReduxColorSchemeImport {
55

66
// Private variables

plugins/redux-extensions/color_scheme/color_scheme/field_color_scheme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525

2626
// Don't duplicate me!
27-
if ( ! class_exists( 'ReduxFramework_color_scheme' ) ) {
27+
if ( ! class_exists( 'ReduxFramework_color_scheme', false ) ) {
2828

2929
/**
3030
* Main ReduxFramework_color_scheme class

plugins/redux-extensions/color_scheme/color_scheme/inc/class.color_scheme_functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
//print_r($GLOBALS['rdxIO']);
1414

15-
if ( ! class_exists( 'ReduxColorSchemeFunctions' ) ) {
15+
if ( ! class_exists( 'ReduxColorSchemeFunctions', false ) ) {
1616
class ReduxColorSchemeFunctions {
1717

1818
// public variables

plugins/redux-extensions/color_scheme/extension_color_scheme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929

3030
// Don't duplicate me!
31-
if ( ! class_exists( 'ReduxFramework_extension_color_scheme' ) ) {
31+
if ( ! class_exists( 'ReduxFramework_extension_color_scheme', false ) ) {
3232

3333

3434
/**

plugins/redux-extensions/css_layout/css_layout/field_css_layout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525

2626
// Don't duplicate me!
27-
if ( ! class_exists( 'ReduxFramework_css_layout' ) ) {
27+
if ( ! class_exists( 'ReduxFramework_css_layout', false ) ) {
2828

2929
/**
3030
* Main ReduxFramework_css_layout class

0 commit comments

Comments
 (0)