delete_rtmedia_meta

Delete media meta.

Description

(array|bool) delete_rtmedia_meta( (constant) $id = false, (bool) $key = false ); 

Returns (array|bool)

Parameters (2)

0. $id — Optional. (constant) => false
The id.
1. $key — Optional. (bool) => false
The key.

Usage

  1. if ( !function_exists( 'delete_rtmedia_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/app/main/controllers/template/rtmedia-functions.php'; 
  3.  
  4. // The id. 
  5. $id = false; 
  6.  
  7. // The key. 
  8. $key = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = delete_rtmedia_meta($id, $key); 
  12.  

Defined (1)

The function is defined in the following location(s).

/app/main/controllers/template/rtmedia-functions.php  
  1. function delete_rtmedia_meta( $id = false, $key = false ) { 
  2.  
  3. if ( apply_filters( 'rtmedia_use_legacy_meta_function', false ) ) { 
  4. $rtmediameta = new RTMediaMeta(); 
  5.  
  6. return $rtmediameta->delete_meta( $id, $key ); 
  7. } else { 
  8. // use WP's default get_metadata function replace column name from "media_id" to "id" in query 
  9.  
  10. $meta = delete_metadata( 'media', $id, $key ); 
  11.  
  12. remove_filter( 'query', 'rtm_filter_metaid_column_name' ); 
  13.  
  14. return $meta;