~caleb-ellis/resource-centre/remove-youtube-metabox

« back to all changes in this revision

Viewing changes to functions/metaboxes.php

  • Committer: Caleb Ellis
  • Date: 2018-02-15 12:28:02 UTC
  • Revision ID: caleb.ellis@canonical.com-20180215122802-8m0y9kcj5xno9uo7
Remove YouTube metabox from admin page

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
    }
208
208
}
209
209
 
210
 
//Adds the youtube box in admin
211
 
function custom_post_video() {
212
 
    global $post;
213
 
    ?>
214
 
    <div class="inside">
215
 
        <p>
216
 
                <label for="postVideo">Code</label>
217
 
                <input type="text" name="postVideo" id="postVideo" value="<?php echo get_post_meta($post->ID, 'postVideo', true); ?>">
218
 
        </p>
219
 
        <p>Enter the YouTube video 11 digit code here e.g from this url http://www.youtube.com/watch?v=D6z6hn6wZlg you need the 11 digits after ?v= i.e <strong>D6z6hn6wZlg</strong></p>
220
 
 
221
 
        <p>Enter the codes comma separated (no space) if you have more than one e.g: <strong>h384z7Ph0gU,5_4fXQcxFRs</strong></p>
222
 
    </div>
223
 
<?php
224
 
}
225
 
 
226
210
add_action('save_post', 'custom_add_save');
227
211
 
228
212
function custom_add_save($postID){