Skip to content

Instantly share code, notes, and snippets.

View ravishakya's full-sized avatar
😈
Code Devil

Code Devil ravishakya

😈
Code Devil
View GitHub Profile
@ravishakya
ravishakya / readme.md
Created March 2, 2016 10:54 — forked from hitautodestruct/readme.md
Generate a custom structure for Wordpress menus.

This gist is for showing an example of a custom wordpress menu.

If you want to get more from the menu item simply have a look at the $item object. i.e:

// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );

This code works on Wordpress 4.1.1 as of 31st of March 2015

@ravishakya
ravishakya / gist:a44c4f6faac5a794da19
Created October 14, 2015 03:54 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',