| 1 |
<?php |
| 2 |
// options for Links |
| 3 |
?> |
| 4 |
|
| 5 |
<div id="poststuff" class="ui-sortable meta-box-sortables"> |
| 6 |
<div class="postbox"> |
| 7 |
<div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div> |
| 8 |
<h3 class="hndle" id="links_options"><?php _e('Links options', FB_ADMINIMIZE_TEXTDOMAIN ); ?></h3> |
| 9 |
<div class="inside"> |
| 10 |
<br class="clear" /> |
| 11 |
|
| 12 |
<table summary="config_edit_links" class="widefat"> |
| 13 |
<thead> |
| 14 |
<tr> |
| 15 |
<th><?php _e('Option', FB_ADMINIMIZE_TEXTDOMAIN ); ?></th> |
| 16 |
<?php |
| 17 |
foreach ($user_roles_names as $role_name) { ?> |
| 18 |
<th><?php _e('Deactivate for', FB_ADMINIMIZE_TEXTDOMAIN ); echo '<br/>' . $role_name; ?></th> |
| 19 |
<?php } ?> |
| 20 |
</tr> |
| 21 |
</thead> |
| 22 |
|
| 23 |
<tbody> |
| 24 |
<?php |
| 25 |
foreach ($user_roles as $role) { |
| 26 |
$disabled_link_option_[$role] = _mw_adminimize_getOptionValue('mw_adminimize_disabled_link_option_'. $role .'_items'); |
| 27 |
} |
| 28 |
|
| 29 |
$link_options = array( |
| 30 |
'#namediv', |
| 31 |
'#addressdiv', |
| 32 |
'#descriptiondiv', |
| 33 |
'#linkcategorydiv', |
| 34 |
'#linktargetdiv', |
| 35 |
'#linkxfndiv', |
| 36 |
'#linkadvanceddiv', |
| 37 |
'#misc-publishing-actions' |
| 38 |
); |
| 39 |
|
| 40 |
$link_options_names = array( |
| 41 |
__('Name'), |
| 42 |
__('Web Address'), |
| 43 |
__('Description'), |
| 44 |
__('Categories'), |
| 45 |
__('Target'), |
| 46 |
__('Link Relationship (XFN)'), |
| 47 |
__('Advanced'), |
| 48 |
__('Publish Actions', FB_ADMINIMIZE_TEXTDOMAIN) |
| 49 |
); |
| 50 |
|
| 51 |
$_mw_adminimize_own_link_values = _mw_adminimize_getOptionValue('_mw_adminimize_own_link_values'); |
| 52 |
$_mw_adminimize_own_link_values = preg_split( "/\r\n/", $_mw_adminimize_own_link_values ); |
| 53 |
foreach ( (array) $_mw_adminimize_own_link_values as $key => $_mw_adminimize_own_link_value ) { |
| 54 |
$_mw_adminimize_own_link_value = trim($_mw_adminimize_own_link_value); |
| 55 |
array_push($link_options, $_mw_adminimize_own_link_value); |
| 56 |
} |
| 57 |
|
| 58 |
$_mw_adminimize_own_link_options = _mw_adminimize_getOptionValue('_mw_adminimize_own_link_options'); |
| 59 |
$_mw_adminimize_own_link_options = preg_split( "/\r\n/", $_mw_adminimize_own_link_options ); |
| 60 |
foreach ( (array) $_mw_adminimize_own_link_options as $key => $_mw_adminimize_own_link_option ) { |
| 61 |
$_mw_adminimize_own_link_option = trim($_mw_adminimize_own_link_option); |
| 62 |
array_push($link_options_names, $_mw_adminimize_own_link_option); |
| 63 |
} |
| 64 |
|
| 65 |
$x = 0; |
| 66 |
foreach ($link_options as $index => $link_option) { |
| 67 |
if ( $link_option != '') { |
| 68 |
$checked_user_role_ = array(); |
| 69 |
foreach ($user_roles as $role) { |
| 70 |
$checked_user_role_[$role] = ( isset($disabled_link_option_[$role]) && in_array($link_option, $disabled_link_option_[$role]) ) ? ' checked="checked"' : ''; |
| 71 |
} |
| 72 |
echo '<tr>' . "\n"; |
| 73 |
echo '<td>' . $link_options_names[$index] . ' <span style="color:#ccc; font-weight: 400;">(' . $link_option . ')</span> </td>' . "\n"; |
| 74 |
foreach ($user_roles as $role) { |
| 75 |
echo '<td class="num"><input id="check_post'. $role . $x .'" type="checkbox"' . $checked_user_role_[$role] . ' name="mw_adminimize_disabled_link_option_'. $role .'_items[]" value="' . $link_option . '" /></td>' . "\n"; |
| 76 |
} |
| 77 |
echo '</tr>' . "\n"; |
| 78 |
$x++; |
| 79 |
} |
| 80 |
} |
| 81 |
?> |
| 82 |
</tbody> |
| 83 |
</table> |
| 84 |
|
| 85 |
<?php |
| 86 |
//your own global options |
| 87 |
?> |
| 88 |
<br style="margin-top: 10px;" /> |
| 89 |
<table summary="config_edit_post" class="widefat"> |
| 90 |
<thead> |
| 91 |
<tr> |
| 92 |
<th><?php _e('Your own options', FB_ADMINIMIZE_TEXTDOMAIN ); echo '<br />'; _e('ID or class', FB_ADMINIMIZE_TEXTDOMAIN ); ?></th> |
| 93 |
<th><?php echo '<br />'; _e('Option', FB_ADMINIMIZE_TEXTDOMAIN ); ?></th> |
| 94 |
</tr> |
| 95 |
</thead> |
| 96 |
|
| 97 |
<tbody> |
| 98 |
<tr valign="top"> |
| 99 |
<td colspan="2"><?php _e('It is possible to add your own IDs or classes from elements and tags. You can find IDs and classes with the FireBug Add-on for Firefox. Assign a value and the associate name per line.', FB_ADMINIMIZE_TEXTDOMAIN ); ?></td> |
| 100 |
</tr> |
| 101 |
<tr valign="top"> |
| 102 |
<td> |
| 103 |
<textarea name="_mw_adminimize_own_link_options" cols="60" rows="3" id="_mw_adminimize_own_link_options" style="width: 95%;" ><?php echo _mw_adminimize_getOptionValue('_mw_adminimize_own_link_options'); ?></textarea> |
| 104 |
<br /> |
| 105 |
<?php _e('Possible nomination for ID or class. Separate multiple nominations through a carriage return.', FB_ADMINIMIZE_TEXTDOMAIN ); ?> |
| 106 |
</td> |
| 107 |
<td> |
| 108 |
<textarea class="code" name="_mw_adminimize_own_link_values" cols="60" rows="3" id="_mw_adminimize_own_link_values" style="width: 95%;" ><?php echo _mw_adminimize_getOptionValue('_mw_adminimize_own_link_values'); ?></textarea> |
| 109 |
<br /> |
| 110 |
<?php _e('Possible IDs or classes. Separate multiple values through a carriage return.', FB_ADMINIMIZE_TEXTDOMAIN ); ?> |
| 111 |
</td> |
| 112 |
</tr> |
| 113 |
</tbody> |
| 114 |
</table> |
| 115 |
|
| 116 |
<p id="submitbutton"> |
| 117 |
<input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_insert" /> |
| 118 |
<input class="button button-primary" type="submit" name="_mw_adminimize_save" value="<?php _e('Update Options', FB_ADMINIMIZE_TEXTDOMAIN ); ?> »" /><input type="hidden" name="page_options" value="'dofollow_timeout'" /> |
| 119 |
</p> |
| 120 |
|
| 121 |
<p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p> |
| 122 |
|
| 123 |
</div> |
| 124 |
</div> |
| 125 |
</div> |