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: wp_filter functions | |
Plugin URI: http://www.damiencarbery.com/2017/06/list-functions-attached-to-an-action/ | |
Description: List functions attached to all actions and filters. DON'T DO IT! | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_action( 'wp_head', 'wp_filter_the_wrong_way' ); |
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
/** | |
* Use page title for BP directory pages. | |
*/ | |
function my_set_bp_page_title() { | |
// Check to see if current reset post is a BP directory; if not, bail. | |
if ( false == in_array( $GLOBALS['post']->ID, bp_core_get_directory_page_ids() ) ) { | |
return; | |
} | |
// Use WP page title for the_title(). |
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($) { | |
$(document).ready(function() { | |
$('body').on('mousedown', '#wp_delimgbtn', function(e) { | |
var editor = tinyMCE.activeEditor, | |
element = editor.selection.getNode(); | |
if(element.tagName !== 'FIGURE') { | |
$(element).parents('figure').remove(); | |
} | |
}); |
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 the_slug($echo=true){ | |
$slug = basename(get_permalink()); | |
do_action('before_slug', $slug); | |
$slug = apply_filters('slug_filter', $slug); | |
if( $echo ) echo $slug; | |
do_action('after_slug', $slug); | |
return $slug; | |
} | |
// credit: http://www.tcbarrett.com/2011/09/wordpress-the_slug-get-post-slug-function/ |
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 | |
/** | |
* Redirect taxonomy to use custom post type archive template | |
* | |
* @author Jared Atchison | |
* @link http://jaredatchison.com/code/ | |
* @param string $template | |
* @return string | |
*/ | |
function ja_template_redirect( $template ) { |
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 | |
/* | |
Localizations: | |
- [Spanish](https://gist.github.com/MatthewEppelsheimer/1498955#gistcomment-3317461) props @chdgp | |
UPDATED: 2020-03-09 |
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
@font-face { | |
font-family: 'Open Sans'; | |
font-style: italic; | |
font-weight: 400; | |
src: local('Open Sans Italic'), local('Open-Sans-Italic'), | |
url('OpenSans-Italic.woff') format('woff'), | |
url('OpenSans-Italic.ttf') format('truetype'); | |
} | |
@font-face { |