Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RRZE Webteam
RRZE Post Expiration
Commits
11b2e1c2
Commit
11b2e1c2
authored
May 12, 2016
by
Rolf Forst
Browse files
Fix custom column style
parent
f17cfa0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
css/post-expiration.css
0 → 100644
View file @
11b2e1c2
/* Columns */
.fixed
.column-expiration_date
{
width
:
10%
;
}
rrze-post-expiration.php
View file @
11b2e1c2
...
...
@@ -2,7 +2,7 @@
/*
Plugin Name: 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.
Author: RRZE-Webteam
License: GPLv2 or later
...
...
@@ -35,7 +35,7 @@ class RRZE_Post_Expiration {
const
option_name
=
'_rrze_post_expiration'
;
const
php_version
=
'5.4'
;
const
wp_version
=
'4.
4
'
;
const
wp_version
=
'4.
5
'
;
private
static
$instance
=
NULL
;
...
...
@@ -51,6 +51,8 @@ class RRZE_Post_Expiration {
private
function
__construct
()
{
global
$current_blog
;
add_action
(
'admin_enqueue_scripts'
,
array
(
__CLASS__
,
'enqueue_scripts'
));
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_filter
(
'manage_edit-post_sortable_columns'
,
array
(
__CLASS__
,
'expiration_date_sortable_column'
));
...
...
@@ -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
)
{
$columns
[
'expiration_date'
]
=
__
(
'Verfallsdatum'
,
'rrze-post-expiration'
);
return
$columns
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment