This file contains hidden or 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
// WIP, most of this doesn't work | |
var svgns = "http://www.w3.org/2000/svg"; | |
var banned = { | |
namespaces: ["sketch", "illustrator", "sopodi", "inkscape"], | |
tags: ["title", "desc"], | |
tagsIfEmpty: ["defs", "g", "style"], | |
attributes: ["enable-background", "xml:space", "version"] | |
}; | |
var invisibleShapesData = { |
This file contains hidden or 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
** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.php | |
*/ | |
wp_embed_register_handler( 'gist', '/https:\/\/gist\.github\.com\/(\d+)(\?file=.*)?/i', 'wp_embed_handler_gist' ); |
This file contains hidden or 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
printf "MySQL User: " | |
read MYSQLUSER | |
if [ "$MYSQLUSER" = "" ]; then | |
set MYSQLUSER = "root" | |
fi | |
printf "MySQL Password: " | |
read MYSQLPWD | |
if [ "$MYSQLPWD" = "" ]; then | |
set MYSQLPWD = "asdfasdf" | |
fi |
This file contains hidden or 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
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> | |
<label class="hidden" for="s"><?php _e('Search:'); ?></label> | |
<input class="search-field" type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> | |
<input class="search-button primary medium" type="submit" id="searchsubmit" value="GO" /> | |
</form> |
This file contains hidden or 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 | |
/** | |
* Setup Theme Design | |
*/ | |
function ajm_setup_design() { | |
$headway_defaults = array( | |
/* Defaults */ | |
'default-text' => array( | |
'properties' => array( |
This file contains hidden or 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 | |
// http://vimeo.com/75577633 could replace $xml->video[$post_content]->url | |
public function skbp_vimeo_player( $post_content = 0 ) { | |
$xml = simplexml_load_string( self::skbp_vimeo_support_url() ); | |
// echo '<pre>'; print_r($xml->video[0]->url); echo '</pre>'; | |
$post_content = 0; | |
$output = ''; |
This file contains hidden or 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 | |
// First, make sure Jetpack doesn't concatenate all its CSS | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
// Then, remove each CSS file, one at a time | |
// You probably won't need them all, unless you use all the modules, and all the themes! :) | |
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers | |
function jeherve_remove_all_jp_css() { | |
wp_deregister_style( 'AtD_style' ); // After the Deadline |
This file contains hidden or 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 | |
// This constant allows different options: true, false, 'minor'. We need to have minor selected. | |
// Will auto update only minor releases, e.g. 4.3.2, 4.3.3, 4.3.4, etc. | |
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); | |
// This would disable ALL updates: WP core, plugins, and themes. | |
// We shouldn't need this unless we wanted to disable auto updates to everything. | |
define( 'AUTOMATIC_UPDATER_DISABLED', true ); |
This file contains hidden or 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
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var ref = $.cookie( 'affwp_ref' ); | |
var visit = $.cookie( 'affwp_ref_visit_id' ); | |
// If a referral var is present and a referral cookie is not already set | |
if( ref && visit ) { | |
// Fire an ajax request to log the hit |
This file contains hidden or 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
/** | |
* Redirects users away from login page if they're already logged in | |
* or Redirects to /store/ if they log out. | |
* | |
* @since 0.4.0 | |
* | |
* @return void | |
*/ | |
function login_out_page_redirect() { | |
if ( is_user_logged_in() && 'login' == $this->_current_view ) { |
NewerOlder