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
function msmb_delete( $atts ) { | |
global $post; | |
get_currentuserinfo(); | |
if (current_user_can('edit_post')) { | |
$deleteme = "<a href='" . wp_nonce_url(get_bloginfo('url').'/wp-admin/post.php?post='.$post->ID.'&action=trash', 'delete-post_' . $post->ID) . "'>Delete</a>"; | |
} | |
return $deleteme; | |
} | |
add_shortcode( 'delete_button', 'msmb_delete' ); |
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
{"meta":{"version":"1.14.2","build":"1341535543"},"pods":{"4":{"name":"bunnies","label":"Bunny","is_toplevel":"1","detail_page":"bunnies\/{@slug}\/","list_filters":null,"pre_save_helpers":"","pre_drop_helpers":"","post_save_helpers":"","post_drop_helpers":"","fields":[{"name":"name","label":"Name","comment":"","coltype":"txt","pickval":null,"weight":"0","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"1","unique":null,"multiple":null},{"name":"slug","label":"Permalink","comment":"Leave blank to auto-generate","coltype":"slug","pickval":null,"weight":"1","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"0","unique":null,"multiple":null},{"name":"birthday","label":"Birth Date","comment":"When was your bunny born?","coltype":"date","pickval":"","weight":"2","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"featured","label":"Featured","comment":"Want t |
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
<hgroup> | |
<div class="menu-top-left-container"> | |
<ul id="menu-top-left" class="menu"> | |
<li id="menu-item-23" class="scroll menu-item menu-item-type-custom menu-item-object-custom menu-item-23"><a href="#1">link1</a></li> | |
<li id="menu-item-24" class="scroll menu-item menu-item-type-custom menu-item-object-custom menu-item-24"><a href="#2">link2</a></li> | |
<li id="menu-item-25" class="scroll menu-item menu-item-type-custom menu-item-object-custom menu-item-25"><a href="#6">link3</a></li> | |
<li id="menu-item-26" class="scroll menu-item menu-item-type-custom menu-item-object-custom menu-item-26"><a href="#4">link4</a></li> | |
</ul> | |
</div> | |
<div id="branding"> |
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 | |
define('WP_USE_THEMES', false); | |
require( '../my_wordpress_install_root/wp-load.php' ); | |
?> | |
ALL YOUR CUSTOM CODE HERE | |
<? get_footer(); | |
?> |
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 | |
// Template Name: Interior with Subnav | |
//add_filter('genesis_before_post_content','add_subnav'); | |
function add_subnav() { | |
global $post; | |
echo '<div id="sibling-pages"><ul class="sibling-pages">'; | |
wp_list_pages('title_li=&child_of='.$post->post_parent.'&exclude='.$post->ID); |
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
function frontend_scripts() { | |
global $post; | |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; | |
$lightbox_en = get_option('woocommerce_enable_lightbox') == 'yes' ? true : false; | |
$chosen_en = get_option( 'woocommerce_enable_chosen' ) == 'yes' ? true : false; | |
$frontend_script_path = $this->plugin_url() . '/assets/js/frontend/'; | |
// Register any scipts for later use, or used as dependencies | |
wp_register_script( 'chosen', $this->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array( 'jquery' ), $this->version, 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
function my_scripts_method() { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
wp_register_script('jqueryui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.js'); | |
wp_enqueue_script('jqueryui'); | |
wp_register_script('dropcap', get_template_directory_uri() .'/js/jquery.initialLetter-1.0.min.js', '1.0', '1.0.0', true); | |
wp_enqueue_script('dropcap'); | |
wp_enqueue_style( 'fbstyle', get_template_directory_uri() .'/js/jquery.fancybox.css' ); | |
wp_register_script('fancybox', get_template_directory_uri() .'/js/jquery.fancybox.js', '2.0.6', '1.0.0', 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
<nav id="subPageNav"> | |
<?php | |
// Grab the categories - top level only (depth=1) | |
$get_cats = wp_list_categories( 'echo=0&title_li=&depth=1' ); | |
// Split into array items | |
$cat_array = explode('</li>',$get_cats); | |
// Amount of categories (count of items in array) | |
$results_total = count($cat_array); | |
// How many categories to show per list (round up total divided by 5) | |
$cats_per_list = ceil($results_total / 5); |
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 | |
$pods = pod('socialmedia'); | |
$pods->find('name ASC'); | |
echo $pods->template('imported'); | |
?> |
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
function ttp_filter_content( $content ) { | |
global $post; | |
if ( get_post_format( $post->ID ) === 'status' ) | |
$content = ttp_make_clickable( $content ); | |
return $content; | |
} | |
add_filter( 'the_content', 'ttp_filter_content' ); |
OlderNewer