Skip to content

Instantly share code, notes, and snippets.

@ValeryToda
ValeryToda / WordPressMenuRemover.php
Created July 8, 2011 21:56
How to remove menu items from WordPress dashboard
<?php
/**
* Just include this code snippet somewhere inside the functions.php file of your theme.
* Originally posted by hungred @ hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/
* Thanks for that. Give credit where credit is due.
**/
function remove_menus () {
global $menu;
@ValeryToda
ValeryToda / randomInt.ts
Created January 24, 2017 20:30
Random Integer generator (Typescript)
/**
* generate a random integer between min and max
* @param {Number} min
* @param {Number} max
* @return {Number} random generated integer
*/
randomInt(min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}