You appear to be a bot. Output may be restricted
Description
Reset tag option when the saved tag is deleted.
It's important to mention that the transient needs to be deleted, too. While it may not be obvious by looking at the function alone, the transient is deleted by Featured_Content::validate_settings(). Hooks in the "delete_post_tag" action.
Usage
Featured_Content::delete_post_tag( $tag_id );
Parameters
- $tag_id
- ( int ) required – The term_id of the tag that has been deleted.
Returns
void
Source
File name: twentyfourteen/inc/featured-content.php
Lines:
1 to 11 of 11
public static function delete_post_tag( $tag_id ) { $settings = self::get_setting(); if ( empty( $settings['tag-id'] ) || $tag_id != $settings['tag-id'] ) { return; } $settings['tag-id'] = 0; $settings = self::validate_settings( $settings ); update_option( 'featured-content', $settings ); }