Susikūriau čia sau tokią asmeninę duombazę-minčių banką wordpresse.
Patogiausia tema, aišku P2 iš Automattic. Trūko tik vieno dalyko: kad ne tik rašyt iš fasadinio puslapio ir redaguot būtų galima, tačiau nelendant į admin panelę ir trinti jau nebeaktualius įrašus. Tuo tikslu buvo sukurta “child theme“ P0 ir įdegtas “Delete P0st Link“.
function wp_delete_post_link($link = 'Delete This', $before = '', $after = '') { global $post; if ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; } else { if ( !current_user_can( 'edit_post', $post->ID ) ) return; } $link = "<a href='" . wp_nonce_url( get_bloginfo('url') . "/wp-admin/post.php?action=delete&post=" . $post->ID, 'delete-post_' . $post->ID) . "'>".$link."</a>"; echo $before . $link . $after; }
O į temą jis “įdedamas“ tokia eilute:
wp_delete_post_link('Delete This', '<p>', '</p>')