30.03.2008, 18:30
|
#17 (permalink)
|
| PostRank: 8
Registriert seit: 14.11.2004
Beiträge: 956
| Zitat:
Zitat von Alphawolf Hab mir mal ein kleines Plugin geschrieben, das dieses "Problem" behebt..  | Na das ging ja fix, danke! Ich hab das mal abgeändert mit pages statt posts und als mange-pages-id-25.php gespeichert, das scheint zu funktionieren: PHP-Code: <?php
/*
Plugin Name: Page IDs in Manage Posts View for WP2.5
Version: 0.5
Plugin URI: http://www.schloebe.de/wordpress/manage-page-id-25/
Description: Display the Page ID in Manage Pages list
Author: Oliver Schlöbe
Author URI: http://www.schloebe.de/
*/
function os_column_page_id_25($defaults) {
$wp_version = (!isset($wp_version)) ? get_bloginfo('version') : $wp_version;
if ( $wp_version >= '2.5' ) {
$defaults['os_page_id_25'] = __('ID');
return $defaults;
}
}
function os_custom_column_page_id_25($column_name, $id) {
if( $column_name == 'os_page_id_25' ) {
echo (int) $id;
}
}
add_action('manage_pages_custom_column', 'os_custom_column_page_id_25', 5, 2);
add_filter('manage_pages_columns', 'os_column_page_id_25');
?> Oder sieht jemand einen Fehler dadrin, der mein WP explodieren lässt? |
| |