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 | |
// Register admin stylesheet | |
add_action( 'admin_enqueue_scripts', 'berkeley_settings_admin_styles' ); | |
function berkeley_settings_admin_styles( $hook ) { | |
wp_enqueue_style( 'berkeley-admin-css', get_stylesheet_directory_uri() . '/css/admin-style.css' ); | |
} |
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
/* Genesis Settings screen */ | |
#berkeley-color-settings .genesis-layout-selector label.box { | |
max-height: inherit; | |
} | |
.genesis-layout-selector label.box { | |
padding: 5px; | |
} |
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( 'redirect_canonical', 'my_404_no_guessing', 10, 2 ); | |
function my_404_no_guessing( $redirect_url, $request_url ) { | |
if ( is_404() ) { | |
// HTML Import redirects | |
$posts = get_posts( array( | |
'meta_key' => 'URL_before_HTML_Import', | |
'meta_value' => $request_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
$('li.blurb').each(function(index) { | |
var words = $('dd.words', this).text(); | |
words = words.replace(',', ''); | |
words = parseInt(words, 10); | |
if ( words > 2000 ) | |
words = Math.round(words / 1000) + 'K'; | |
var title = $('h4.heading', this).html(); | |
title = title.replace(/(\r\n|\n|\r)/gm, ' '); | |
title = title.replace('<!-- do not cache -->', ''); |
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
[searchwp_search_form engine="employee_directory"] | |
<div class="search-results-wrapper"> | |
<h3>Search Results</h3> | |
[searchwp_search_results engine="employee_directory" posts_per_page=20] | |
<h4>[searchwp_search_result_link direct="true"]</h4> | |
[searchwp_search_result_excerpt] | |
[/searchwp_search_results] | |
</div> | |
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
[searchwp_search_form engine="employee_directory" placeholder="Search for a name or custom field"] <!-- new --> | |
[searchwp_search_results_found] <!-- new --> | |
<div class="search-results-wrapper"> | |
<h3>Search Results</h3> | |
[searchwp_search_results engine="employee_directory" posts_per_page=20] | |
<h4>[searchwp_search_result_link direct="true"]</h4> | |
[searchwp_search_result_excerpt] | |
[/searchwp_search_results] | |
</div> |
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 excerpts to pages | |
add_post_type_support( 'page', 'excerpt' ); | |
//* Use excerpts as Featured Page widget content | |
add_filter( 'get_the_content_limit', 'ebca_content_limit', 10, 4 ); | |
function ebca_content_limit( $output, $content, $link, $max_characters ) { | |
$content = get_post_field( 'post_excerpt', get_the_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
<?php | |
// [file fragment] | |
// find this, around line 671 | |
// ... and all the taxonomies... | |
$taxonomies = get_taxonomies( array( 'public' => true ), 'objects', 'and' ); | |
foreach ( $taxonomies as $tax ) { | |
if ( isset( $options[$tax->name] ) ) | |
wp_set_post_terms( $post_id, $options[$tax->name], $tax->name, false ); | |
} | |
if ( isset( $customfieldtags ) ) |
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 | |
/* | |
Plugin Name: Citation Importer Filters | |
Plugin URI: http://stephanieleary.com/ | |
Description: Add or edit fields for the Citation Importer. | |
Author: sillybean | |
Author URI: http://stephanieleary.com/ | |
Version: 0.1 | |
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
*/ |