/**
         * Meta Box: Extra Settings
         */
        public function call_box_admin_settings()
        {
            echo $this->form->set_current_option('screen')->open_form();
            ?>
		<fieldset class="options">
			<table class="form-table">
				<tr>
					<th><?php 
            $this->_e('Admin menu position');
            ?>
						<?php 
            echo $this->tooltip_help('Change the menu position of this plugin in "Screen Options".');
            ?>
</th>
					<td><label>
					<?php 
            echo $this->form->select('menu_position', array('admin.php' => 'Main menu', 'index.php' => $this->__('Subitem of Dashboard'), 'edit.php' => $this->__('Subitem of Posts'), 'upload.php' => $this->__('Subitem of Media'), 'link-manager.php' => $this->__('Subitem of Links'), 'edit.php?post_type=page' => $this->__('Subitem of Pages'), 'edit-comments.php' => $this->__('Subitem of Comments'), 'themes.php' => $this->__('Subitem of Appearance'), 'plugins.php' => $this->__('Subitem of Plugins'), 'users.php' => $this->__('Subitem of Users'), 'tools.php' => $this->__('Subitem of Tools'), 'options-general.php' => $this->__('Subitem of Settings')));
            ?>
					</label></td>
				</tr>
			</table>
		</fieldset>
<?php 
            echo $this->form->submit();
            echo $this->form->close_form();
        }
Esempio n. 2
0
	/**
	 * Meta Box: Style Settings
	 */
	public function call_box_style_settings() {
		echo $this->form->set_current_option( 'style' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:300px;"><?php $this->_e( 'Set icon for external link' ) ?>
						<?php echo $this->tooltip_help( 'Set an icon that wll be shown for external links. See example on the right side.' ) ?></th>
				<td>
					<div>
						<div style="width:15%;float:left">
							<label><?php echo $this->form->radio( 'icon', 0 ); ?>
							<span><?php $this->_e( 'No icon' ) ?></span></label>
						<?php for ( $x = 1; $x <= 20; $x++ ): ?>
							<br/>
							<label title="<?php echo sprintf( $this->__( 'Icon %1$s: choose this icon to show for all external links or add the class \'ext-icon-%1$s\' to a specific link.' ), $x ) ?>">
							<?php echo $this->form->radio( 'icon', $x ); ?>
							<img src="<?php echo plugins_url( 'images/external-'. $x .'.png', $this->plugin_file ) ?>" /></label>
							<?php if ( $x % 5 == 0 ): ?>
						</div>
						<div style="width:15%;float:left">
							<?php endif; ?>
						<?php endfor; ?>
						</div>
						<div style="width:29%;float:left;"><span class="description"><?php $this->_e( 'Example:' ) ?></span>
							<br/><img src="<?php echo plugins_url( 'images/link-icon-example.png', $this->plugin_file ) ?>"	/>
						</div>
						<br style="clear:both" />
					</div>
				</td>
			</tr>
			<tr>
				<th style="width:300px;"><?php $this->_e( 'Set no-icon class' ) ?>
						<?php echo $this->tooltip_help( 'Set this class for links, that should not have the external link icon.' ) ?></th>
				<td><label><?php echo $this->form->text( 'no_icon_class', array( 'class' => '' ) ); ?></label>
					<label><?php echo $this->form->checkbox( 'no_icon_same_window', 1 ); ?>
					<span><?php $this->_e( 'Always open links with no-icon class in same window or tab' ) ?></span></label>
						<?php echo $this->tooltip_help( 'When enabled external links containing the no-icon class will always be opened in the current window or tab. No matter which target is set.' ) ?>
				</td>
			</tr>
			</table>
		</fieldset>
<?php
		echo $this->form->submit();
		echo $this->form->close_form();
	}
	/**
	 * Meta Box: Extra Settings
	 */
	public function call_box_extra_settings() {
		echo $this->form->set_current_option( 'extra' )->open_form();
?>
		<fieldset class="options">
			<table class="form-table">
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Solving problems' ) ?>
						<?php echo $this->tooltip_help( 'Some options to try when a problem occurs. These options can also cause other problems, so be carefull.' ) ?></th>
				<td><label><?php echo $this->form->checkbox( 'fix_js', 1 ); ?>
						<span><?php $this->_e( 'Replacing <code>&lt;/a&gt;</code> with <code>&lt;\/a&gt;</code> in JavaScript code.' ) ?></span></label>
						<?php echo $this->tooltip_help( 'By replacing </a> with <\/a> in JavaScript code these tags will not be processed by the plugin.' ) ?>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Use phpQuery library' ) ?>
						<?php echo $this->tooltip_help( 'Using phpQuery library for manipulating links. This option is experimental.' ) ?></th>
				<td><label><?php echo $this->form->checkbox( 'phpquery', 1 ); ?>
						<span><?php $this->_e( 'Use phpQuery for parsing document.' ) ?></span>
						<span class="description">(Test it first!)</span></label>
				</td>
			</tr>
			<tr class="filter_excl_sel" <?php echo ( $this->form->value( 'phpquery' ) ) ? '' : 'style="display:none;"'; ?>>
				<th><?php $this->_e( 'Do NOT apply settings on...' ) ?>
					<?php echo $this->tooltip_help( 'The external links of these selection will be excluded for the settings of this plugin. Define the selection by using CSS selectors.' ) ?></th>
				<td><label><?php echo $this->form->textarea( 'filter_excl_sel' ); ?>
						<span class="description"><?php _e( 'Define selection by using CSS selectors, f.e.: <code>.excl-ext-link, .entry-title, #comments-title</code> (look <a href="http://code.google.com/p/phpquery/wiki/Selectors" target="_blank">here</a> for available selectors).' ) ?></span></label>
				</td>
			</tr>
			<tr>
				<th style="width:250px;"><?php $this->_e( 'Plugin menu position' ) ?>
					<?php echo $this->tooltip_help( 'Change the menu position of this plugin in "Screen Options".' ) ?></th>
				<td><label><a id="admin_menu_position" href="#"><?php _e( 'Change menu position' ) ?></a></label>
				</td>
			</tr>
			</table>
		</fieldset>
<?php
		echo $this->form->submit();
		echo $this->form->close_form();
	}