function emodal_admin_modal_form_tab_close_settings_esc_press()
{
    ?>
<tr>
		<th scope="row"><?php 
    _e('Press ESC to Close', 'easy-modal');
    ?>
</th>
		<td>
			<input type="checkbox" value="true" name="modal[meta][close][esc_press]" id="close_esc_press" <?php 
    echo get_current_modal('meta.close.esc_press') ? 'checked="checked" ' : '';
    ?>
/>
			<label for="close_esc_press" class="description"><?php 
    _e('Checking this will cause modal to close when user presses ESC key.', 'easy-modal');
    ?>
</label>
		</td>
	</tr><?php 
}
Ejemplo n.º 2
0
function emodal_admin_modal_form_general_tab_settings_content()
{
    ?>
<tr>
		<th scope="row">
			<label for="content">
				<?php 
    _e('Content', EMCORE_SLUG);
    ?>
			</label>
		</th>
		<td>
			<?php 
    $settings = array('textarea_name' => 'modal[content]', 'wpautop' => false);
    if (!function_exists('wp_editor')) {
        the_editor(get_current_modal('content'), "content", $settings);
    } else {
        wp_editor(get_current_modal('content'), "content", $settings);
    }
    ?>
			<p class="description"><?php 
    _e('Modal content. Can contain shortcodes.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr><?php 
}
Ejemplo n.º 3
0
function emodal_admin_modal_form_display_tab_settings_position()
{
    ?>
<tr class="title-divider">
		<th colspan="2"><h3 class="title"><?php 
    _e('Position', EMCORE_SLUG);
    ?>
</h3></th>
	</tr>
	<tr>
		<th scope="row">
			<label for="display_location"><?php 
    _e('Location', EMCORE_SLUG);
    ?>
</label>
		</th>
		<td>
			<select name="modal[meta][display][location]" id="display_location">
			<?php 
    foreach (apply_filters('emodal_modal_display_location_options', array()) as $option => $value) {
        ?>
				<option
					value="<?php 
        echo $value;
        ?>
"
					<?php 
        echo $value == get_current_modal('meta.display.location') ? ' selected="selected"' : '';
        ?>
				><?php 
        echo $option;
        ?>
</option>
			<?php 
    }
    ?>
			</select>
			<p class="description"><?php 
    _e('Choose which corner the close button will be positioned.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr>
	<tr>
		<th scope="row"><?php 
    _e('Fixed Postioning', EMCORE_SLUG);
    ?>
</th>
		<td>
			<input type="checkbox" value="true" name="modal[meta][display][position][fixed]" id="display_position_fixed" <?php 
    echo get_current_modal('meta.display.position.fixed') ? 'checked="checked" ' : '';
    ?>
/>
			<label for="display_position_fixed" class="description"><?php 
    _e('Checking this sets the positioning of the modal to fixed.', EMCORE_SLUG);
    ?>
</label>
		</td>
	</tr>
	<tr class="top">
		<th scope="row">
			<label for="display_position_top"><?php 
    _e('Top', EMCORE_SLUG);
    ?>
</label> 
		</th>
		<td>
			<input type="range" name="modal[meta][display][position][top]" id="display_position_top" min="0" max="500" step="1" value="<?php 
    esc_attr_e(get_current_modal('meta.display.position.top'));
    ?>
" />
			<span class="range-value regular-text"><span class="value"><?php 
    esc_html_e(get_current_modal('meta.display.position.top'));
    ?>
</span>px</span>
			<p class="description"><?php 
    _e('Distance from the top edge of the screen.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr>
	<tr class="bottom">
		<th scope="row">
			<label for="display_position_bottom"><?php 
    _e('Bottom', EMCORE_SLUG);
    ?>
</label> 
		</th>
		<td>
			<input type="range" name="modal[meta][display][position][bottom]" id="display_position_bottom" min="0" max="500" step="1" value="<?php 
    esc_attr_e(get_current_modal('meta.display.position.bottom'));
    ?>
" />
			<span class="range-value regular-text"><span class="value"><?php 
    esc_html_e(get_current_modal('meta.display.position.bottom'));
    ?>
</span>px</span>
			<p class="description"><?php 
    _e('Distance from the bottom edge of the screen.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr>
	<tr class="left">
		<th scope="row">
			<label for="display_position_left"><?php 
    _e('Left', EMCORE_SLUG);
    ?>
</label> 
		</th>
		<td>
			<input type="range" name="modal[meta][display][position][left]" id="display_position_left" min="0" max="500" step="1" value="<?php 
    esc_attr_e(get_current_modal('meta.display.position.left'));
    ?>
" />
			<span class="range-value regular-text"><span class="value"><?php 
    esc_html_e(get_current_modal('meta.display.position.left'));
    ?>
</span>px</span>
			<p class="description"><?php 
    _e('Distance from the left edge of the screen.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr>
	<tr class="right">
		<th scope="row">
			<label for="display_position_right"><?php 
    _e('Right', EMCORE_SLUG);
    ?>
</label> 
		</th>
		<td>
			<input type="range" name="modal[meta][display][position][right]" id="display_position_right" min="0" max="500" step="1" value="<?php 
    esc_attr_e(get_current_modal('meta.display.position.right'));
    ?>
" />
			<span class="range-value regular-text"><span class="value"><?php 
    esc_html_e(get_current_modal('meta.display.position.right'));
    ?>
</span>px</span>
			<p class="description"><?php 
    _e('Distance from the right edge of the screen.', EMCORE_SLUG);
    ?>
</p>
		</td>
	</tr><?php 
}
Ejemplo n.º 4
0
function emodal_admin_modal_form_examples_tab_settings()
{
    $modal = get_current_modal();
    ?>
<h4>
		<?php 
    _e('Copy this class to the link/button you want to open this modal.', EMCORE_SLUG);
    ?>
		<span class="desc">eModal-<?php 
    esc_html_e($modal->id);
    ?>
</span>
	</h4>
	<div class="tab-box">
		<h4><?php 
    _e('Link Example', EMCORE_SLUG);
    ?>
</h4>
		<a href="#" onclick="return false;" class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
"><?php 
    _e('Open Modal', EMCORE_SLUG);
    ?>
</a>
		<pre>&lt;a href="#" class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
"><?php 
    _e('Open Modal', EMCORE_SLUG);
    ?>
&lt;/a></pre>
	</div>
	<div class="tab-box">
		<h4><?php 
    _e('Button Example', EMCORE_SLUG);
    ?>
</h4>
		<button onclick="return false;" class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
"><?php 
    _e('Open Modal', EMCORE_SLUG);
    ?>
</button>
		<pre>&lt;button class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
"><?php 
    _e('Open Modal', EMCORE_SLUG);
    ?>
&lt;/button></pre>
	</div>
	<div class="tab-box">
		<h4><?php 
    _e('Image Example', EMCORE_SLUG);
    ?>
</h4>
		<img style="cursor:pointer;" src="<?php 
    echo EMCORE_URL;
    ?>
/assets/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
" />
		<pre>&lt;img src="easy-modal-icon.png" class="eModal-<?php 
    esc_html_e($modal->id);
    ?>
" /></pre>
	</div><?php 
}