Commit 11b2e1c2 authored by Rolf Forst's avatar Rolf Forst
Browse files

Fix custom column style

parent f17cfa0e
/* Columns */
.fixed .column-expiration_date {
width: 10%;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
Plugin Name: RRZE Post Expiration Plugin Name: RRZE Post Expiration
Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-post-expiration Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-post-expiration
Version: 1.1.0 Version: 1.1.1
Description: Verfallsdatum für Beiträge. Description: Verfallsdatum für Beiträge.
Author: RRZE-Webteam Author: RRZE-Webteam
License: GPLv2 or later License: GPLv2 or later
...@@ -35,7 +35,7 @@ class RRZE_Post_Expiration { ...@@ -35,7 +35,7 @@ class RRZE_Post_Expiration {
const option_name = '_rrze_post_expiration'; const option_name = '_rrze_post_expiration';
const php_version = '5.4'; const php_version = '5.4';
const wp_version = '4.4'; const wp_version = '4.5';
private static $instance = NULL; private static $instance = NULL;
...@@ -51,6 +51,8 @@ class RRZE_Post_Expiration { ...@@ -51,6 +51,8 @@ class RRZE_Post_Expiration {
private function __construct() { private function __construct() {
global $current_blog; global $current_blog;
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
add_filter('manage_post_posts_columns', array(__CLASS__, 'expiration_date_column')); add_filter('manage_post_posts_columns', array(__CLASS__, 'expiration_date_column'));
add_action('manage_post_posts_custom_column', array(__CLASS__, 'expiration_date_custom_column'), 10, 2); add_action('manage_post_posts_custom_column', array(__CLASS__, 'expiration_date_custom_column'), 10, 2);
add_filter('manage_edit-post_sortable_columns', array(__CLASS__, 'expiration_date_sortable_column')); add_filter('manage_edit-post_sortable_columns', array(__CLASS__, 'expiration_date_sortable_column'));
...@@ -88,6 +90,10 @@ class RRZE_Post_Expiration { ...@@ -88,6 +90,10 @@ class RRZE_Post_Expiration {
} }
} }
public static function enqueue_scripts() {
wp_enqueue_style('post-expiration', plugins_url('css/post-expiration.css', __FILE__ ), 'all', NULL);
}
public static function expiration_date_column($columns) { public static function expiration_date_column($columns) {
$columns['expiration_date'] = __('Verfallsdatum', 'rrze-post-expiration'); $columns['expiration_date'] = __('Verfallsdatum', 'rrze-post-expiration');
return $columns; return $columns;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment