/**
  * Renders the meta value of this field for usage in a terms list table column.
  *
  * @since 0.6.0
  * @param integer $term_id the term ID to display the meta value for
  */
 public function render_table_column($term_id)
 {
     $formatted = Utility::get_default_formatted($this->type);
     $output = wpptd_get_term_meta_value($term_id, $this->slug, null, $formatted);
     /**
      * This filter can be used by the developer to modify the way a specific meta value is printed in the terms list table.
      *
      * @since 0.6.0
      * @param mixed the formatted meta value
      * @param integer the term ID
      */
     echo apply_filters('wpptd_' . wpptd_get_taxonomy($term_id) . '_term_table_meta_' . $this->slug . '_output', $output, $term_id);
 }
Exemplo n.º 2
0
 /**
  * Renders the meta value of this field for usage in a posts list table column.
  *
  * @since 0.5.0
  * @param integer $post_id the post ID to display the meta value for
  */
 public function render_table_column($post_id)
 {
     $formatted = Utility::get_default_formatted($this->type);
     $output = wpptd_get_post_meta_value($post_id, $this->slug, null, $formatted);
     if (has_filter('wpptd_' . get_post_type($post_id) . '_table_meta_' . $this->slug . '_output')) {
         App::deprecated_filter('wpptd_' . get_post_type($post_id) . '_table_meta_' . $this->slug . '_output', '0.6.0', 'wpptd_' . get_post_type($post_id) . '_post_table_meta_' . $this->slug . '_output');
         /**
          * This filter can be used by the developer to modify the way a specific meta value is printed in the posts list table.
          *
          * @since 0.5.0
          * @deprecated 0.6.0
          * @param mixed the formatted meta value
          * @param integer the post ID
          */
         $output = apply_filters('wpptd_' . get_post_type($post_id) . '_table_meta_' . $this->slug . '_output', $output, $post_id);
     }
     /**
      * This filter can be used by the developer to modify the way a specific meta value is printed in the posts list table.
      *
      * @since 0.6.0
      * @param mixed the formatted meta value
      * @param integer the post ID
      */
     echo apply_filters('wpptd_' . get_post_type($post_id) . '_post_table_meta_' . $this->slug . '_output', $output, $post_id);
 }