Changeset 1073141
- Timestamp:
- 01/22/2015 04:12:13 AM (11 years ago)
- Location:
- wp-post-demo/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
wp-post-demo.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-post-demo/trunk/readme.txt
r1069963 r1073141 33 33 = 1.3 = 34 34 * Move the View Demo button next to the Get Shortlink button. 35 36 = 1.4 = 37 * Added the View Demo button in admin bar. -
wp-post-demo/trunk/wp-post-demo.php
r1069963 r1073141 4 4 Plugin URI: http://www.elegants.biz/products/wp-post-demo/ 5 5 Description: Plug-in to create simple to post demo page that is already published. 6 Version: 1. 36 Version: 1.4 7 7 Author: momen2009 8 8 Author URI: http://www.elegants.biz/ … … 71 71 } 72 72 73 function wp_post_demo_admin_bar_menu($wp_admin_bar){ 74 if($wp_admin_bar -> get_node("view") != null || $wp_admin_bar -> get_node("edit") != null){ 75 $title = sprintf( 76 '<span class="ab-icon"></span><span class="ab-label">%s</span>', 77 __('View Demo','wp-post-demo') 78 ); 79 $permalink = add_query_arg('wp-post-demo', 'true', get_permalink(get_the_ID())); 80 $wp_admin_bar->add_menu(array( 81 'id' => 'wp-post-demo', 82 'meta' => array(), 83 'title' => $title, 84 'href' => $permalink 85 )); 86 } 87 } 88 73 89 add_filter("the_content","wp_post_demo_the_content", 10, 3 ); 74 90 add_action("admin_menu", "wp_post_demo_add_custom_box", 10, 3 ); 75 91 add_action("save_post","wp_post_demo_save_demo_editor", 10, 3 ); 92 add_action('admin_bar_menu', "wp_post_demo_admin_bar_menu", 9999); 76 93 ?>
Note: See TracChangeset
for help on using the changeset viewer.