Exemplo n.º 1
0
    /**
     * Options page
     *
     */
    function options_page()
    {
        ?>
		<div class="wrap">

			<h2>
				<a target='_blank' href='http://wphostreviews.com/mappress'><img alt='MapPress' title='MapPress' src='<?php 
        echo plugins_url('images/mappress_logo_med.png', __FILE__);
        ?>
'></a>
				<span style='font-size: 12px'><?php 
        echo Mappress::get_support_links();
        ?>
</span>
			</h2>

			<div id="poststuff" class="metabox-holder has-right-sidebar">
				<div id="side-info-column" class="inner-sidebar">
					<?php 
        // Output sidebar metaboxes
        if (!class_exists('Mappress_Pro')) {
            add_meta_box('metabox_like', __('Like this plugin?', 'mappress'), array(&$this, 'metabox_like'), 'mappress_sidebar', 'side', 'core');
        }
        add_meta_box('metabox_demo', __('Sample Map', 'mappress'), array(&$this, 'metabox_demo'), 'mappress_sidebar', 'side', 'core');
        do_meta_boxes('mappress_sidebar', 'side', null);
        ?>
				</div>

				<div id="post-body">
					<div id="post-body-content" class="has-sidebar-content">
						<form action="options.php" method="post">
							<?php 
        // Nonces needed to remember metabox open/closed settings
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
        // Output the option settings as metaboxes
        settings_fields('mappress');
        $this->do_settings_sections('mappress');
        ?>
							<br/>

							<input name='submit' type='submit' class='button-primary' value='<?php 
        _e("Save Changes", 'mappress');
        ?>
' />
							<input name='reset_defaults' type='submit' class='button' value='<?php 
        _e("Reset Defaults", 'mappress');
        ?>
' />
						</form>
					</div>
				</div>
			</div>
		</div>
		<script type='text/javascript'>
			jQuery(document).ready( function() {
				// Initialize metaboxes
				postboxes.add_postbox_toggles('mappress');
			});
		</script>
		<?php 
    }
Exemplo n.º 2
0
<div class='mapp-m-panel'>
	<div>
		<a target='_blank' style='vertical-align: middle;text-decoration:none'  href='http://wphostreviews.com/mappress'>
			<img alt='MapPress' title='MapPress' src='<?php 
echo Mappress::$baseurl . '/images/mappress_logo_small.png';
?>
' />
		</a>
		<?php 
echo Mappress::get_support_links();
?>
	</div>
	<hr/>

	<div id='mapp_m_list_panel' style='display:none'>
		<b><?php 
_e('Maps for This Post', 'mappress');
?>
</b>
		<input class='button' type='button' id='mapp_m_add_map' value='<?php 
esc_attr_e('New Map', 'mappress');
?>
' />
		<div id='mapp_m_maplist'>
			<?php 
echo Mappress_Map::get_map_list();
?>
		</div>
	</div>

	<div id='mapp_m_edit_panel' style='display:none'>