Download the PHP package cloakwp/media-categories without Composer

On this page you can find all versions of the php package cloakwp/media-categories. 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 media-categories

Media Categories

Core-like media categories for WordPress — PHP-configured, no settings UI, no admin notices, no premium upsells.

Organize attachments with a hierarchical Media Categories taxonomy (category_media by default). Configure everything in PHP; the only admin UI is the Media Library itself (filters, checklists, bulk assign, add-new from the attachment sidebar).

Install paths

1. Composer (must-use plugin) — recommended

Package type is wordpress-muplugin. With composer/installers configured, that installs to:

(Your project may map that path differently — e.g. Bedrock uses public/app/mu-plugins/.)

Important: WordPress core only auto-loads PHP files directly in mu-plugins/. It does not load plugins nested in subdirectories like mu-plugins/media-categories/media-categories.php. You need an autoloader (or a tiny stub) for subdirectory must-use plugins.

Recommended: Roots Bedrock Autoloader — it scans mu-plugins/*/*.php for plugin headers and includes them. Ships with Bedrock; usable in any WordPress project as roots/bedrock-autoloader. Once loaded, this package shows under Plugins → Must-Use (not the toggleable Plugins list).

Without an autoloader, add a one-line stub at the mu-plugins root:

Optional fluent config in your theme functions.php (runs before the deferred default boot):

If you never call register(), the plugin bootstrap starts with defaults on init priority 1.

2. Traditional plugin install (download as a zip)

For sites that don’t use Composer — install it like any other WordPress plugin:

  1. Open the GitHub repository page.
  2. Click the green Code button, then Download ZIP.
  3. Unzip the file. You’ll get a folder named something like cloakwp-media-categories-main.
  4. Rename that folder to media-categories (optional but keeps the Plugins list tidy).
  5. Install it in either way:
    • WordPress admin: Plugins → Add New → Upload Plugin → choose the zip (re-zip the renamed folder if you renamed it) → Install Now → Activate, or
    • Manually: upload the media-categories folder into wp-content/plugins/ on your server (via FTP/SFTP or your host’s file manager), then go to Plugins and click Activate.

Same defaults as the Composer path. Developers can still override config via fluent register() or the config filter (below). No mu-plugin autoloader needed.

Fluent API

manageRoles vs assignRoles

Method Capability Who can…
manageRoles manage_media_categories Create, rename, parent, delete categories (incl. “Add New” in the sidebar)
assignRoles assign_media_categories Check categories on attachments, filter, bulk add/remove

Assignment also requires edit_post on the attachment. Same split as WordPress manage_categories / assign_categories.

Config filter

Admin features

Data model

Uses core taxonomy tables only (wp_terms, wp_term_taxonomy, wp_term_relationships) via wp_set_object_terms(). No custom tables, no options UI that saves config to the database (configure via PHP).

Default taxonomy slug: category_media.

Compatibility note: If you currently use WP Media Category Management, deactivate that plugin and activate this one. Assignments live in core term tables:

Architecture (Core + Plugin)

Media Library list/grid/modal filtering uses CloakWP\Core\Media\LibraryFilter (shared with Media Orientation). This package supplies the custom hierarchical UI and taxonomy query; the primitive owns restrict_manage_posts, pre_get_posts, ajax_query_attachments_args, and AttachmentsBrowser toolbar patching.

Development

License

LGPL-3.0-only


All versions of media-categories with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
composer/installers Version ^1.0 || ^2.2
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 cloakwp/media-categories contains the following files

Loading the files please wait ...