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
// javascript | |
$.expr[':'].internal = function (obj, index, meta, stack) { | |
// Prepare | |
var | |
$this = $(obj), | |
url = $this.attr('href') || '', | |
isInternalLink; | |
// Check link | |
isInternalLink = url.substring(0, rootUrl.length) === rootUrl || url.indexOf(':') === -1; |
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 | |
// cf http://tiffanybbrown.com/2013/02/03/wordpress-adding-custom-galleries-to-your-theme/ | |
remove_shortcode('gallery', 'gallery_shortcode'); | |
add_shortcode('gallery', 'custom_gallery'); | |
function custom_gallery($attr) { | |
$post = get_post(); |
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 | |
// cf http://shibashake.com/wordpress-theme/how-to-render-your-own-wordpress-photo-gallery | |
function parse_gallery_shortcode($atts) { | |
global $post; | |
if ( ! empty( $atts['ids'] ) ) { | |
// 'ids' is explicitly ordered, unless you specify otherwise. |
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 | |
// cf http://stackoverflow.com/questions/14585538/customise-the-wordpress-gallery-html-layout | |
/****** REWRITE THE GALLERIE FUNCTION FROM WORDPRESS **********/ | |
add_shortcode('gallery', 'my_gallery_shortcode'); | |
function my_gallery_shortcode($attr) { | |
$counter=0; | |
//var_dump("Rewrite the shortcode gallery"); |
NewerOlder