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 # -*- coding: utf-8 -*- | |
namespace WPSE; | |
/* Plugin Name: Fast Next/Prev Post Links | |
* Plugin URI: http://wordpress.stackexchange.com/q/101435/ | |
*/ | |
add_action( | |
'fast_prev_post_link', | |
__NAMESPACE__ . '\fast_prev_post_link', | |
10, |
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 mandatory_excerpt($data) { | |
$excerpt = $data['post_excerpt']; | |
if (empty($excerpt)) { | |
if ($data['post_status'] === 'publish') { | |
add_filter('redirect_post_location', 'excerpt_error_message_redirect', '99'); | |
} |
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 THEMENAME_wrap_gumby_intrinsic($html, $url, $args){ | |
$provider = ''; | |
if (preg_match("#https?://youtu\.be/.*#i", $url) || preg_match("#https?://(www\.)?youtube\.com/watch.*#i", $url)) { | |
$provider = 'youtube'; | |
}elseif (preg_match("/vimeo.com\/([^&]+)/i", $url)) { | |
$provider = 'vimeo'; | |
} | |
//no oEmbed for Twich :< | |
//elseif (preg_match("/https?:\/\/(.*twitch\.tv\/.*|.*twitch\.tv\/.*\/b\/.*)/i", $url)){ | |
//$provider = 'twitch'; |
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: Remove All Feeds [for WPSE33072] | |
Description: Remove all feeds from WordPress | |
Author: Christopher Davis | |
Author URI: http://christopherdavis.me | |
License: GPL2 | |
*/ | |
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 the new media manager to handle uploads to Soliloquy. | |
$('#soliloquy-area').on('click.soliloquyUpload', '#soliloquy-upload', function(e){ | |
// Prevent the default action from occuring. | |
e.preventDefault(); | |
// Variable to hold our media applicaton. | |
var soliloquy_frame; | |
// If the media frame already exists, reopen it and return. | |
if ( soliloquy_frame ) { |
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
var myConfObj = { | |
iframeMouseOver : false | |
} | |
window.addEventListener('blur',function(){ | |
if(myConfObj.iframeMouseOver){ | |
console.log('Wow! Iframe Click!'); | |
} | |
}); | |
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',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 | |
define('MY_POST_TYPE', 'my'); | |
define('MY_POST_SLUG', 'gallery'); | |
function my_register_post_type () { | |
$args = array ( | |
'label' => 'Gallery', | |
'supports' => array( 'title', 'excerpt' ), | |
'register_meta_box_cb' => 'my_meta_box_cb', |
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
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012, Faisalman <[email protected]> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(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
<style type="text/css"> | |
body.about h1 { /*Let's presume your banner title is an h1 element */ | |
width: 150px; /* Set this to the width of your image */ | |
height: 75px; /* Set this to the height of your image */ | |
background: transparent url('my-image.png') no-repeat top left; /* Change the URL to point to your image */ | |
text-indent: -9999em; /* This ensures that the text itself will not show. */ | |
} | |
</style> | |
<html> |
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 | |
add_filter('wp_title', 'archive_titles'); | |
/** | |
* Modify <title> if on an archive page. | |
* | |
* @author Philip Downer <[email protected]> | |
* @link http://manifestbozeman.com | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* @version v1.0 | |
* |
NewerOlder