コード例 #1
0
 private static function saveData()
 {
     if (isset($_POST['gmsites-options'])) {
         $options = $_POST['options'];
         self::$updated = true;
         if ((object) $options != GoogleMapsSites::options()) {
             self::$updated = update_site_option('_google_maps_sites_options', $options);
         }
     }
 }
コード例 #2
0
<div class="wrap">
	<h1><span style="width: 30px; height: 30px; font-size: 30px;" class="dashicons dashicons-admin-site"></span> <?php 
echo $pageTitle;
?>
</h1>
	
	<form method="post">
		<?php 
GMAdmin::callback();
?>
		
		<input type="hidden" name="gmsites-options" />
		
		<table class="form-table">
			<tr>
				<th scope="row"><label for="gmsites-api-key"><?php 
_e('Chave da API');
?>
</label></th>
				<td><input id="gmsites-api-key" name="options[apikey]" class="regular-text" value="<?php 
echo $apikey;
?>
"></tr>
			</tr>
			<tr>
				<th scope="row"><label for="gmsites-map-id"><?php 
_e('ID do Mapa');
?>
</label></th>
				<td><input id="gmsites-map-id" name="options[mapid]" class="regular-text" value="<?php 
echo $mapid;