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 | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
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 login / logout links to any menu and position it | |
* Based On : http://www.viper007bond.com/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/ | |
* | |
* Instructions : | |
* 1 - Add this code to your theme functions file | |
* 2 - create a new custom menu item : http://cl.ly/image/092k303O3C2z DO NOT change this #loginlogout | |
* 3 - Position the menu item where ever you would like it to appear : http://cl.ly/image/0p00131v1L09 | |
**/ |
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
/** | |
* This could be extrapolated and used for tags or any other taxonomy really. | |
*/ | |
add_action('init', 'category_cpt_rewrites'); | |
function category_cpt_rewrites() { | |
$custom_post_types = array('video', 'audio', 'photo', 'file'); //some example post types | |
foreach ( $custom_post_types as $post_type ) { | |
$rule = '^' . $post_type . '/category/(.+?)/?$'; |
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 | |
/** | |
* WPFA Login Form | |
* Borrowed from the core login form and used with the shortcode 'bns_login' | |
* This allows for the 'bns_login' shortcode to accept all of the parameters | |
* of the `wp_login_form` function as the shortcode attributes. | |
* | |
* @package WPFA_Login_Form | |
* @since 1.0 | |
* |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Testing IE Compatibility Mode</title> | |
<script src="ieUserAgent.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="results">Results:</div> | |
<script type="text/javascript"> | |
var val = "IE" + ieUserAgent.version; |
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 | |
/** | |
* Plugin Name: WooCommerce Sample XML | |
* Plugin URI: http://www.skyverge.com/contact/ | |
* Description: Customizes the WooCommerce Customer/Order XML Export Suite specifically for Sample | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com | |
* Version: 1.0 | |
* | |
* Copyright: (c) 2013 SkyVerge, Inc. ([email protected]) |
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. |
OlderNewer