Compare commits
2 Commits
2e372d5239
...
1db510e96d
Author | SHA1 | Date | |
---|---|---|---|
1db510e96d | |||
|
8326925eaf |
12
soundmap.php
12
soundmap.php
@ -92,10 +92,18 @@ if (!class_exists('Soundmap')){
|
|||||||
add_meta_box('soundmap-map', __("Place the Marker", 'soundmap'), array($this, 'map_meta_box'), 'marker', 'normal', 'high');
|
add_meta_box('soundmap-map', __("Place the Marker", 'soundmap'), array($this, 'map_meta_box'), 'marker', 'normal', 'high');
|
||||||
add_meta_box('soundmap-media-info', __("Info", 'soundmap'), array($this,'info_meta_box'), 'marker', 'side', 'high');
|
add_meta_box('soundmap-media-info', __("Info", 'soundmap'), array($this,'info_meta_box'), 'marker', 'side', 'high');
|
||||||
add_meta_box('soundmap-media-attachments', __("Media files attached.", 'soundmap'), array($this, 'attachments_meta_box'), 'marker', 'side', 'high');
|
add_meta_box('soundmap-media-attachments', __("Media files attached.", 'soundmap'), array($this, 'attachments_meta_box'), 'marker', 'side', 'high');
|
||||||
|
add_meta_box('soundmap-media-date', __("Media data registered.", 'soundmap'), array($this, 'date_meta_box'), 'marker', 'side', 'high');
|
||||||
// Ya no es necesario
|
// Ya no es necesario
|
||||||
//add_meta_box('soundmap-email', __("Uploader Mail", 'soundmap'), array($this, 'email_meta_box'), 'marker', 'side', 'low');
|
//add_meta_box('soundmap-email', __("Uploader Mail", 'soundmap'), array($this, 'email_meta_box'), 'marker', 'side', 'low');
|
||||||
} //metaboxes_register_callback
|
} //metaboxes_register_callback
|
||||||
|
|
||||||
|
function date_meta_box( $post ) {
|
||||||
|
$custom_date = get_post_meta( $post->ID, 'soundmap_marker_date', true );
|
||||||
|
?>
|
||||||
|
<input name="soundmap_marker_date" type="date" value="<?php echo $custom_date; ?>">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
function email_meta_box(){
|
function email_meta_box(){
|
||||||
global $post;
|
global $post;
|
||||||
$mail = get_post_meta($post->ID, 'EMAIL', TRUE);
|
$mail = get_post_meta($post->ID, 'EMAIL', TRUE);
|
||||||
@ -124,7 +132,7 @@ if (!class_exists('Soundmap')){
|
|||||||
$data = wp_prepare_attachment_for_js( $file );
|
$data = wp_prepare_attachment_for_js( $file );
|
||||||
$out .= "<div class='soundmap-attach-item'>
|
$out .= "<div class='soundmap-attach-item'>
|
||||||
<!-- <div class='att-icon'><img src='{$data['icon']}'/></div> -->
|
<!-- <div class='att-icon'><img src='{$data['icon']}'/></div> -->
|
||||||
<div class='att-info'><a href='{$data['url']}'><strong>{$data['title']}</strong></a><br/>
|
<div class='att-info'><strong>{$data['title']}</strong><br/>
|
||||||
<audio controls>
|
<audio controls>
|
||||||
<source src='{$data['url']}' type='{$data['mime']}'>
|
<source src='{$data['url']}' type='{$data['mime']}'>
|
||||||
</audio><br/>
|
</audio><br/>
|
||||||
@ -325,10 +333,12 @@ if (!class_exists('Soundmap')){
|
|||||||
$soundmark_lat = $_POST['soundmap_marker_lat'];
|
$soundmark_lat = $_POST['soundmap_marker_lat'];
|
||||||
$soundmark_lng = $_POST['soundmap_marker_lng'];
|
$soundmark_lng = $_POST['soundmap_marker_lng'];
|
||||||
$soundmark_author = $_POST['soundmap_marker_author'];
|
$soundmark_author = $_POST['soundmap_marker_author'];
|
||||||
|
$soundmark_date = $_POST['soundmap_marker_date'];
|
||||||
|
|
||||||
update_post_meta($post_id, 'soundmap_marker_lat', $soundmark_lat);
|
update_post_meta($post_id, 'soundmap_marker_lat', $soundmark_lat);
|
||||||
update_post_meta($post_id, 'soundmap_marker_lng', $soundmark_lng);
|
update_post_meta($post_id, 'soundmap_marker_lng', $soundmark_lng);
|
||||||
update_post_meta($post_id, 'soundmap_marker_author', $soundmark_author);
|
update_post_meta($post_id, 'soundmap_marker_author', $soundmark_author);
|
||||||
|
update_post_meta($post_id, 'soundmap_marker_date', $soundmark_date);
|
||||||
|
|
||||||
|
|
||||||
//before searching on all the $_POST array, let's take a look if there is any upload first!
|
//before searching on all the $_POST array, let's take a look if there is any upload first!
|
||||||
|
Loading…
Reference in New Issue
Block a user