[Plugin: WP-Logs] Does not seem to work
-
Not working for me on 3.2.1 WordPress, either on my target site or a clean WordPress install on Bitnami. Can anyone help?
When the plugin is activated, WordPress shows me the error:
The plugin generated 2287 characters of unexpected output during activation.
No dashboard page is show, and the following code appears above the WordPress site and dashboard:
trackEvent('WP-Logs', $data['event'], $data['user_id'], $data['text']); $post = array( 'post_type' => 'EventLog', 'post_content' => $data['text'], 'post_title' => $data['event'], 'post_status' => 'publish', 'post_author' => ($data['user_id'] != '' ? $data['user_id'] : 1) //if no user id given, post from admin account ); $post_id = wp_insert_post($post); if ($data['notifo'] && function_exists('notifo_message')) { notifo_message($data['event'],$data['text'],get_permalink($post_id)); } //remove things that wont be in metadata unset($data['text'],$data['event'],$data['user_id']); //save everything else as metadata foreach ($data as $item => $value) { update_post_meta($post_id,'log_'.$item,$value); } } } } ?> __('Logs'), 'public' => true, 'show_ui' => true, 'exclude_from_search' => true, 'show_in_nav_menus' => false, 'supports' => array( 'title', 'editor', 'tags' ), 'menu_position' => 5 ) ); //remove the 'Add New' link global $submenu; unset($submenu['edit.php?post_type=EventLog'][10]); } function EventLog_edit_columns($columns){ $columns = array( "cb" => "", "title" => "Title", "timestamp" => "Timestamp", "user" => "User" ); return $columns; } function EventLog_custom_columns($column){ global $post; $custom = get_post_custom($post->ID); switch ($column) { case "timestamp": print date('m-d-Y h:i:a',strtotime($post->post_date)); break; case "user": $user = get_userdata($post->post_author); print $user->ID . ' (' . $user->user_login . ')'; break; } } ?>
- The topic ‘[Plugin: WP-Logs] Does not seem to work’ is closed to new replies.