Action to unpublish node and all associated media
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
astanley 9888e1797b intitial commit 12 hours ago
config/install intitial commit 12 hours ago
src/Plugin/Action intitial commit 12 hours ago
LICENSE intitial commit 12 hours ago
README.md intitial commit 12 hours ago
composer.json intitial commit 12 hours ago
node_media_unpublish.info.yml intitial commit 12 hours ago

README.md

Node Media Unpublish

Provides a Drupal 10/11 node action named Unpublish node and associated media.

When the action is executed for a node, it:

  1. Unpublishes the node if it is currently published.
  2. Finds media entities where field_media_of references the node.
  3. Unpublishes each published media entity the current user is allowed to update.

Installation

Copy the module to web/modules/custom/node_media_unpublish, then enable it:

drush en node_media_unpublish -y
drush cr

The module installs a configured system action automatically, so it can be used from Drupal's node bulk operations/action UI.

Caution

Will unpublish the associated media, even if media is associated with multiple nodes.