Merhabalar, sitenizde benimki gibi 300.000 içerik ve daha fazlası var ise ve devamlı mahkeme kararıyla içerik silme talebi geliyorsa ve dahası cep telefonundan hemen seri silmek istiyorsanız sitenize ekleyebileceğiniz
mobilde'de çalışacak sil butonu örneğidir.
CSS Kodumuz Özelleştir Ek css'den eklenebilir (bu kodlama bana aittir)
#wpadminbar #wp-admin-bar-delete>.ab-item:before{ content:"\f182"; top:2px}@media screen and (max-width:782px){ #wpadminbar li#wp-admin-bar-delete{ display:block; text-indent:100%; white-space:nowrap; overflow:hidden; width:52px; padding:0; color:#a0a5aa; position:relative} #wpadminbar #wp-admin-bar-delete>.ab-item:before{ display:block; text-indent:0; font:32px/1 dashicons; speak:none; top:7px; width:52px; text-align:center; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; color:red}}Function.php'ye eklenecek kodumuz
function fb_add_admin_bar_trash_menu() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; $current_object = get_queried_object(); if ( empty($current_object) ) return; if ( !empty( $current_object->post_type ) && ( $post_type_object = get_post_type_object( $current_object->post_type ) ) && current_user_can( $post_type_object->cap->edit_post, $current_object->ID ) ) { $wp_admin_bar->add_menu( array( 'id' => 'delete', 'title' => __('Sil'), 'href' => get_delete_post_link($current_object->term_id) )
); }
} add_action( 'admin_bar_menu', 'fb_add_admin_bar_trash_menu', 35 );Ekleme: Sildikten sonra 404 sayfasına düşüyor, düşmesin hayır anasayfaya gitsin diyorsan tema function.php'ye şunu eklicen
add_action('trashed_post','my_trashed_post_handler',10,1);
function my_trashed_post_handler($post_id)
{ wp_redirect( get_option('siteurl') ); exit;
}