Code Monkey home page Code Monkey logo

post-tag-checklist's Introduction

Post Tag Checklist

Replace the standard post tag meta box on the post edit screen with a category-style checklist (checkboxes). One key benefit over the standard post tag meta box is the ability to prevent users (by role, etc.) from creating new tags.

Post Tag Checklist screenshot

Requirements

PHP 5.4+

Installation

Download the zip file and install it using the WordPress plugin installer.

Usage

Once installed this plugin will automatically convert the post tag meta box to the category-style checklist. This behavior can be changed by filtering 'post_tag_checklist_toggle':

<?php
/**
 * Show standard post tag meta box to users who have the 'manage_post_tags' capability.
 *
 * @param bool   $render_checklist Whether or not to render the post tag checklist. Default is true.
 * @param array  $args             Array of arguments for the taxonomy.
 * @param string $taxonomy         Taxonomy name.
 * @return bool
 */
add_filter( 'post_tag_checklist_toggle', function( $render_checklist, $args, $taxonomy ) {
	if ( current_user_can( 'manage_post_tags' ) ) {
		return false;
	}
	
	return $render_checklist;
}, 10, 3 );

post-tag-checklist's People

Contributors

timothyjensen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.