Can we add a hook_media_browser_fake_buttons_alter()?

I have an issue getting my Sticky Edit Actions module to work correctly since Media plugins currently don't use real forms in the media browser. Attached is a patch to add an alter that allows me to add a class to the buttons to get things working correctly.

There is an open issue to use real forms for plugins at #1558042: Refactor Views plugin code as a form rather than raw html and would make this issue moot as things would 'just work' then.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Elijah Lynn’s picture

Status: Active » Needs review
FileSize
486 bytes

Adding patch.

deviantintegral’s picture

Patch is good, but we're missing docs in media.api.php.

Elijah Lynn’s picture

Thanks Andrew!

Here is some docs ripped from the related Sticky Edit Actions patch.

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 5 year old patch in #3 to media.api.php does not apply to the latest media 7.x-2.x-dev and if still relevant needs to be rerolled.

Checking patch includes/media.browser.inc...
Hunk #1 succeeded at 99 (offset 11 lines).
Checking patch media.api.php...
error: while searching for:
  $stored_params['types'][] = 'document';
  unset($stored_params['enabledPlugins'][0]);
}

error: patch failed: media.api.php:102
error: media.api.php: patch does not apply
joseph.olstad’s picture

Status: Needs work » Closed (won't fix)

feel free to submit a rerolled patch and I will consider re-openning if you need this and want it reviewed