@@ -40,14 +40,14 @@ public function __construct( $parent = null ) {
4040 * Get the data.
4141 *
4242 * @param string|array $type Type.
43- * @param array $args Args.
43+ * @param array|string $args Args.
4444 * @param string $opt_name Opt name.
4545 * @param string|int $current_value Current value.
4646 * @param bool $ajax Tells if this is an AJAX call.
4747 *
4848 * @return array|mixed|string
4949 */
50- public function get ( $ type , array $ args = array (), string $ opt_name = '' , $ current_value = '' , bool $ ajax = false ) {
50+ public function get ( $ type , $ args = array (), string $ opt_name = '' , $ current_value = '' , bool $ ajax = false ) {
5151 $ opt_name = $ this ->opt_name ;
5252
5353 // We don't want to run this, it's not a string value. Send it back!
@@ -222,13 +222,13 @@ private function order_data( array $data = array(), string $sort = 'value', stri
222222 /**
223223 * Fetch the data for a given type.
224224 *
225- * @param string $type The data type we're fetching.
226- * @param array $args Arguments to pass.
227- * @param mixed|array $current_value If a current value already set in the database.
225+ * @param string $type The data type we're fetching.
226+ * @param array|string $args Arguments to pass.
227+ * @param mixed|array $current_value If a current value already set in the database.
228228 *
229229 * @return array
230230 */
231- private function get_data ( string $ type , array $ args , $ current_value ): array {
231+ private function get_data ( string $ type , $ args , $ current_value ): array {
232232 $ args = $ this ->get_arg_defaults ( $ type , $ args );
233233
234234 $ opt_name = $ this ->opt_name ;
@@ -486,11 +486,11 @@ private function get_data( string $type, array $args, $current_value ): array {
486486 /**
487487 * Router for translation based on the given post type.
488488 *
489- * @param string $type Type of data request.
490- * @param mixed|array $current_value Current value stored in DB.
491- * @param array $args Arguments for the call.
489+ * @param string $type Type of data request.
490+ * @param mixed|array $current_value Current value stored in DB.
491+ * @param array|string $args Arguments for the call.
492492 */
493- private function maybe_get_translation ( string $ type , &$ current_value = '' , array $ args = array () ) {
493+ private function maybe_get_translation ( string $ type , &$ current_value = '' , $ args = array () ) {
494494 switch ( $ type ) {
495495 case 'categories ' :
496496 case 'category ' :
@@ -602,12 +602,12 @@ private function get_current_data_args( string $type, array $args, $current_valu
602602 /**
603603 * Get default arguments for a given data type.
604604 *
605- * @param string $type Type of data request.
606- * @param array $args Arguments for the call.
605+ * @param string $type Type of data request.
606+ * @param array|string $args Arguments for the call.
607607 *
608- * @return array
608+ * @return array|string
609609 */
610- private function get_arg_defaults ( string $ type , array $ args = array () ): array {
610+ private function get_arg_defaults ( string $ type , $ args = array () ) {
611611 // In this section we set the default arguments for each data type.
612612 switch ( $ type ) {
613613 case 'categories ' :
0 commit comments