@@ 252-259 (lines=8) @@ | ||
249 | * @since 2.6.0 |
|
250 | * @param array $key Meta key |
|
251 | */ |
|
252 | public function delete_meta_data( $key ) { |
|
253 | $array_keys = array_keys( wp_list_pluck( $this->meta_data, 'key' ), $key ); |
|
254 | if ( $array_keys ) { |
|
255 | foreach ( $array_keys as $array_key ) { |
|
256 | $this->meta_data[ $array_key ]->value = null; |
|
257 | } |
|
258 | } |
|
259 | } |
|
260 | ||
261 | /** |
|
262 | * Delete meta data. |
|
@@ 266-273 (lines=8) @@ | ||
263 | * @since 2.6.0 |
|
264 | * @param int $mid Meta ID |
|
265 | */ |
|
266 | public function delete_meta_data_by_mid( $mid ) { |
|
267 | $array_keys = array_keys( wp_list_pluck( $this->meta_data, 'id' ), $mid ); |
|
268 | if ( $array_keys ) { |
|
269 | foreach ( $array_keys as $array_key ) { |
|
270 | $this->meta_data[ $array_key ]->value = null; |
|
271 | } |
|
272 | } |
|
273 | } |
|
274 | ||
275 | /** |
|
276 | * Callback to remove unwanted meta data. |