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 | |
/** | |
* Include posts from authors in the search results where | |
* either their display name or user login matches the query string | |
* | |
* @author danielbachhuber | |
*/ | |
add_filter( 'posts_search', 'db_filter_authors_search' ); | |
function db_filter_authors_search( $posts_search ) { |
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 | |
$urls = array(); | |
$videos = array(); | |
// vimeo test | |
$urls[] = 'http://vimeo.com/6271487'; | |
$urls[] = 'http://vimeo.com/68546202'; | |
// youtube test |
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 | |
/** | |
* preg_replace_callback_offset() | |
* | |
* preg_replace_callback() with offset capturing. | |
* | |
* Usage: | |
* | |
* Works exactly like preg_replace_callback() but differs in passing the matches to the callback function. | |
* Matches are as if using preg_match() with the PREG_OFFSET_CAPTURE flag: |
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
#! /bin/bash | |
# | |
# Author: Pasquale Ceres ([email protected]) | |
# License: GPL ver. 3 | |
# | |
# Script originally developed for the | |
# "San Lorenzo Martire Caposele Church Records Digitalization Project" | |
# | |
# http://www.facebook.com/group.php?gid=188973755117&v=photos |