Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removing mandatory array from creator functions arguments, takes defa…

…ults
  • Loading branch information...
commit 889ce10fcaa36fade5bc10ac8ad1fe1445d69ec6 1 parent d66f2cc
@kovshenin authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 post-options-api.php
View
10 post-options-api.php
@@ -37,7 +37,7 @@ public static function description( $args = array() ) {
* Give this checkbox a label and a description through
* the arguments array for the best look and feel.
**/
- public static function checkbox( $args ) {
+ public static function checkbox( $args = array() ) {
$defaults = array(
'label' => '',
@@ -64,7 +64,7 @@ public static function _checkbox( $args = array() ) {
* Factory function accepts a description and a
* sanitize_callback if you need some validation.
**/
- public static function text( $args ) {
+ public static function text( $args = array() ) {
$defaults = array(
'description' => '',
@@ -95,7 +95,7 @@ public static function _text ( $args = array() ) {
* Function accepts a description, rows and
* a sanitize_callback for validation.
**/
- public static function textarea( $args ) {
+ public static function textarea( $args = array() ) {
$defaults = array(
'description' => '',
@@ -130,7 +130,7 @@ public static function _textarea( $args = array() ) {
* values are the captions. The sanitize_callback argument
* is available too.
**/
- public static function select( $args ) {
+ public static function select( $args = array() ) {
$defaults = array(
'description' => '',
@@ -167,7 +167,7 @@ public static function _select( $args = array() ) {
* Works very much like the drop-down select box. The radio
* data is passed in the radio_data array. Rest is the same.
**/
- public static function radio( $args ) {
+ public static function radio( $args = array() ) {
$defaults = array(
'description' => '',
Please sign in to comment.
Something went wrong with that request. Please try again.