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
( function( $ ) { | |
var $title = $( '#site-title a' ), | |
$tagline = $( '#site-description' ), | |
$branding = $( '#branding' ); | |
/* Title Text */ | |
wp.customize( 'blogname', function( value ) { | |
value.bind( function( to ) { | |
$title.text( to ); | |
} ); |
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 | |
/** | |
* @package Portfolio Press | |
*/ | |
/** | |
* Helper function to get options set by the Options Framework plugin | |
*/ | |
if ( !function_exists( 'of_get_option' ) ) : | |
function of_get_option( $name, $default = false ) { |
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: mfields.org - Ajax Append Posts | |
Plugin URI: | |
Description: | |
Version: 0.1 | |
Author: Michael Fields | |
Author URI: http://mfields.org/ | |
Copyright 2010 Michael Fields michael@mfields.org | |
License GPLv2 |
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: mfields.org - Ajax Append Posts | |
Plugin URI: | |
Description: | |
Version: 0.1.2 | |
Author: Michael Fields | |
Author URI: http://mfields.org/ | |
Copyright 2010 Michael Fields michael@mfields.org | |
License GPLv2 |
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: Taxonomy Map | |
Plugin URI: http://wordpress.mfields.org/plugins/taxonomy-images/ | |
Description: Use a hierarchical taxonomy system to display Goole map. | |
Version: 0.1 | |
Author: Michael Fields | |
Author URI: http://wordpress.mfields.org/ | |
License: GPLv2 |
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
/** | |
* Get a random tag. | |
* @since 2011-03-26 | |
*/ | |
function mfields_get_random_tag() { | |
var_dump( get_terms( 'post_tag', array( | |
'number' => 1, | |
'orderby' => 'RAND()', | |
) ) ); | |
} |
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 | |
// Register the column | |
function price_column_register( $columns ) { | |
$columns['price'] = __( 'Price', 'my-plugin' ); | |
return $columns; | |
} | |
add_filter( 'manage_edit-post_columns', 'price_column_register' ); |
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 | |
$src = ''; | |
$content = get_the_content(); | |
/* Content contains only a url. */ | |
$src = esc_url( trim( $content ) ); | |
if ( ! empty( $src ) && is_array( @getimagesize( $src ) ) ) { |
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
( function( window, document, undefined ) { | |
var maybeAddClass = function( e, cn ) { | |
var c = e.getAttribute( 'class' ); | |
if ( 0 == c.length ) { | |
e.className += cn; | |
} | |
else if ( -1 == c.indexOf( cn ) ) { | |
e.className += ' ' + cn; | |
} |
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
/* Hide submit button if it exists. */ | |
var button = document.getElementById( 'my_submit_button' ); | |
if ( null !== button && 'style' in button && 'display' in button.style ) { | |
button.style.display = 'none'; | |
} |
OlderNewer