From 2c62134a22edb74b1efa459d2c413f07adc29831 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Sun, 24 Apr 2011 09:39:31 +0000 Subject: [PATCH] Bookmarklet action & filter git-svn-id: http://yourls.googlecode.com/svn/trunk@609 12232710-3e20-11de-b438-597f59cd7555 --- admin/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/index.php b/admin/index.php index 825f6ec..064304c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -135,6 +135,7 @@ // This is a bookmarklet if ( isset( $_GET['u'] ) ) { $is_bookmark = true; + yourls_do_action( 'bookmarklet' ); $url = yourls_sanitize_url( $_GET['u'] ); $keyword = ( isset( $_GET['k'] ) ? yourls_sanitize_keyword( $_GET['k'] ) : '' ); @@ -153,7 +154,7 @@ $short = $return['shorturl'] ? $return['shorturl'] : ''; $message = $return['message']; header('Content-type: application/json'); - echo "yourls_callback({'short_url':'$short','message':'$message'});"; + echo yourls_apply_filter( 'bookmarklet_jsonp', "yourls_callback({'short_url':'$short','message':'$message'});" ); die(); } -- 2.45.0