Code4Lib Journal WordPress Customizations

From Code4Lib
Revision as of 17:36, 18 November 2008 by Wickr (Talk | contribs) (Reverted edits by (Talk); changed back to last version by Wickr)

Jump to: navigation, search



Filters out spam-link comments based on their content
Requires users to copy a distorted word before they can comment


COinS Quicktags Button
In the non-WYSIWYG editor, can be used to build a basic COinS tag. This has been abandoned in favor of the generator at
unAPI Server
Provides information about articles. Useful for Zotero users.


Makes code pretty.
C4LJ Custom the_author()
Replaces the text returned by the_author() with the value of the "author" custom field. Necessary since articles are entered by their editors, but we want author information to appear on the articles and in the syndication feeds.


C4LJ Remove Parents
A customization of Prettifies category URLs so that issues appear at instead of
FeedBurner FeedSmith
Redirects the main feed and the general comments feed to FeedBurner


Issue Manager
Enables one-click publishing of new issues, and prevents articles from being published until their associated issue is published.
Role Manager
Allows creation of custom roles and editing of roles' permissions. Used to create the Reviewer role, which can read Private articles, so that authors can see their articles before publication, and to prevent editors from publishing articles on accident.


These fixes were necessary for WP < 2.5, but should not be needed any longer.

Save the <div>s

Edit wp-includes/js/tinymce/tiny_mce_config.php, around line 25.

$valid_elements = '-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]';

"Submit for Review"

Edit wp-admin/includes/post.php. After line 71 (in version 2.3.3) add:

if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' )) {
	$post =& get_post( $post_ID );
	if ('publish' != $post->post_status)
		$_POST['post_status'] = 'pending';

Issue Manager Plugin

To Publish an Issue

  1. Assign timestamps to the articles in the order you want them to appear on the page (newest timestamps go at the top of the page)
  2. Go to the Issue Manager page in the "Manage" tab.
  3. Click "Publish" next to the category for the issue you want to publish.
  4. All "Pending Review" articles with the given category (that don't also have an "unpublished" category) will be published, with the timestamps updated to about now, retaining the order established earlier.

To Prevent Early Publication of Articles

  1. Go to the Issue Manager page in the "Manage" tab.
  2. Click "Unpublish" next to the category for the issue you want to keep unpublished.
  3. Any published articles with that category will revert to "Pending Review" status. Any new articles you attempt to publish will instead be set to "Pending Review".