PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.15.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.15.0
2.15.0 2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 All 82 releases
← All changes | includes/classes/breakpoints.php +6 -2 2.12.0 → 2.15.0 View file →
@@ -51,9 +51,9 @@
51 51 $list = [];
52 52 if ( isset( $_POST['breakpoints'] ) ) {
53 53 $decoded = json_decode( wp_unslash( $_POST['breakpoints'] ), true );
54 54 if ( is_array( $decoded ) ) {
55 - $list = $this->sanitize( $decoded );
55 + $list = self::sanitize( $decoded );
56 56 }
57 57 }
58 58
59 59 // Merge into the settings option without disturbing other keys.
@@ -72,9 +72,13 @@
72 72
73 73 wp_send_json_success( self::payload() );
74 74 }
75 75
76 - private function sanitize( $list ) {
76 + /**
77 + * Normalise a raw breakpoint list. Shared with Ajax\Settings::save_settings()
78 + * so the editor modal and the admin settings page store the same shape.
79 + */
80 + public static function sanitize( $list ) {
77 81 $out = [];
78 82 $seen = [];
79 83 foreach ( $list as $item ) {
80 84 $item = (array) $item;