Milan Ivanovic

  • // Remove Metaboxes from Custom Post Type Edit Screens if (is_admin()) : function remove_post_meta_boxes() { if(!current_user_can(‘administrator’)) { remove_meta_box(‘tagsdiv-post_tag’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘categorydiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘authordiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘postexcerpt’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘trackbacksdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘commentstatusdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘postcustom’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘commentstatusdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘commentsdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘revisionsdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘authordiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘pageparentdiv’, ‘custom_post_type’, ‘normal’); remove_meta_box(‘slugdiv’, ‘custom_post_type’,

    Read More

  • // Remove Dashboard Widgets function remove_dashboard_widgets() { global $wp_meta_boxes; unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_quick_press’]); unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_incoming_links’]); unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]); unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_plugins’]); unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_recent_drafts’]); unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_recent_comments’]); unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]); unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]); } if (!current_user_can(‘manage_options’)) { add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’); } Source: 10+ Useful WordPress Code Snippets

    Read More

  • // Remove Comments menu from Admin Dashboard function remove_menus () { global $menu; $restricted = array(__(‘Comments’)); end ($menu); while (prev($menu)){ $value = explode(‘ ‘,$menu[key($menu)][0]); if(in_array($value[0] != NULL?$value[0]:”” , $restricted)){unset($menu[key($menu)]);} } } add_action(‘admin_menu’, ‘remove_menus’); Source: 10+ Useful WordPress Code Snippets

    Read More

  • // register the post type register_post_type( static::POSTTYPE, array( ‘menu_icon’ => __( plugins_url( ‘icon-16×16.png’ , __FILE__ ), ‘custom_plugin’ ), ) ); // Style change for 32×32 icon for custom post type add_action(‘admin_head’, ‘custom_header’); function custom_header() { global $post_type; ?> <style> <?php if (($_GET[‘post_type’] == ‘custom_plugin’) || ($post_type == ‘custom_plugin’)) : ?> #icon-edit { background:transparent url(‘<?php echo

    Read More

  • A Palestinian Hacker, Khalil found an amazing vulnerability in Facebook privacy settings, that allows to post on anyone’s Timeline / Wall, and totally bypass the Privacy settings . He was forced to post vulnerability details on Mark Zuckerberg (Facebook Founder) Timeline to prove his point, after the Facebook Security Team failed to recognise his critical vulnerability three times.  

    Read More

  • It was awesome. I really did have a great time. And judging by the other people reactions, I think that were more then happy… Lots of new people showed up, but also lots of already familiar faces… This is the link on meetup website: Oslo WordPress Meetup August   Introduction guy: Lasse Olsen, that guy is

    Read More

  • Bob Skywalker. My favourite Metro dog. Period. Aldo he is just one year old, his charm and joyful eyes melts even the coldest hearts of the coldest people, in the coldest winter, outside, ever! His owners, super talented and amazing engaged couple Christine Wendelborg and Lasse Olsen (Christine is super talented Photographer, and Lasse Olsen is the

    Read More

  • Enjoy this awesome gist by Mark Jaquith! <!– `-/+osssssssssssso+/-` ./oys+:.` `.:+syo/. .+ys:. .:/osyyhhhhyyso/:. ./sy+. /ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/ /h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/ :ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh: `sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys` .ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh. .h+ “-dmmy.“ “.ymmmmh +h. `ho ` /mmmmmmmmmmo .dmmmmmmmms ~~ oh` oy .h` ymmmmmmmmmm: /mmmmmmmmmy` -d. yo .d- ymy `dmmmmmmmmmd. ymmmmmmmmmh` /my -d. oy -mmm+ /mmmmmmmmmmy .dmmmmmmmmmy

    Read More

  • 10 years ago Skype, Facebook, YouTube, Reddit, Twitter, Tumblr, Dropbox, and Instagram didn’t exist. 20 years ago there were only 130 websites total, Google wasn’t even around yet, and you had to pay for an email account through an ISP. 30 years ago there was no internet. I stumbled upon this awesome website, and I

    Read More

  • We’ve all seen margin: 0 auto; for horizontal centering, but margin: auto; has refused to work for vertical centering… until now! [CodePen height=800 show=result href=gEiDt user=shshaw ]   See full documentation  

    Read More