Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: Liquid Web Checker for Text
* Plugin URI: http://liqiudweb.com/wordpress
* Description: This plugin simply places some text at the bottom of the page for Liquid Web's uptime service to check to make sure the site is up.
* Version: 0.0.1
* Author: AJ Morris, Liquid Web
* Author URI: http://liquidweb.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@ajmorris
ajmorris / plugin.php
Last active September 20, 2017 23:39 — forked from jeherve/plugin.php
<?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
@ajmorris
ajmorris / searchform.php
Created June 11, 2014 17:34
Sample Search form
<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>
@ajmorris
ajmorris / sample.php
Created May 28, 2014 03:46
Return Vimeo Video Embedded
<?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 = '';
@ajmorris
ajmorris / kb-press.php
Last active August 29, 2015 14:01
function containing transients
<?php
/**
* Plugin Name.
*
* @package Support_KB_Press
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
*/
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
function enqueue_my_styles() {
global $wp_styles;
// Load the main stylesheet
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' );
@ajmorris
ajmorris / gfhubspotaddon.php
Created April 15, 2014 21:13
GFHubSpotAddon
<?php
/**
* Plugin Name.
*
* @package GF HubSpot Add-On
* @author AJ Morris
* @license GPL-2.0+
* @link http://example.com
* @copyright 2013 Your Name or Company Name
*
@ajmorris
ajmorris / functions.php
Created February 17, 2014 19:01
example add_theme_support
if ( function_exists( 'add_theme_support' )) {
add_theme_support( 'post-thumbnails' );
// Add our image sizes
add_image_size( 'slider-thumb', 500, 372, true );
add_image_size( 'small-slider-thumb', 300, 174, true );
add_image_size( 'post-thumb', 820, 320, true);
}
@ajmorris
ajmorris / header.php
Created January 17, 2014 15:30
Trying to Target only IE8 and IE9.
<!-- Load IE specific styles -->
<!--[if lt IE 10 gt IE 8]>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri(); ?>/stylesheets/ie-9.css" />
<![endif]-->
<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri(); ?>/stylesheets/ie-8.css" />
<![endif]-->
<!--[if (lte IE 9) & (!IEMobile)]>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/vendor/matchMedia.js"></script>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/vendor/respond.js"></script>
<![endif]-->