Skip to content

Instantly share code, notes, and snippets.

View EnragedSuccubus's full-sized avatar

Nicole EnragedSuccubus

View GitHub Profile
@EnragedSuccubus
EnragedSuccubus / live.html
Last active December 23, 2015 14:39
MF Live
<h1 class="red">World Maker Faire New York: Live</h1>
[ustream id=16033689 live=1 hwaccel=1 version=3 width=940 height=529]
<h1 class="red"><a class="red" href="http://makerfaire.com/location/make-live-stage-a_zone-c/" title="Make: Live Stage">Make: Live Stage</a> - The Air Rocket Glider</h1>
[youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&w=940&h=529]
<h3>Watch More Great Videos from World Maker Faire New York 2013</h3>
<p><a href="#" target="_blank">TEST OLD STHINGSOGNAUIH UWYGFUYW</a></p>
<a href="<?php the_permalink(); ?>">
<span class="arrows">&raquo;</span> <h3 class="look_like_h4"><?php the_title(); ?></h3>
<span class="blurb">
<?php echo wp_trim_words(strip_shortcodes( get_the_excerpt() ), 20, '...') ; ?>
</span>
</a>
@EnragedSuccubus
EnragedSuccubus / popup.php
Created October 28, 2013 23:05
An example of a popup window's php file within TinyMCE's windowManager
<?php
// Load up WordPress into our iFrame
$absolute_path = __FILE__;
$path_to_file = explode( 'wp-content', $absolute_path );
$path_to_wp = $path_to_file[0];
require_once( $path_to_wp . 'wp-load.php' );
if ( ! is_user_logged_in() || ! current_user_can( 'edit_posts' ) )
wp_die( 'Oops! You can\'t call this page directly.' );
diff --git a/plugins/gigya/resources/core.php b/plugins/gigya/resources/core.php
index fcad6fa..5e3ed74 100644
--- a/plugins/gigya/resources/core.php
+++ b/plugins/gigya/resources/core.php
@@ -34,13 +34,13 @@ class GigyaSO_Core {
$header_text = (isset($params["header_text"]) ? $params["header_text"] : __("Sign in with your Social Network:"));
- if($params["width"]) {
+ if( isset( $params["width"] ) ) {
<div class="span12 footer_copyright text-center">
- <p><a href="http://makezine.com/">Make:</a> and <a href="http://makerfaire.com/">Maker Faire</a> are registered trademarks of <a href="http://makermedia.com/">Maker Media, Inc.</a><br>
- Copyright &copy; 2004-<?php echo date("Y") ?> Maker Media, Inc. All rights reserved<br>
- <?php if ( function_exists('vip_powered_wpcom') ) { echo vip_powered_wpcom(4); } ?>
- </p>
+ <p><a href="http://makezine.com/">Make:</a> and <a href="http://makerfaire.com/">Maker Faire</a> are registered trademarks of <a href="http://makermedia.com/">Maker Media, Inc.</a></p>
+ <p>Copyright &copy; 2004-<?php echo date("Y") ?> Maker Media, Inc. All rights reserved</p>
+ <p><?php if ( function_exists('vip_powered_wpcom') ) { echo vip_powered_wpcom(4); } ?></p>
</div>
@EnragedSuccubus
EnragedSuccubus / shortcodes.php
Last active December 28, 2015 08:49
It is recommended to automate any static links and use get_permalink() when possible. This will allow us to future proof our code and allow WordPress to generate these URLs. Get the post ID and pass that through get_permalink() for that specific post.
$output = '<div class="sip-promo-area ' . esc_attr( $align ) . '"><a href="' . get_permalink( 348718 ) . '"><img src="'.get_stylesheet_directory_uri().'/images/3DPrintingSIP_Widget_Final.jpg" class="" style="width:234px; height: auto;" /></a></div>';
@EnragedSuccubus
EnragedSuccubus / header.php
Last active December 28, 2015 19:29
No index for makers database
<?php // Inject this code near the top of the header.php like below the title or somewhere around there ?>
<?php if ( get_post_type == 'maker' ) {
echo '<meta name="robots" content="noindex, follow">';
} ?>
@EnragedSuccubus
EnragedSuccubus / wp_query.php
Last active January 4, 2016 13:39
A working WP_Query() script with pagination and some data validation for http://wordpress.org/support/topic/custom-post-type-pagination-problem
<div id="content">
<?php
$args = array(
'post_type' => 'recipes',
'paged' => ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1 ),
);
// It's generally a good idea to give a unique name for your new query, so I'll name this $recipes
$recipes = new WP_Query( $args );
?>
@EnragedSuccubus
EnragedSuccubus / query.php
Last active August 29, 2015 13:56
Query post types based on taxonomy
<?php
// The query variable
$queried_term = get_query_var( 'Clients' );
// Return the terms for current post based off the query variable. Make you sanitize your queries!!
$terms = wp_get_post_terms( absint( get_the_ID() ), 'Clients', array( 'fields' => 'all' ) );
// Start the arguments for WP_Query(). We'll define an empty tax_query
// so we hav something to dump our terms into programatically.
$args = array(
@EnragedSuccubus
EnragedSuccubus / widgetized-example.php
Created April 27, 2014 23:14
This code is to be used in your theme. First block is to go in your functions.php then the last block is to be set where you want the widgetized area to be displayed.
/**
* Register our sidebars and widgetized areas.
* Add this block to your functions.php
*
*/
function arphabet_widgets_init() {
register_sidebar( array(
'name' => 'Home right sidebar',
'id' => 'home_right_1', // Take note of the ID! We'll need this to call the right widgetized area in our theme