NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<?php/*----------------------------------------------------------------------------------- Add Post Format meta boxes-----------------------------------------------------------------------------------*//*-----------------------------------------------------------------------------------*//* Define Metabox Fields/*-----------------------------------------------------------------------------------*/$prefix = 'tj_';$meta_box_video = array( 'id' => 'tj-meta-box-video', 'title' => __('Video Settings', 'themejunkie'), 'page' => 'post', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( "name" => __('Video Embed Code','themejunkie'), "desc" => __('Here you could enter the video embed code.','themejunkie'), "id" => $prefix."video_embed", "type" => "textarea" ), array( "name" => __('Video Thumbnail URL','themejunkie'), "desc" => __('Specify an image here or set Featured Image as the video thumbnail. (best size: 216px x 120px)','themejunkie'), "id" => $prefix."video_img_url", "type" => "text", ) ));add_action('admin_menu', 'tj_add_box');/*-----------------------------------------------------------------------------------*//* Add metabox to edit page/*-----------------------------------------------------------------------------------*/function tj_add_box() { global $meta_box_video; add_meta_box($meta_box_video['id'], $meta_box_video['title'], 'tj_show_box_video', $meta_box_video['page'], $meta_box_video['context'], $meta_box_video['priority']);}function tj_show_box_video() { global $meta_box_video, $post; echo '<p style="padding:10px 0 0 0;">'.__('You could fill the video details below.', 'themejunkie').'</p>'; // Use nonce for verification echo '<input type="hidden" name="tj_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />'; echo '<table class="form-table">'; foreach ($meta_box_video['fields'] as $field) { // get current post meta data $meta = get_post_meta($post->ID, $field['id'], true); switch ($field['type']) { //If Text case 'text': echo '<tr>', '<th style="width:25%"><label for="', $field['id'], '"><strong>', $field['name'], '</strong><span style=" display:block; color:#999; margin:5px 0 0 0; line-height: 18px;">'. $field['desc'].'</span></label></th>', '<td>'; echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : stripslashes(htmlspecialchars(( $field['std']), ENT_QUOTES)), '" size="30" style="width:75%; margin-right: 20px; float:left;" />'; break; //If textarea case 'textarea': echo '<tr style="border-top:1px solid #eeeeee;">', '<th style="width:25%"><label for="', $field['id'], '"><strong>', $field['name'], '</strong><span style="line-height:18px; display:block; color:#999; margin:5px 0 0 0;">'. $field['desc'].'</span></label></th>', '<td>'; echo '<textarea name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : stripslashes(htmlspecialchars(( $field['std']), ENT_QUOTES)), '" rows="8" cols="5" style="width:100%; margin-right: 20px; float:left;">', $meta ? $meta : stripslashes(htmlspecialchars(( $field['std']), ENT_QUOTES)), '</textarea>'; break; //If Button case 'button': echo '<input style="float: left;" type="button" class="button" name="', $field['id'], '" id="', $field['id'], '"value="', $meta ? $meta : $field['std'], '" />'; echo '</td>', '</tr>'; break; } } echo '</table>';}add_action('save_post', 'tj_save_data');/*-- Save data when post is edited --*/function tj_save_data($post_id) { global $meta_box_video; // verify nonce if (!wp_verify_nonce($_POST['tj_meta_box_nonce'], basename(__FILE__))) { return $post_id; } // check autosave if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; } // check permissions if ('page' == $_POST['post_type']) { if (!current_user_can('edit_page', $post_id)) { return $post_id; } } elseif (!current_user_can('edit_post', $post_id)) { return $post_id; } foreach ($meta_box_video['fields'] as $field) { $old = get_post_meta($post_id, $field['id'], true); $new = $_POST[$field['id']]; if ($new && $new != $old) { update_post_meta($post_id, $field['id'], stripslashes(htmlspecialchars($new))); } elseif ('' == $new && $old) { delete_post_meta($post_id, $field['id'], $old); } }}
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.