Skip to content

Instantly share code, notes, and snippets.

View gofishwbeeler's full-sized avatar

William Beeler gofishwbeeler

View GitHub Profile
@gofishwbeeler
gofishwbeeler / functions.php
Last active April 2, 2019 20:11
Loads all your Javascript files in Wordpress
function gfd_theme_scripts() {
wp_enqueue_script( 'all-my-scripts', get_template_directory_uri() . '/js/all.js', array(), '1.0.0', true );
}
add_action( 'wp_print_scripts', 'gfd_theme_scripts' );
@gofishwbeeler
gofishwbeeler / functions.php
Last active April 2, 2019 20:08
Loads a specific stylesheet for your Wordpress theme
function gfd_stylesheets()
{
wp_enqueue_style('my-theme-css', get_template_directory_uri() . '/styles.css', array(), '1.0.0', 'all');
}
add_action('wp_print_styles', 'gfd_stylesheets', PHP_INT_MAX);
@gofishwbeeler
gofishwbeeler / functions.php
Created April 2, 2019 19:36
De-register all Styles from Wordpress
function gfd_remove_all_styles() {
global $wp_styles;
$wp_styles->queue = array();
}
add_action('wp_print_styles', 'gfd_remove_all_styles', 100);
@gofishwbeeler
gofishwbeeler / functions.php
Created April 2, 2019 19:35
De-registers all scripts in Wordpress
function gfd_remove_all_scripts() {
global $wp_scripts;
$wp_scripts->queue = array();
}
add_action('wp_print_scripts', 'gfd_remove_all_scripts', 100);
@gofishwbeeler
gofishwbeeler / wp-head
Last active April 2, 2019 19:32
Wphead hook example
<?php wp_head(); ?>
@gofishwbeeler
gofishwbeeler / wp-footer
Created April 2, 2019 19:27
Wp footer hook example
@gofishwbeeler
gofishwbeeler / license-badges.md
Created August 14, 2018 16:49 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@gofishwbeeler
gofishwbeeler / .htaccess
Created March 31, 2017 20:48
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f