コード例 #1
0
 /**
  * Remove all links with the specified URL, leaving their anchor text intact.
  *
  * @param string $field_name
  * @param blcParser $parser
  * @param string $url
  * @param string $raw_url
  * @return bool|WP_Error True on success, or an error object if something went wrong.
  */
 function unlink($field_name, $parser, $url, $raw_url = '')
 {
     //Ensure we're operating on a consistent copy of the wrapped object.
     $this->get_wrapped_object(true);
     $old_value = $this->get_field($field_name);
     $new_value = $parser->unlink($old_value, $url, $raw_url);
     if (is_wp_error($new_value)) {
         return $new_value;
     }
     return $this->update_field($field_name, $new_value, $old_value);
 }