]> Johnzone git - wordpress_presale.git/commitdiff
small stuff master
authorJohn Janus <mail@johnzone.org>
Tue, 28 Feb 2017 16:12:54 +0000 (17:12 +0100)
committerJohn Janus <mail@johnzone.org>
Tue, 28 Feb 2017 16:12:54 +0000 (17:12 +0100)
.gitignore
wp-show-metaboxes.php

index d9848459c600a23ffaa2d95639ef956b7ffa1b69..217c827e5a7e53ba26374e524c27efd57f340177 100644 (file)
@@ -1,3 +1,6 @@
 *~
 *.swp
 *.backup
+.buildpath
+.project
+.settings/
index 170a6f0d724a450cc7849face70a9563b73b3d3d..987d8df89773b79729196589e2c80e16267e7cf0 100644 (file)
@@ -1,33 +1,26 @@
 <?php
-
 function presale_add_custom_metabox() {
-    add_meta_box(
-        'presale_meta',
-        __ ('Show Presale'),
-        'presale_meta_callback',
-        'presale_show',
-        'normal',
-        'high'
-    );
+  add_meta_box ( 'presale_meta', __ ( 'Show Presale' ), 'presale_meta_callback', 'presale_show', 'normal', 'high' );
 }
 
-add_action( 'add_meta_boxes', 'presale_add_custom_metabox');
-
-function presale_meta_callback( $post ) {
-    wp_nonce_field ( basename( __FILE__ ), 'presale_nonce');
-    $presale_stored_data = get_post_meta( $post->ID);
-    ?>
-    <div>
-        <div class="meta-row">
-            <div class="meta-th"><label for="presale-seats" class="show-title">Show ID</label></div>
-            <div class="meta-td">
-                <input type="text" name="presale-seats" id="presale-seats" 
-                    value="<?php if (!empty ( $presale_stored_data['presal-seats'])) echo esc_attr( $presale_stored_data['presal-seats'][0] ) ?>">
-                </input>
-            </div>
-        </div>
-    </div>
-    <?php
+add_action ( 'add_meta_boxes', 'presale_add_custom_metabox' );
+function presale_meta_callback($post) {
+  wp_nonce_field ( basename ( __FILE__ ), 'presale_nonce' );
+  $presale_stored_data = get_post_meta ( $post->ID );
+  ?>
+<div>
+       <div class="meta-row">
+               <div class="meta-th">
+                       <label for="presale-seats" class="show-title">Seats</label>
+               </div>
+               <div class="meta-td">
+                       <input type="text" name="presale-seats" id="presale-seats"
+                               value="<?php if (!empty ( $presale_stored_data['presal-seats'])) echo esc_attr( $presale_stored_data['presal-seats'][0] ) ?>">
+                       </input>
+               </div>
+       </div>
+</div>
+<?php
 }