_delete_attachment_theme_mod [ WordPress Function ]
_delete_attachment_theme_mod ( $id )
| Access: |
|
| Parameters: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_delete_attachment, get_attachment_template, wp_get_attachment_thumb_url, wp_get_attachment_thumb_file, wp_generate_attachment_metadata
Checks an attachment being deleted to see if it's a header or background image.
If true it removes the theme modification which would be pointing at the deleted attachment
Source
<?php
function _delete_attachment_theme_mod( $id ) {
$attachment_image = wp_get_attachment_url( $id );
$header_image = get_header_image();
$background_image = get_background_image();
if ( $header_image && $header_image == $attachment_image )
remove_theme_mod( 'header_image' );
if ( $background_image && $background_image == $attachment_image )
remove_theme_mod( 'background_image' );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- PHPXRef 0.7 : WordPress : Detail view of theme.php
_delete_attachment_theme_mod() check_theme_switched() _wp_customize_include() _wp_customize_loader_localize() wp_customize_url(). Functions ...
phpxref.ftwr.co.uk - WordPress › Support » Webpage disappeared!
on( 'delete_attachment', '_delete_attachment_theme_mod' ); ?> ( 'echo' => FALSE ) ); $shortlink = wp_get_shortlink( $post->ID ); if ( !empty( $shortlink ) ) { $ link ...
wordpress.org - 14093-remove-custom-background.patch on Ticket #14903 ...
remove_custom_background. theme.php. 1591, 1591, } ...
core.trac.wordpress.org - wp_customize_url (WordPress Function) - WPSeek.com
_delete_attachment_theme_mod() check_theme_switched() _wp_customize_include() _wp_customize_loader_localize() wp_customize_url(). Functions .
wpseek.com