Download the PHP package wecodemore/termlimit without Composer

On this page you can find all versions of the php package wecodemore/termlimit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package termlimit

WordPress Term Limits

Limits terms (categories, post tags, custom taxonomy terms) on a per post type basis

Do you have lazy authors who don't care using a single tag? Do you have wannabe SEO experts using all of your tags on each post?

Set an end to that. Just like seen on StackOverflow and other StackExchange sites: minimum 1 tag, maximum 5.

(Yes you can define the amount yourself)

Needs PHP 5.4+ to run. Will break with lower PHP versions.

Is this a plugin?

Yes. For WordPress.

How to install?

You can simply download it and are ready to go. Still the following options are preferred.

Or just install/import it into your project using Composer

composer create-project wcm/termlimits

Or clone the repository into your plugin directory using git

git clone [email protected]:wecodemore/wcm-termlimit.git

How to use?

Per default, there is a minimum of 0 terms that need to get added. The maximum is 3. And the limit only applies for the post post type.

To alter the limit or the type, there are two filters that you can use in a small child plugin:

In case you want to extend your limit to custom taxonomies, you will also have to write a quick extension/class to account for that:

To see what exactly you should take as input/$_POST value, use the following mini-plugin to dump your save_post action.

Important: Make sure that you have at least FTP access and can actually edit or remove the plugin. Else you will get stuck there. This will break (exit) your request and present you with a dump of the post.

The @TODO List

Custom taxonomy terms.

Also, there's by now nothing built in to do something in case the limit was exceeded or the needed threshold not reached (min/max taxons). The plugin lets everything go through and just informs the user. One idea so far: extend the notification. The problem with this is that I have no idea what should happen in that case. Should we nuke all added terms? What if 20 are allowed and the user added 21? Should we just cut off one? If yes: Which one? Etc. As you can see, there're a lot of possible UX mine traps and I have by now no idea how to solve them. To be honest: This was just a very quick side project as it is something that is often requested. If you have any idea how to go on this, feel free to open a pull request to discuss your ideas. Thanks in advance.

License

WCM TermLimits is licensed under the MIT. Do whatever you want and feel comfortable with it. Still a tweet or similar and a star here on GitHub won't hurt, right?


All versions of termlimit with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
composer/installers Version ^1
wcm/git-php-hooks Version ^1
wcm/git-php-hooks-library Version ^1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wecodemore/termlimit contains the following files

Loading the files please wait ....