Version Description
- View link now uses wordpress function get_permalinks(). Previously you could get non-working links.
Download this release
Release Info
| Developer | eskapism |
| Plugin | |
| Version | 0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 0.5 to 0.6
- index.php +7 -2
- readme.txt +3 -0
- scripts.js +1 -1
- styles.css +7 -1
index.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Admin Menu Tree Page View
|
| 4 |
Plugin URI: http://eskapism.se/code-playground/admin-menu-tree-page-view/
|
| 5 |
Description: Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
|
| 6 |
-
Version: 0.
|
| 7 |
Author: Pär Thernström
|
| 8 |
Author URI: http://eskapism.se/
|
| 9 |
License: GPL2
|
|
@@ -36,7 +36,7 @@ add_action('wp_ajax_admin_menu_tree_page_view_add_page', 'admin_menu_tree_page_v
|
|
| 36 |
|
| 37 |
function admin_menu_tree_page_view_admin_init() {
|
| 38 |
|
| 39 |
-
define( "admin_menu_tree_page_view_VERSION", "0.
|
| 40 |
define( "admin_menu_tree_page_view_URL", WP_PLUGIN_URL . '/admin-menu-tree-page-view/' );
|
| 41 |
|
| 42 |
wp_enqueue_style("admin_menu_tree_page_view_styles", admin_menu_tree_page_view_URL . "styles.css", false, admin_menu_tree_page_view_VERSION);
|
|
@@ -93,6 +93,11 @@ function admin_menu_tree_page_view_get_pages($args) {
|
|
| 93 |
$output .= "<a href='$edit_link'>$status_span";
|
| 94 |
$output .= $title;
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
$output .= "<span class='admin-menu-tree-page-view-edit'></span>";
|
| 97 |
|
| 98 |
$output .= "</a>";
|
| 3 |
Plugin Name: Admin Menu Tree Page View
|
| 4 |
Plugin URI: http://eskapism.se/code-playground/admin-menu-tree-page-view/
|
| 5 |
Description: Adds a tree of all your pages or custom posts. Use drag & drop to reorder your pages, and edit, view, add, and search your pages.
|
| 6 |
+
Version: 0.6
|
| 7 |
Author: Pär Thernström
|
| 8 |
Author URI: http://eskapism.se/
|
| 9 |
License: GPL2
|
| 36 |
|
| 37 |
function admin_menu_tree_page_view_admin_init() {
|
| 38 |
|
| 39 |
+
define( "admin_menu_tree_page_view_VERSION", "0.6" );
|
| 40 |
define( "admin_menu_tree_page_view_URL", WP_PLUGIN_URL . '/admin-menu-tree-page-view/' );
|
| 41 |
|
| 42 |
wp_enqueue_style("admin_menu_tree_page_view_styles", admin_menu_tree_page_view_URL . "styles.css", false, admin_menu_tree_page_view_VERSION);
|
| 93 |
$output .= "<a href='$edit_link'>$status_span";
|
| 94 |
$output .= $title;
|
| 95 |
|
| 96 |
+
|
| 97 |
+
// add the view link, hidden, used in popup
|
| 98 |
+
$permalink = get_permalink($one_page->ID);
|
| 99 |
+
$output .= "<span class='admin-menu-tree-page-view-view-link'>$permalink</span>";
|
| 100 |
+
|
| 101 |
$output .= "<span class='admin-menu-tree-page-view-edit'></span>";
|
| 102 |
|
| 103 |
$output .= "</a>";
|
readme.txt
CHANGED
|
@@ -39,6 +39,9 @@ Now the tree with the pages will be visible in the admin menu to the left.
|
|
| 39 |
|
| 40 |
== Changelog ==
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
= 0.5 =
|
| 43 |
- Swedish translation added
|
| 44 |
- Moved load_plugin_textdomain to action "menu" instead of "init"
|
| 39 |
|
| 40 |
== Changelog ==
|
| 41 |
|
| 42 |
+
= 0.6 =
|
| 43 |
+
- View link now uses wordpress function get_permalinks(). Previously you could get non-working links.
|
| 44 |
+
|
| 45 |
= 0.5 =
|
| 46 |
- Swedish translation added
|
| 47 |
- Moved load_plugin_textdomain to action "menu" instead of "init"
|
scripts.js
CHANGED
|
@@ -56,7 +56,7 @@ jQuery(function($) {
|
|
| 56 |
div_popup.find(".admin-menu-tree-page-view-popup-edit a").attr("href", edit_link);
|
| 57 |
|
| 58 |
// view link, this is probably not such a safe way to this this. but let's try! :)
|
| 59 |
-
var view_link = "
|
| 60 |
div_popup.find(".admin-menu-tree-page-view-popup-view a").attr("href", view_link);
|
| 61 |
|
| 62 |
if (do_show) {
|
| 56 |
div_popup.find(".admin-menu-tree-page-view-popup-edit a").attr("href", edit_link);
|
| 57 |
|
| 58 |
// view link, this is probably not such a safe way to this this. but let's try! :)
|
| 59 |
+
var view_link = $this.closest("li").find(".admin-menu-tree-page-view-view-link").text();
|
| 60 |
div_popup.find(".admin-menu-tree-page-view-popup-view a").attr("href", view_link);
|
| 61 |
|
| 62 |
if (do_show) {
|
styles.css
CHANGED
|
@@ -78,6 +78,11 @@ li.toplevel_page_admin-menu-tree-page-tree_main .wp-submenu a {
|
|
| 78 |
background-image: url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/ui-darkness/images/ui-icons_222222_256x240.png);
|
| 79 |
}
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
li.admin-menu-tree-page-tree_headline,
|
| 82 |
li.admin-menu-tree-page-filter
|
| 83 |
{
|
|
@@ -246,4 +251,5 @@ li.admin-menu-tree-page-filter
|
|
| 246 |
ul.admin-menu-tree-page-tree .highlight {
|
| 247 |
background-color: #fff879;
|
| 248 |
color: #21759B;
|
| 249 |
-
}
|
|
|
| 78 |
background-image: url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/ui-darkness/images/ui-icons_222222_256x240.png);
|
| 79 |
}
|
| 80 |
|
| 81 |
+
#adminmenu li ul.admin-menu-tree-page-tree a .admin-menu-tree-page-view-view-link {
|
| 82 |
+
display: none;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
|
| 86 |
li.admin-menu-tree-page-tree_headline,
|
| 87 |
li.admin-menu-tree-page-filter
|
| 88 |
{
|
| 251 |
ul.admin-menu-tree-page-tree .highlight {
|
| 252 |
background-color: #fff879;
|
| 253 |
color: #21759B;
|
| 254 |
+
}
|
| 255 |
+
|
