This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'login_head', 'my_login_head' ); | |
function my_login_head(){ | |
?> | |
<style> | |
html,body.login {background:#222;} | |
.login h1 a {background-image:url(<?php echo get_stylesheet_directory_uri() ?>/img/logo.png);} | |
.login form {box-shadow:none;} | |
.login #nav, .login #backtoblog {text-shadow:none;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$('a[href*=#]:not([href=#])').click(function() | |
{ | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
|| location.hostname == this.hostname) | |
{ | |
var target = $(this.hash), | |
headerHeight = $(".primary-header").height() + 5; // Get fixed header height | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Modern Font Stacks */ | |
/* System */ | |
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
/* System (Bootstrap 5.2.0) */ | |
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
/* Times New Roman-based serif */ | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Each YouTube video has 4 generated images. They are predictably formatted as follows: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg | |
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* Use the code at the beginning of a plugin that you want to be laoded at last | |
* | |
*/ | |
function this_plugin_last() { | |
$wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR."/$2", __FILE__); | |
$this_plugin = plugin_basename(trim($wp_path_to_this_file)); | |
$active_plugins = get_option('active_plugins'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://support.advancedcustomfields.com/forums/topic/change-menu-position-of-options-page/ | |
acf_add_options_page( array( | |
'page_title' => 'Home Page Sliders', | |
'menu_title' => 'Sliders', | |
'menu_slug' => 'home-page-sliders', | |
'capability' => 'edit_posts', | |
'icon_url' => 'dashicons-images-alt2', | |
'position' => 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gform_validation_container, | |
.gform_wrapper .gform_validation_container, | |
body .gform_wrapper li.gform_validation_container, | |
body .gform_wrapper .gform_body ul.gform_fields li.gfield.gform_validation_container, | |
body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { | |
display: none !important; | |
position: absolute !important; | |
left: -9000px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20180808 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Parse the video uri/url to determine the video type/source and the video id */ | |
function parse_video_uri( $url ) { | |
// Parse the url | |
$parse = parse_url( $url ); | |
// Set blank variables | |
$video_type = ''; | |
$video_id = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enqueue site-wide scripts | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_script( 'global', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '', true ); | |
} |
OlderNewer