PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.6.1
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.6.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
← All changes | inc/functions/widgets.php +3 -7 2.0.42.6.1 View file →
@@ -12,9 +12,9 @@
12 12 * Retrieve data for a widget from options table.
13 13 *
14 14 * @param string $widget_id The unique ID of a widget.
15 15 *
16 - * @return array The array of widget settings or empty array if none
16 + * @return array<string,mixed> The array of widget settings or empty array if none
17 17 */
18 18 function get_options( $widget_id ) {
19 19 static $options = [];
20 20
@@ -44,17 +44,13 @@
44 44
45 45 /**
46 46 * Checks for & adds missing widget options to prevent errors or missing data.
47 47 *
48 - * @param array $options Widget options.
48 + * @param array<string,mixed> $options Widget options.
49 49 *
50 - * @return array
50 + * @return array<string,mixed>
51 51 */
52 52 function parse_options( $options = [] ) {
53 - if ( ! is_array( $options ) ) {
54 - $options = [];
55 - }
56 -
57 53 return wp_parse_args( $options, [
58 54 'which_users' => '',
59 55 'roles' => [],
60 56 ] );