Forked from here
A complete cookies reader/writer framework with full unicode support.
This framework is released under the GNU Public License, version 3 or later.
<?php | |
//get page id's by their slug | |
function id_by_slug($page_slug) { | |
$page = get_page_by_path($page_slug); | |
if ($page): | |
return $page->ID; | |
else: | |
return null; | |
endif; | |
} |
// use for patterns: | |
// *gmail.com* | |
// *mail.google.com* | |
// *google.com*mail* | |
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 15000); | |
function updateDockBadge() { |
<?php | |
function paginationFunc() { | |
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; // setup pagination | |
$the_query = new WP_Query( array( | |
'post_type' => 'name_of_post_type', // post type custom or native | |
'orderby' => 'date', // how to order | |
'order' => 'DESC', // order ASC or DESC | |
'paged' => $paged, | |
'posts_per_page' => 2) //pages to show | |
); |
Filename without spaces: | |
svn st | sed -n 's/^M//p' | xargs svn commit -m "modified" | |
Filename with spaces: | |
svn st | sed -n 's/$/"/; s/^M */"/p' | xargs svn commit -m "modified" |
A complete cookies reader/writer framework with full unicode support.
This framework is released under the GNU Public License, version 3 or later.
jQuery(document).ready(function($){ | |
var _custom_media = true, | |
_orig_send_attachment = wp.media.editor.send.attachment; | |
$('.stag-metabox-table .button').click(function(e) { | |
var send_attachment_bkp = wp.media.editor.send.attachment; | |
var button = $(this); | |
var id = button.attr('id').replace('_button', ''); | |
_custom_media = true; | |
wp.media.editor.send.attachment = function(props, attachment){ | |
if ( _custom_media ) { |