Skip to content

Instantly share code, notes, and snippets.

@wycks
wycks / functions.php
Created Sep 17, 2014
WordPress SEO filter to remove from dashboard
View functions.php
add_filter( 'wpseo_use_page_analysis', '__return_false' );
@wycks
wycks / wp-config.php
Last active Sep 26, 2015
Multi Environment wp-config.php
View wp-config.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@wycks
wycks / .gitignore
Last active Aug 29, 2015
.gitignore
View .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@wycks
wycks / chrome-font-fix.css
Last active Dec 9, 2016
Chrome font render order
View chrome-font-fix.css
/* chrome fix render svg first */
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'LarsseitBold';
src: url('../font/good/larsseit-bold.svg') format('svg');
}
@font-face {
font-family: 'LarsseitExtraBold';
src: url('../font/good/larsseit-extrabold.svg') format('svg');
}
@wycks
wycks / GhettoPress.php
Last active Oct 8, 2015
WordPress Ghetto Loader - stop doing this, you
View GhettoPress.php
<?php
//Load WorsPress quick and dirty into something not WordPress. This is horrible I know,
//But the database queries they are so low, and it's just so dirty
//install WordPress in a dir like /lib or something and stick classPageLoader.php in there, ha!
//Example use for a index.php or whatever, no autoloading here!
#######################################################
require('lib/classPageLoader.php');
$content = new LoadWpContent();
View hooks.php
<?php
//get all ze hooks
$Directory = new RecursiveDirectoryIterator( 'WordPress\3.7' );
$Iterator = new RecursiveIteratorIterator( $Directory );
$regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH );
foreach ( $regex as $filename=>$file ) {
@wycks
wycks / remove-stuff.php
Created Oct 16, 2013
Remove stuff is removed from https://github.com/wycks/WP-Skeleton-Theme and is now here.
View remove-stuff.php
<?php
/**
* @package WordPress
* @subpackage WP-Skeleton
*/
// REMOVE SOME HEADER OUTPUT
function Wps_remove_header_info() {
remove_action('wp_head', 'rsd_link');
View Preferances.sublime-settings.json
{
"auto_complete_selector": "source, text",
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"drag_text": false,
"font_face": "Consolas",
"font_size": 13,
"highlight_line": true,
"highlight_modified_tabs": true,
View wp-link-form.html
@wycks
wycks / wp-parse-functions.php
Last active Dec 21, 2015
Parse all WP functions
View wp-parse-functions.php
<?php
//just load it the way WP does
include dirname(__FILE__) . '/wp-blog-header.php';
require_once(ABSPATH . 'wp-admin/includes/admin.php');
$functions = get_defined_functions();
$i = 0; //count them
// set to user, we don't want internal functions