Commit 1aae76c
feat: make msls_get_switcher() $attr optional
Give $attr a default of array() so the documented template tag
can be called with no arguments. The body already coerced any
non-array value to array(), so $attr was effectively optional;
the missing default made msls_get_switcher() throw an
ArgumentCountError on the natural no-arg call.
The parameter stays untyped to preserve the is_array() coercion,
which keeps the [sc_msls] shortcode working (WordPress passes ''
when a shortcode has no attributes).
Closes #643
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f8d6cea commit 1aae76c
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments