Permalink
Browse files

removing mandatory array from creator functions arguments, takes defa…

…ults
  • Loading branch information...
1 parent d66f2cc commit 889ce10fcaa36fade5bc10ac8ad1fe1445d69ec6 @kovshenin committed Aug 1, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 post-options-api.php
View
@@ -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' => '',

0 comments on commit 889ce10

Please sign in to comment.