PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 All 36 releases
← All changes | apps/posts/posts.os.php +33 -0 1.1.8 → 1.1.12 View file →
@@ -59,8 +59,41 @@
59 59 return openstation_posts_app_config( 'posts', 'date', 'desc' );
60 60 }
61 61 )
62 62 ->state( openstation_posts_app_state( 'date', 'desc' ) )
63 + // The Posts menu, while this window answers for it: the dock's
64 + // submenu becomes these tabs and a row opens the window on its
65 + // own one. The runtime lands the window on it; the client view
66 + // renders the strip from the same list.
67 + ->menu(
68 + 'edit.php',
69 + static function () {
70 + $tabs = array(
71 + 'posts' => array(
72 + 'label' => __( 'All posts', 'desktop-mode' ),
73 + 'page' => 'edit.php',
74 + ),
75 + 'new' => array(
76 + 'label' => __( 'Add Post', 'desktop-mode' ),
77 + 'page' => 'post-new.php',
78 + ),
79 + );
80 + // The taxonomy tabs are the taxonomy screens, so they
81 + // answer to the same capability those screens do.
82 + if ( current_user_can( 'manage_categories' ) ) {
83 + $tabs['categories'] = array(
84 + 'label' => __( 'Categories', 'desktop-mode' ),
85 + 'page' => 'edit-tags.php?taxonomy=category',
86 + );
87 + $tabs['tags'] = array(
88 + 'label' => __( 'Tags', 'desktop-mode' ),
89 + 'page' => 'edit-tags.php?taxonomy=post_tag',
90 + );
91 + }
92 + return $tabs;
93 + },
94 + 'openstation_posts_window_user_can_use'
95 + )
63 96 ->action(
64 97 'filter',
65 98 static function ( State $state ) {
66 99 openstation_posts_app_filter( $state );