Skip to content

Instantly share code, notes, and snippets.

View freezvd's full-sized avatar

Valentin Zmaranda freezvd

  • Bucharest, Romania
View GitHub Profile
@majick777
majick777 / wp-debug-session.php
Last active May 29, 2022 11:17
Enables setting WordPress Debug, Debug Logging and Debug Display via Querystring.
<?php
/* ================ */
/* WP Debug Session */
/* ---------------- */
/* . Version 1.04 . */
/* ================ */
// Home: https://gist.github.com/majick777/6c4e4074ce4a59fe09f7baa855732aee
// Author: DreamJester of http://wordquest.org/
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@jmsmrgn
jmsmrgn / clean-wp_nav_menu.php
Last active February 8, 2019 11:40
WordPress - Clean wp_nav_menu
//Deletes all CSS classes and id's, except for those listed in the array below
function custom_wp_nav_menu($var) {
return is_array($var) ? array_intersect($var, array(
//List of allowed menu classes
'first',
'last',
'current_page_item',
'current_page_parent',
'current_page_ancestor',
'current-menu-ancestor',
@tim-reynolds
tim-reynolds / jquery.centerit.js
Created June 29, 2012 18:16
Setting scroll to center on an element (jQuery) - Super simple stuff
/*
If you have a horizontal (or vertical) scroll container and want to set the scroll to center a specific
element in the container you can use the following super simple technique.
I'm going to show you how it was derived, because it's important to know why, not just how.
*/
/*
Setup:
[HTML]
<div class="outer">