@@ -44,6 +44,7 @@ discard block |
||
| 44 | 44 | * @param int $object_id Object id to get value for (e.g. post_id, term_id etc.) |
| 45 | 45 | * @param string $container_type Container type to search in |
| 46 | 46 | * @param string $field_name Field name |
| 47 | + * @param string $container_id |
|
| 47 | 48 | * @return mixed |
| 48 | 49 | */ |
| 49 | 50 | public static function get_value( $object_id, $container_type, $container_id, $field_name ) { |
@@ -64,6 +65,7 @@ discard block |
||
| 64 | 65 | * @param string $container_type Container type to search in |
| 65 | 66 | * @param string $field_name Field name |
| 66 | 67 | * @param array $value Field expects a `value_set`; Complex_Field expects a `value_tree` - refer to DEVELOPMENT.md |
| 68 | + * @param string $container_id |
|
| 67 | 69 | */ |
| 68 | 70 | public static function set_value( $object_id, $container_type, $container_id, $field_name, $value ) { |
| 69 | 71 | $field = static::get_field_clone( $object_id, $container_type, $container_id, $field_name ); |
@@ -105,7 +107,7 @@ discard block |
||
| 105 | 107 | * @param int $id Post ID |
| 106 | 108 | * @param string $name Custom field name |
| 107 | 109 | * @param array $value |
| 108 | - * @return bool Success |
|
| 110 | + * @return boolean|null Success |
|
| 109 | 111 | */ |
| 110 | 112 | public static function set_post_meta( $id, $name, $value, $container_id = '' ) { |
| 111 | 113 | return static::set_value( $id, 'post_meta', $container_id, $name, $value ); |
@@ -126,7 +128,7 @@ discard block |
||
| 126 | 128 | * |
| 127 | 129 | * @param string $name Field name |
| 128 | 130 | * @param array $value |
| 129 | - * @return bool Success |
|
| 131 | + * @return boolean|null Success |
|
| 130 | 132 | */ |
| 131 | 133 | public static function set_theme_option( $name, $value, $container_id = '' ) { |
| 132 | 134 | return static::set_value( null, 'theme_options', $container_id, $name, $value ); |
@@ -149,7 +151,7 @@ discard block |
||
| 149 | 151 | * @param int $id Term ID |
| 150 | 152 | * @param string $name Field name |
| 151 | 153 | * @param array $value |
| 152 | - * @return bool Success |
|
| 154 | + * @return boolean|null Success |
|
| 153 | 155 | */ |
| 154 | 156 | public static function set_term_meta( $id, $name, $value, $container_id = '' ) { |
| 155 | 157 | return static::set_value( $id, 'term_meta', $container_id, $name, $value ); |
@@ -172,7 +174,7 @@ discard block |
||
| 172 | 174 | * @param int $id User ID |
| 173 | 175 | * @param string $name Field name |
| 174 | 176 | * @param array $value |
| 175 | - * @return bool Success |
|
| 177 | + * @return boolean|null Success |
|
| 176 | 178 | */ |
| 177 | 179 | public static function set_user_meta( $id, $name, $value, $container_id = '' ) { |
| 178 | 180 | return static::set_value( $id, 'user_meta', $container_id, $name, $value ); |
@@ -195,7 +197,7 @@ discard block |
||
| 195 | 197 | * @param int $id Comment ID |
| 196 | 198 | * @param string $name Field name |
| 197 | 199 | * @param array $value |
| 198 | - * @return bool Success |
|
| 200 | + * @return boolean|null Success |
|
| 199 | 201 | */ |
| 200 | 202 | public static function set_comment_meta( $id, $name, $value, $container_id = '' ) { |
| 201 | 203 | return static::set_value( $id, 'comment_meta', $container_id, $name, $value ); |
@@ -206,7 +208,7 @@ discard block |
||
| 206 | 208 | * |
| 207 | 209 | * @param array &$array The input array. |
| 208 | 210 | * @param int $sort_flags Flags for controlling sorting behavior. |
| 209 | - * @return array Sorted array. |
|
| 211 | + * @return boolean Sorted array. |
|
| 210 | 212 | */ |
| 211 | 213 | public static function ksort_recursive( &$array, $sort_flags = SORT_REGULAR ) { |
| 212 | 214 | if ( ! is_array( $array ) ) { |