Skip to content

Instantly share code, notes, and snippets.

View mjot's full-sized avatar

Martin Jäcke mjot

View GitHub Profile
@mjot
mjot / Wordpress - Hide Add Media Button
Last active November 17, 2016 10:06 — forked from jfcode/Hide Add Media Button
Hide WYSIWYG - Add Media Button
/**
* Remove Add Media Button from the WYSIWYG editor
*/
function RemoveAddMediaButtons(){
remove_action( 'media_buttons', 'media_buttons' );
}
add_action('admin_head', 'RemoveAddMediaButtons');
@mjot
mjot / Gulpfile.js
Last active October 25, 2017 08:35 — forked from shyim/Gulpfile.js
Gulp Shopware with browser-sync
function basename(path) {
return path.split('/').reverse()[0];
}
var gulp = require('gulp'),
less = require('gulp-less'),
sourcemaps = require('gulp-sourcemaps');
concat = require('gulp-concat'),
rename = require('gulp-rename'),
path = require('path'),
@mjot
mjot / functions.php
Last active November 27, 2018 20:18 — forked from hitautodestruct/readme.md
Generate a custom structure for Wordpress menus.
function wecGenerateMenu($menu_name) {
$menu = wp_get_nav_menu_object($menu_name);
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menuitems = wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) );
$count = 0;
$content_ = "";
$submenu = false;