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 wp_register_style( 'font_awesome_css', BOILERPLATE_URL . 'lib/fontawesome/css/all.css', FALSE, BOILERPLATE_VERSION, FALSE ); |
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 // A slug for our plugin. | |
define( 'BOILERPLATE', 'Boilerplate' ); | |
// Establish a value for plugin version to bust file caches. | |
define( 'BOILERPLATE_VERSION', '0.1' ); | |
// A constant to define the paths to our plugin folders. | |
define( 'BOILERPLATE_FILE', __FILE__ ); | |
define( 'BOILERPLATE_PATH', trailingslashit( plugin_dir_path( BOILERPLATE_FILE ) ) ); |
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
/** | |
* A global object with members that any of our jQuery plugins can use. | |
* | |
* @type {Object} | |
*/ | |
var lxbMailChimpTools = { | |
/** | |
* Grab the value of a url var. | |
* @param {string} url Any url. |
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
/** | |
* Our jQuery plugin for doing tablesorters. | |
*/ | |
jQuery( document ).ready( function() { | |
var options = {}; | |
jQuery( '.lxb_mailchimp_tools-tablesorter' ).lxbMctTableSorter( options ); | |
}); |
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 | |
function boolify( $var ) { | |
if( $var == 'true' ) { | |
$out = TRUE; | |
} elseif( $var == 'false' ) { | |
$out = FALSE; | |
} elseif( is_scalar( $var ) ) { | |
$out = $var; | |
} elseif( is_array( $var ) ) { | |
$out = 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 | |
function my_array_booler( $var ) { | |
$out = array(); | |
foreach( $var as $v ) { | |
if( $v === 'true' ) { $out[] = true; continue; } | |
if( $v === 'false' ) { $out[] = false; continue; } | |
$out[]= $v; | |
} | |
return $out; | |
} |
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 | |
function my_booler( $var ) { | |
if( $var === 'true' ) { $var = true; } | |
if( $var === 'false' ) { $var = false; } | |
return $var; | |
} |
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
/** | |
* Determine if this asset needs to be updated. | |
* | |
* @return boolean Returns TRUE of the local version number | |
* is lower than the remote version number, else FALSE. | |
*/ | |
function needs_update() { | |
$old_version = $this -> old_version; |
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 | |
/** | |
* Authenticate all of our calls to Bitbucket, so that we can access private repos. | |
* | |
* @param array $args The current args for http requests. | |
* @param string $url The url to which the current http request is going. | |
* @return array $args, filtered to include BB basic auth. | |
*/ | |
public function authenticate_http( $args, $url ) { |
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 | |
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'set_plugin_transient' ) ); | |
/** | |
* Inject our updates into core's list of updates. | |
* | |
* @param array $transient The existing list of assets that need an update. | |
* @return The list of assets that need an update, filtered. | |
*/ |