Skip to content

Instantly share code, notes, and snippets.

View elishaukpong's full-sized avatar
🇳🇬
Learning something new somewhere!

Elisha Ukpong elishaukpong

🇳🇬
Learning something new somewhere!
View GitHub Profile
@elishaukpong
elishaukpong / getMenuHierarchically.md
Created May 19, 2019 13:32 — forked from vwasteels/getMenuHierarchically.md
Retrieve menu items hierarchically in Wordpress
/**
 * Get Menu Items From Location
 *
 * @param $location : location slug given as key in register_nav_menus
 */

function getMenuItemsFromLocation($location) {
	$theme_locations = get_nav_menu_locations();
@m2sh
m2sh / DOSpacesStorageServiceProvider.php
Last active January 17, 2024 05:03
How To Use Digitalocean Spaces as Laravel Cloud filesystems
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
--
-- Table structure for table `country_t`
--
CREATE TABLE IF NOT EXISTS `country_t` (
`country_id` int(5) NOT NULL AUTO_INCREMENT,
`iso2` char(2) DEFAULT NULL,
`short_name` varchar(80) NOT NULL DEFAULT '',
`long_name` varchar(80) NOT NULL DEFAULT '',
`iso3` char(3) DEFAULT NULL,
@refringe
refringe / sendy-server
Last active February 5, 2024 07:50
Nginx configuration file example for Sendy (http://sendy.co/).
server {
listen 80;
listen [::]:80;
server_name domain.com;
autoindex off;
index index.php index.html;
root /srv/www/domain.com/public;
@hitautodestruct
hitautodestruct / readme.md
Last active September 26, 2022 11:25 — forked from anonymous/gist:4344870
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