Skip to content

Commit

Permalink
Change hook priority to fix issue with AutoSmush module.
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbj committed Dec 10, 2017
1 parent a88b1f2 commit 5ae6c3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions ProcessCustomUploadNames.css
@@ -1,8 +1,6 @@
.cun-header {
border: none;
background: #ccc;
border: none !important;
background: #ccc !important;
color: #000 !important;
outline: 1px solid #ccc;
outline-color: #ccc;
padding: 4px !important;
}
4 changes: 2 additions & 2 deletions ProcessCustomUploadNames.module
Expand Up @@ -26,7 +26,7 @@ class ProcessCustomUploadNames extends WireData implements Module, ConfigurableM
public static function getModuleInfo() {
return array(
'title' => __('Custom Upload Names'),
'version' => '1.0.4',
'version' => '1.0.5',
'author' => 'Adrian Jones',
'summary' => __('Automatically rename file/image uploads according to a configurable format'),
'href' => 'http://modules.processwire.com/modules/process-custom-upload-names/',
Expand Down Expand Up @@ -95,7 +95,7 @@ class ProcessCustomUploadNames extends WireData implements Module, ConfigurableM
//page in the admin
$processPage = $this->wire('page');
if($processPage->process && in_array('WirePageEditor', class_implements((string) $processPage->process))) {
$this->addHookBefore('InputfieldFile::fileAdded', $this, 'customRenameUploads');
$this->addHookBefore('InputfieldFile::fileAdded', $this, 'customRenameUploads', array('priority'=>10));
}
//front-end API
else {
Expand Down

0 comments on commit 5ae6c3c

Please sign in to comment.