Add "General - No ThickBox" option. You can specify class attribute names that do not apply ThickBox. e.g. nothickbox, no_thickbox
This commit is contained in:
1 parent
28652e6232
commit
5d5380d4e6
2 files changed
+15
-1
No files matched your search
@@ -93,6 +93,13 @@ jQuery(function($) {
|
||||
<?php _e('Links with target attribute', 'auto-thickbox'); ?> (<code><a target="_blank"></code>)</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('No ThickBox', 'auto-thickbox'); ?></th>
|
||||
<td>
|
||||
<label><?php _e('Input class attribute values separated by space', 'auto-thickbox'); ?> (<code><a class="nothickbox"></code>)<br />
|
||||
<input type="text" name="auto-thickbox-plus[no_thickbox]" value="<?php $this->esc_attr($this->options['no_thickbox']); ?>" class="regular-text" /></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Auto Resize', 'auto-thickbox'); ?></th>
|
||||
<td>
|
||||
|
||||
+8
-1
@@ -72,7 +72,13 @@ class auto_thickbox {
|
||||
$anchor['attr']['class'][] = 'thickbox';
|
||||
$anchor['attr']['class'][] = 'no_icon';
|
||||
} else {
|
||||
if ( !in_array('thickbox', $anchor['attr']['class']) && !in_array('nothickbox', $anchor['attr']['class']) && !in_array('no_thickbox', $anchor['attr']['class']) )
|
||||
$no_thickbox_found;
|
||||
foreach ( explode(' ', trim($this->options['no_thickbox'])) as $no_thickbox ) {
|
||||
$no_thickbox_found = in_array($no_thickbox, $anchor['attr']['class']);
|
||||
if ( $no_thickbox_found )
|
||||
break;
|
||||
}
|
||||
if ( !in_array('thickbox', $anchor['attr']['class']) && !$no_thickbox_found )
|
||||
$anchor['attr']['class'][] = 'thickbox';
|
||||
if ( !in_array('no_icon', $anchor['attr']['class']) && !in_array('noicon', $anchor['attr']['class']) )
|
||||
$anchor['attr']['class'][] = 'no_icon';
|
||||
@@ -425,6 +431,7 @@ SCRIPT;
|
||||
'thickbox_style' => 'single',
|
||||
'thickbox_text' => 'on',
|
||||
'thickbox_target' => 'off',
|
||||
'no_thickbox' => 'nothickbox no_thickbox ',
|
||||
'auto_resize' => 'on',
|
||||
'builtin_res' => 'off',
|
||||
'script_place' => 'header',
|
||||
|
||||
Reference in new issue
Block a user