From 0fd2ca37845f484b8e23ac6a9c8a712ecabe4d51 Mon Sep 17 00:00:00 2001 From: Joan Junyent Tarrida Date: Thu, 31 Dec 2015 19:45:32 +0100 Subject: [PATCH] Created some hooks for extendability Created some hooks for extendability: 1. linkmarklet-pre-post 2. linkmarklet-after-post 3. linkmarklet-form 4. linkmarklet-js --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 67f191e..e9828df 100644 --- a/index.php +++ b/index.php @@ -351,9 +351,12 @@ function linkmarklet_post() { } // our final update - $post_ID = wp_update_post( $post ); + + do_action( 'linkmarklet-pre-post',$post_ID); + $post_ID = wp_update_post( $post ); return $post_ID; + do_action( 'linkmarklet-after-post',$post_ID); } wp_enqueue_script( 'underscore' ); @@ -517,6 +520,7 @@ function linkmarklet_post() { +
@@ -541,6 +545,7 @@ function reposition(){ var tags = document.getElementById('row-tags').offsetHeight; height = height - tags; + document.getElementById('content').style.height = height + 'px'; } reposition();