WordPress.org

Plugin Directory

Changeset 779826


Ignore:
Timestamp:
09/29/13 13:01:52 (7 months ago)
Author:
eskapism
Message:

version 1.2.14

Location:
cms-tree-page-view
Files:
4 added
7 edited
22 copied

Legend:

Unmodified
Added
Removed
  • cms-tree-page-view

    • Property svn:ignore set to
      .svn
      *.sublime-workspace


  • cms-tree-page-view/tags/1.2.14/functions.php

    r696892 r779826  
    231231 
    232232    if (!cms_tpv_is_one_of_our_pages()) return; 
    233  
     233     
    234234    cms_tpv_setup_postsoverview(); 
    235235 
     
    369369 
    370370    // add row to plugin page 
    371  
    372371    add_filter( 'plugin_row_meta', 'cms_tpv_set_plugin_row_meta', 10, 2 ); 
     372 
     373    // @todo: register settings 
     374    #add_settings_section("cms_tree_page_view_settings", "cms_tree_page_view", "", ""); 
     375    #register_setting( 'cms_tree_page_view_settings', "post-type-dashboard-post" ); 
     376 
    373377 
    374378} 
     
    383387 
    384388    if ("edit" === $current_screen->base && in_array($current_screen->post_type, $options["postsoverview"])) { 
    385  
     389         
    386390        // Ok, this is a post overview page that we are enabled for 
    387391        add_filter("views_" . $current_screen->id, "cmstpv_filter_views_edit_postsoverview"); 
     
    432436    cms_tpv_print_common_tree_stuff(); 
    433437    $tree_common_stuff = ob_get_clean(); 
    434  
    435438    /* 
    436439    on non hierarcical post types this one exists: 
     
    511514        $options["postsoverview"] = isset( $_POST["post-type-postsoverview"] ) ? (array) $_POST["post-type-postsoverview"] : array(); 
    512515 
    513         update_option('cms_tpv_options', $options); // enable this to show box 
     516        update_option('cms_tpv_options', $options); 
    514517 
    515518    } 
     
    789792 */ 
    790793function cms_tpv_print_common_tree_stuff($post_type = "") { 
    791  
     794     
    792795    global $sitepress, $cms_tpv_view, $wpdb; 
    793796 
     
    845848    } 
    846849 
     850     
    847851    // output js for the root/top level 
    848852    // function cms_tpv_print_childs($pageID, $view = "all", $arrOpenChilds = null, $post_type) { 
     
    856860        } 
    857861    } 
     862     
     863 
    858864    ob_start(); 
    859865    cms_tpv_print_childs(0, $cms_tpv_view, $jstree_open, $post_type); 
    860866    $json_data = ob_get_clean(); 
     867 
    861868    if (! $json_data) $json_data = '{}'; 
    862869    ?> 
     
    11201127    $get_posts_args = array( 
    11211128        "numberposts" => "-1", 
    1122         "orderby" => "menu_order", 
     1129        "orderby" => "menu_order title", 
    11231130        "order" => "ASC", 
    11241131        // "caller_get_posts" => 1, // get sticky posts in natural order (or so I understand it anyway). Deprecated since 3.1 
     
    11831190 
    11841191    if ($arrPages) { 
    1185      
     1192 
    11861193        global $current_screen; 
    11871194        $screen = convert_to_screen("edit"); 
    1188         $screen->post_type = null; 
     1195        #return;     
     1196         
     1197        // If this is set to null then quick/bul edit stops working on posts (not pages) 
     1198        // If did set it to null sometime. Can't remember why... 
     1199        // $screen->post_type = null; 
     1200 
    11891201        $post_type_object = get_post_type_object($post_type); 
    1190  
    11911202        ob_start(); // some plugins, for example magic fields, return javascript and things here. we're not compatible with that, so just swallow any output 
    11921203        $posts_columns = get_column_headers($screen); 
     
    12441255            // last edited by 
    12451256            setup_postdata($post); 
    1246             $post_author = get_the_modified_author(); 
     1257 
     1258            $post_author = cms_tpv_get_the_modified_author(); 
    12471259            if (empty($post_author)) { 
    12481260                $post_author = __("Unknown user", 'cms-tree-page-view'); 
     
    17261738 
    17271739 
     1740/** 
     1741 * Install function 
     1742 * Called from hook register_activation_hook() 
     1743 */ 
    17281744function cms_tpv_install() { 
    17291745 
     
    17331749    // first install or pre custom posts version: 
    17341750    // make sure pages are enabled by default 
    1735     // run on admin_init so most themes and plugins have time to setup their things. late prio too. 
    1736     add_action("admin_init", "cms_tpv_setup_defaults", 999); 
     1751    cms_tpv_setup_defaults(); 
    17371752 
    17381753    // set to current version 
     
    17521767 
    17531768    if ($version <= 0) { 
    1754  
     1769        #error_log("tree: setup defaults, beacuse db version less than 0"); 
    17551770        $options = array(); 
    17561771 
     
    17791794} 
    17801795 
    1781 // when plugins are loaded, check if current plugin version is same as stored 
    1782 // if not = it's an upgrade. right? 
     1796/** 
     1797 * when plugins are loaded, check if current plugin version is same as stored 
     1798 * if not = it's an upgrade. right? 
     1799 */ 
    17831800function cms_tpv_plugins_loaded($a) { 
    17841801    $installed_version = get_option('cms_tpv_version', 0); 
     
    17931810 
    17941811} 
     1812 
     1813/** 
     1814 * modified version of get_the_modified_author() that checks that user was retrieved before applying filters 
     1815 * according to http://wordpress.org/support/topic/better-wp-security-conflict-1?replies=7 some users 
     1816 * had problems when a user had been deleted 
     1817 */ 
     1818function cms_tpv_get_the_modified_author() { 
     1819    if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) { 
     1820        $last_user = get_userdata($last_id); 
     1821        if( $last_user !== false ){ 
     1822            return apply_filters('the_modified_author', $last_user->display_name); 
     1823        } 
     1824    } 
     1825} 
  • cms-tree-page-view/tags/1.2.14/index.php

    r748669 r779826  
    44Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/ 
    55Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this! 
    6 Version: 1.2.13 
     6Version: 1.2.14 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    2828#require("functions.php"); 
    2929 
    30 define( "CMS_TPV_VERSION", "1.2.13"); 
     30define( "CMS_TPV_VERSION", "1.2.14"); 
    3131define( "CMS_TPV_NAME", "CMS Tree Page View"); 
    3232 
  • cms-tree-page-view/tags/1.2.14/languages/cms-tree-page-view-nb_NO.po

    r399828 r779826  
    1 # Translation of the WordPress plugin   by . 
    2 # Copyright (C) 2010 
     1# Copyright (C) 2013  
    32# This file is distributed under the same license as the  package. 
    4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2010. 
    5 # 
    63msgid "" 
    74msgstr "" 
    85"Project-Id-Version: \n" 
    96"Report-Msgid-Bugs-To: http://wordpress.org/tag/cms-tree-page-view\n" 
    10 "POT-Creation-Date: 2010-06-30 19:00+0000\n" 
    11 "PO-Revision-Date: 2011-06-22 11:37+0100\n" 
    12 "Last-Translator: Eigil Moe <1@eigil.biz>\n" 
    13 "Language-Team: \n" 
     7"POT-Creation-Date: 2013-04-16 17:39:45+00:00\n" 
    148"MIME-Version: 1.0\n" 
    15 "Content-Type: text/plain; charset=utf-8\n" 
     9"Content-Type: text/plain; charset=UTF-8\n" 
    1610"Content-Transfer-Encoding: 8bit\n" 
    17  
    18 #: functions.php:45 
     11"PO-Revision-Date: 2013-06-30 19:31+0100\n" 
     12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     13"Language-Team: LANGUAGE <LL@li.org>\n" 
     14"X-Generator: Poedit 1.5.5\n" 
     15 
     16#: functions.php:66 functions.php:113 functions.php:1396 
     17msgid "Cheatin&#8217; uh?" 
     18msgstr "" 
     19 
     20#: functions.php:321 
    1921msgid "Enter title of new page" 
    20 msgstr "Skriv inn tittelen på ny side" 
    21  
    22 #: functions.php:46 
     22msgstr "Skriv inn tittel op ny side" 
     23 
     24#: functions.php:322 
    2325msgid "child pages" 
    24 msgstr "underordnede sider" 
    25  
    26 #: functions.php:47 
     26msgstr "undersider" 
     27 
     28#: functions.php:323 functions.php:970 
    2729msgid "Edit page" 
    28 msgstr "Rediger siden" 
    29  
    30 #: functions.php:48 
     30msgstr "Rediger side" 
     31 
     32#: functions.php:324 functions.php:971 
    3133msgid "View page" 
    32 msgstr "Vis side" 
    33  
    34 #: functions.php:49 
     34msgstr "Se side" 
     35 
     36#: functions.php:325 functions.php:970 
    3537msgid "Edit" 
    3638msgstr "Rediger" 
    3739 
    38 #: functions.php:50 
     40#: functions.php:326 functions.php:971 
    3941msgid "View" 
    40 msgstr "Vis" 
    41  
    42 #: functions.php:51 
     42msgstr "Se på" 
     43 
     44#: functions.php:327 
    4345msgid "Add page" 
    4446msgstr "Legg til side" 
    4547 
    46 #: functions.php:52 
     48#: functions.php:328 functions.php:979 
    4749msgid "Add new page after" 
    4850msgstr "Legg til ny side etter" 
    4951 
    50 #: functions.php:53 
     52#: functions.php:329 
    5153msgid "after" 
    5254msgstr "etter" 
    5355 
    54 #: functions.php:54 
     56#: functions.php:330 
    5557msgid "inside" 
    5658msgstr "inne i" 
    5759 
    58 #: functions.php:55 
     60#: functions.php:331 
     61msgid "Sorry, can't create a sub page to a page with status \"draft\"." 
     62msgstr "Beklager, kan ikke legge til underside med status  \"kladd\"." 
     63 
     64#: functions.php:332 
     65msgid "Sorry, can't create a sub page to a page with status \"trash\"." 
     66msgstr "Beklager, kan ikke legge til underside med status  \"søppel\"." 
     67 
     68#: functions.php:333 
     69msgid "Sorry, can't create a page after a page with status \"trash\"." 
     70msgstr "" 
     71"Beklager, kan ikke legge til en side etter en side med status  \"søppel\"." 
     72 
     73#: functions.php:334 functions.php:984 
    5974msgid "Add new page inside" 
    6075msgstr "Legg til ny side inne i" 
    6176 
    62 #: functions.php:56 
     77#: functions.php:335 functions.php:341 
    6378msgid "draft" 
    6479msgstr "kladd" 
    6580 
    66 #: functions.php:57 
     81#: functions.php:336 functions.php:342 
    6782msgid "future" 
    68 msgstr "fremtidig" 
    69  
    70 #: functions.php:58 
     83msgstr "fremtid" 
     84 
     85#: functions.php:337 functions.php:343 
    7186msgid "protected" 
    72 msgstr "beskyttes" 
    73  
    74 #: functions.php:59 
     87msgstr "beskyttet" 
     88 
     89#: functions.php:338 functions.php:344 functions.php:1296 
    7590msgid "pending" 
    76 msgstr "påvente" 
    77  
    78 #: functions.php:60 
     91msgstr "ventende" 
     92 
     93#: functions.php:339 functions.php:345 
    7994msgid "private" 
    8095msgstr "privat" 
    8196 
    82 #: functions.php:61 
     97#: functions.php:340 functions.php:346 
     98msgid "trash" 
     99msgstr "søppel" 
     100 
     101#: functions.php:347 
    83102msgid "Password protected page" 
    84 msgstr "Passordbeskyttet side" 
    85  
    86 #: functions.php:113 
     103msgstr "passorbeskyttet side" 
     104 
     105#: functions.php:348 
     106msgid "Adding page..." 
     107msgstr "Legger til side.." 
     108 
     109#: functions.php:349 
     110msgid "Adding ..." 
     111msgstr "Legger til.." 
     112 
     113#: functions.php:350 functions.php:1057 
     114msgid "No posts found." 
     115msgstr "Ingen innlegg funnet" 
     116 
     117#: functions.php:448 
     118msgid "Tree View" 
     119msgstr "Tremeny" 
     120 
     121#: functions.php:457 
     122msgid "List View" 
     123msgstr "Listemeny" 
     124 
     125#: functions.php:493 
     126msgid "Settings" 
     127msgstr "Innstillinger" 
     128 
     129#: functions.php:533 
     130msgctxt "name of dashboard" 
     131msgid "%1$s Tree" 
     132msgstr "%1$s Tre" 
     133 
     134#: functions.php:571 
     135msgctxt "name in menu" 
     136msgid "Tree View" 
     137msgstr "Tremeny" 
     138 
     139#: functions.php:572 
     140msgctxt "title on page with tree" 
     141msgid "%1$s Tree View" 
     142msgstr "%1$s Tremeny" 
     143 
     144#: functions.php:592 
    87145msgid "settings" 
    88146msgstr "innstillinger" 
    89147 
    90 #: functions.php:120 
    91 msgid "Show tree" 
    92 msgstr "Vis tre" 
    93  
    94 #: functions.php:124 
    95 msgid "on the dashboard" 
    96 msgstr "på skrivebordet" 
    97  
    98 #: functions.php:128 
    99 msgid "under the pages menu" 
    100 msgstr "under sidenes meny" 
    101  
    102 #: functions.php:135 
     148#: functions.php:598 
     149msgid "Select where to show a tree for pages and custom post types" 
     150msgstr "" 
     151 
     152#: functions.php:642 
     153msgid "On dashboard" 
     154msgstr "" 
     155 
     156#: functions.php:646 
     157msgid "In menu" 
     158msgstr "" 
     159 
     160#: functions.php:650 
     161msgid "On post overview screen" 
     162msgstr "" 
     163 
     164#: functions.php:669 
    103165msgid "Save Changes" 
    104 msgstr "Lagre Endringene" 
    105  
    106 #: functions.php:150 
    107 msgid "No pages found. Maybe you want to <a href='post-new.php?post_type=page'>add a new page</a>?" 
    108 msgstr "Ingen sider funnet. Kanskje du vil  <a href='post-new.php?post_type=page'>legge til en ny side</a>?" 
    109  
    110 #: functions.php:157 
     166msgstr "Lagre endringer" 
     167 
     168#: functions.php:913 
    111169msgid "All" 
    112170msgstr "Alle" 
    113171 
    114 #: functions.php:158 
     172#: functions.php:918 
    115173msgid "Public" 
    116174msgstr "Offentlig" 
    117175 
    118 #: functions.php:160 
     176#: functions.php:923 
     177msgid "Trash" 
     178msgstr "Søppel" 
     179 
     180#: functions.php:931 
    119181msgid "Expand" 
    120 msgstr "Ekspander" 
    121  
    122 #: functions.php:161 
     182msgstr "Utvid" 
     183 
     184#: functions.php:932 
    123185msgid "Collapse" 
    124 msgstr "Kollaps" 
    125  
    126 #: functions.php:166 
     186msgstr "Kollapse" 
     187 
     188#: functions.php:940 
    127189msgid "Clear search" 
    128 msgstr "Fjern søk" 
    129  
    130 #: functions.php:167 
     190msgstr "Slett søk" 
     191 
     192#: functions.php:941 
    131193msgid "Search" 
    132194msgstr "Søk" 
    133195 
    134 #: functions.php:168 
     196#: functions.php:942 
    135197msgid "Searching..." 
    136 msgstr "Søker..." 
    137  
    138 #: functions.php:173 
     198msgstr "Søker.." 
     199 
     200#: functions.php:943 
     201msgid "Nothing found." 
     202msgstr "Ingenting funnet." 
     203 
     204#: functions.php:950 
    139205msgid "Loading..." 
    140 msgstr "Laster..." 
    141  
    142 #: functions.php:175 
     206msgstr "Laster.." 
     207 
     208#: functions.php:955 
    143209msgid "Search: no pages found" 
    144 msgstr "Søk: ingen sider funnet" 
    145  
    146 #: functions.php:177 
     210msgstr "Søk: Ingen sider funnet" 
     211 
     212#: functions.php:958 
    147213msgid "Loading tree" 
    148 msgstr "Laster tre" 
    149  
    150 #: functions.php:277 
     214msgstr "Laster treet" 
     215 
     216#: functions.php:979 functions.php:1016 
     217msgid "After" 
     218msgstr "Etter" 
     219 
     220#: functions.php:984 functions.php:1017 
     221msgid "Inside" 
     222msgstr "Inne i" 
     223 
     224#: functions.php:988 
     225msgid "Can not create page inside of a page with draft status" 
     226msgstr "Kan ikke lage en side inne i en side med status kladd" 
     227 
     228#: functions.php:1005 
     229msgid "Add page(s)" 
     230msgstr "Legg til side(r)" 
     231 
     232#: functions.php:1010 
     233msgid "Enter title here" 
     234msgstr "Legg til tittel her" 
     235 
     236#: functions.php:1015 
     237msgid "Position" 
     238msgstr "Stilling" 
     239 
     240#: functions.php:1022 
     241msgid "Status" 
     242msgstr "Status" 
     243 
     244#: functions.php:1023 
     245msgid "Draft" 
     246msgstr "Kladd" 
     247 
     248#: functions.php:1024 
     249msgid "Published" 
     250msgstr "Publisert" 
     251 
     252#: functions.php:1028 
     253msgid "Add" 
     254msgstr "Legg til" 
     255 
     256#: functions.php:1029 
     257msgid "or" 
     258msgstr "eller" 
     259 
     260#: functions.php:1030 
     261msgid "cancel" 
     262msgstr "avbryte" 
     263 
     264#: functions.php:1040 
     265msgid "Last modified" 
     266msgstr "Sist endret" 
     267 
     268#: functions.php:1042 
     269msgid "by" 
     270msgstr "av" 
     271 
     272#: functions.php:1045 
     273msgid "Page ID" 
     274msgstr "Sidens ID" 
     275 
     276#: functions.php:1088 
     277msgctxt "headline of page with tree" 
     278msgid "%1$s Tree View" 
     279msgstr "%1$s Tremeny" 
     280 
     281#: functions.php:1248 
     282msgid "Unknown user" 
     283msgstr "Ukjent bruker" 
     284 
     285#: functions.php:1253 
    151286msgid "<Untitled page>" 
    152 msgstr "<Uten tittel>" 
    153  
    154 #: functions.php:295 
    155 msgid "Click to edit. Drag to move." 
    156 msgstr "Klikk for å redigere. Dra for å flytte." 
    157  
    158 #: functions.php:432 
     287msgstr "<Ukjent side>" 
     288 
     289#: functions.php:1286 
     290msgid "Comments" 
     291msgstr "Kommentarer" 
     292 
     293#: functions.php:1293 
     294msgid "%s pending" 
     295msgstr "%s venter" 
     296 
     297#: functions.php:1303 
     298msgctxt "comment count" 
     299msgid "0" 
     300msgstr "0" 
     301 
     302#: functions.php:1303 
     303msgctxt "comment count" 
     304msgid "1" 
     305msgstr "1" 
     306 
     307#: functions.php:1303 
     308msgctxt "comment count" 
     309msgid "%" 
     310msgstr "%" 
     311 
     312#: functions.php:1502 
    159313msgid "New page" 
    160314msgstr "Ny side" 
    161315 
     316#: functions.php:1692 
     317msgid "Thanks for using my plugin" 
     318msgstr "" 
     319 
     320#: functions.php:1694 
     321msgid "" 
     322"Hi there! I just wanna says thanks for using my plugin. I hope you like it " 
     323"as much as I do." 
     324msgstr "" 
     325 
     326#: functions.php:1695 
     327msgid "/Pär Thernström - plugin creator" 
     328msgstr "" 
     329 
     330#: functions.php:1697 
     331msgid "I like this plugin<br>– how can I thank you?" 
     332msgstr "" 
     333 
     334#: functions.php:1698 
     335msgid "There are serveral ways for you to show your appreciation:" 
     336msgstr "" 
     337 
     338#: functions.php:1700 
     339msgid "" 
     340"<a href=\"%1$s\">Give it a nice review</a> over at the WordPress Plugin " 
     341"Directory" 
     342msgstr "" 
     343 
     344#: functions.php:1701 
     345msgid "<a href=\"%1$s\">Give a donation</a> – any amount will make me happy" 
     346msgstr "" 
     347 
     348#: functions.php:1702 
     349msgid "" 
     350"<a href=\"%1$s\">Post a nice tweet</a> or make a nice blog post about the " 
     351"plugin" 
     352msgstr "" 
     353 
     354#: functions.php:1705 
     355msgid "Support" 
     356msgstr "" 
     357 
     358#: functions.php:1706 
     359msgid "Plese see the <a href=\"%1$s\">support forum</a> for help." 
     360msgstr "" 
     361 
     362#: functions.php:1710 
     363msgid "Hide until next upgrade" 
     364msgstr "" 
  • cms-tree-page-view/tags/1.2.14/readme.txt

    r748669 r779826  
    44Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin 
    55Requires at least: 3.5.1 
    6 Tested up to: 3.5.1 
    7 Stable tag: 1.2.13 
     6Tested up to: 3.6.1 
     7Stable tag: 1.2.14 
    88 
    99Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages. 
     
    112112== Changelog == 
    113113 
     114= 1.2.14 
     115- Now the tree view is enabled by default for hiearchical post types. Should make it easier for new users to get started. 
     116- Removed some annoying calls to console.log(). 
     117- Fixed bulk edit and quick edit not working for posts. Fixes http://wordpress.org/support/topic/breaks-bulk-edit-feature. 
     118- Fixed error with removed users. Fixes http://wordpress.org/support/topic/better-wp-security-conflict-1. 
     119- Order now also includes post_title instead of just menu_order. Fixes http://wordpress.org/support/topic/orderby-should-include-post_title. 
     120- Updated norwegian translation. 
     121 
    114122= 1.2.13 = 
    115123- Added Serbo-Croatian translation by Andrijana Nikolic from [webhostinggeeks](http://webhostinggeeks.com/) 
  • cms-tree-page-view/tags/1.2.14/scripts/cms_tree_page_view.js

    r709847 r779826  
    153153    my.log = function(what) { 
    154154        if (typeof(window.console) === "object" && typeof(window.console.log) === "function" ) { 
    155             console.log(what); 
     155            // console.log(what); 
    156156        } 
    157157    }; 
  • cms-tree-page-view/trunk/functions.php

    r696892 r779826  
    231231 
    232232    if (!cms_tpv_is_one_of_our_pages()) return; 
    233  
     233     
    234234    cms_tpv_setup_postsoverview(); 
    235235 
     
    369369 
    370370    // add row to plugin page 
    371  
    372371    add_filter( 'plugin_row_meta', 'cms_tpv_set_plugin_row_meta', 10, 2 ); 
     372 
     373    // @todo: register settings 
     374    #add_settings_section("cms_tree_page_view_settings", "cms_tree_page_view", "", ""); 
     375    #register_setting( 'cms_tree_page_view_settings', "post-type-dashboard-post" ); 
     376 
    373377 
    374378} 
     
    383387 
    384388    if ("edit" === $current_screen->base && in_array($current_screen->post_type, $options["postsoverview"])) { 
    385  
     389         
    386390        // Ok, this is a post overview page that we are enabled for 
    387391        add_filter("views_" . $current_screen->id, "cmstpv_filter_views_edit_postsoverview"); 
     
    432436    cms_tpv_print_common_tree_stuff(); 
    433437    $tree_common_stuff = ob_get_clean(); 
    434  
    435438    /* 
    436439    on non hierarcical post types this one exists: 
     
    511514        $options["postsoverview"] = isset( $_POST["post-type-postsoverview"] ) ? (array) $_POST["post-type-postsoverview"] : array(); 
    512515 
    513         update_option('cms_tpv_options', $options); // enable this to show box 
     516        update_option('cms_tpv_options', $options); 
    514517 
    515518    } 
     
    789792 */ 
    790793function cms_tpv_print_common_tree_stuff($post_type = "") { 
    791  
     794     
    792795    global $sitepress, $cms_tpv_view, $wpdb; 
    793796 
     
    845848    } 
    846849 
     850     
    847851    // output js for the root/top level 
    848852    // function cms_tpv_print_childs($pageID, $view = "all", $arrOpenChilds = null, $post_type) { 
     
    856860        } 
    857861    } 
     862     
     863 
    858864    ob_start(); 
    859865    cms_tpv_print_childs(0, $cms_tpv_view, $jstree_open, $post_type); 
    860866    $json_data = ob_get_clean(); 
     867 
    861868    if (! $json_data) $json_data = '{}'; 
    862869    ?> 
     
    11201127    $get_posts_args = array( 
    11211128        "numberposts" => "-1", 
    1122         "orderby" => "menu_order", 
     1129        "orderby" => "menu_order title", 
    11231130        "order" => "ASC", 
    11241131        // "caller_get_posts" => 1, // get sticky posts in natural order (or so I understand it anyway). Deprecated since 3.1 
     
    11831190 
    11841191    if ($arrPages) { 
    1185      
     1192 
    11861193        global $current_screen; 
    11871194        $screen = convert_to_screen("edit"); 
    1188         $screen->post_type = null; 
     1195        #return;     
     1196         
     1197        // If this is set to null then quick/bul edit stops working on posts (not pages) 
     1198        // If did set it to null sometime. Can't remember why... 
     1199        // $screen->post_type = null; 
     1200 
    11891201        $post_type_object = get_post_type_object($post_type); 
    1190  
    11911202        ob_start(); // some plugins, for example magic fields, return javascript and things here. we're not compatible with that, so just swallow any output 
    11921203        $posts_columns = get_column_headers($screen); 
     
    12441255            // last edited by 
    12451256            setup_postdata($post); 
    1246             $post_author = get_the_modified_author(); 
     1257 
     1258            $post_author = cms_tpv_get_the_modified_author(); 
    12471259            if (empty($post_author)) { 
    12481260                $post_author = __("Unknown user", 'cms-tree-page-view'); 
     
    17261738 
    17271739 
     1740/** 
     1741 * Install function 
     1742 * Called from hook register_activation_hook() 
     1743 */ 
    17281744function cms_tpv_install() { 
    17291745 
     
    17331749    // first install or pre custom posts version: 
    17341750    // make sure pages are enabled by default 
    1735     // run on admin_init so most themes and plugins have time to setup their things. late prio too. 
    1736     add_action("admin_init", "cms_tpv_setup_defaults", 999); 
     1751    cms_tpv_setup_defaults(); 
    17371752 
    17381753    // set to current version 
     
    17521767 
    17531768    if ($version <= 0) { 
    1754  
     1769        #error_log("tree: setup defaults, beacuse db version less than 0"); 
    17551770        $options = array(); 
    17561771 
     
    17791794} 
    17801795 
    1781 // when plugins are loaded, check if current plugin version is same as stored 
    1782 // if not = it's an upgrade. right? 
     1796/** 
     1797 * when plugins are loaded, check if current plugin version is same as stored 
     1798 * if not = it's an upgrade. right? 
     1799 */ 
    17831800function cms_tpv_plugins_loaded($a) { 
    17841801    $installed_version = get_option('cms_tpv_version', 0); 
     
    17931810 
    17941811} 
     1812 
     1813/** 
     1814 * modified version of get_the_modified_author() that checks that user was retrieved before applying filters 
     1815 * according to http://wordpress.org/support/topic/better-wp-security-conflict-1?replies=7 some users 
     1816 * had problems when a user had been deleted 
     1817 */ 
     1818function cms_tpv_get_the_modified_author() { 
     1819    if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) { 
     1820        $last_user = get_userdata($last_id); 
     1821        if( $last_user !== false ){ 
     1822            return apply_filters('the_modified_author', $last_user->display_name); 
     1823        } 
     1824    } 
     1825} 
  • cms-tree-page-view/trunk/index.php

    r748669 r779826  
    44Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/ 
    55Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this! 
    6 Version: 1.2.13 
     6Version: 1.2.14 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    2828#require("functions.php"); 
    2929 
    30 define( "CMS_TPV_VERSION", "1.2.13"); 
     30define( "CMS_TPV_VERSION", "1.2.14"); 
    3131define( "CMS_TPV_NAME", "CMS Tree Page View"); 
    3232 
  • cms-tree-page-view/trunk/languages/cms-tree-page-view-nb_NO.po

    r399828 r779826  
    1 # Translation of the WordPress plugin   by . 
    2 # Copyright (C) 2010 
     1# Copyright (C) 2013  
    32# This file is distributed under the same license as the  package. 
    4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2010. 
    5 # 
    63msgid "" 
    74msgstr "" 
    85"Project-Id-Version: \n" 
    96"Report-Msgid-Bugs-To: http://wordpress.org/tag/cms-tree-page-view\n" 
    10 "POT-Creation-Date: 2010-06-30 19:00+0000\n" 
    11 "PO-Revision-Date: 2011-06-22 11:37+0100\n" 
    12 "Last-Translator: Eigil Moe <1@eigil.biz>\n" 
    13 "Language-Team: \n" 
     7"POT-Creation-Date: 2013-04-16 17:39:45+00:00\n" 
    148"MIME-Version: 1.0\n" 
    15 "Content-Type: text/plain; charset=utf-8\n" 
     9"Content-Type: text/plain; charset=UTF-8\n" 
    1610"Content-Transfer-Encoding: 8bit\n" 
    17  
    18 #: functions.php:45 
     11"PO-Revision-Date: 2013-06-30 19:31+0100\n" 
     12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     13"Language-Team: LANGUAGE <LL@li.org>\n" 
     14"X-Generator: Poedit 1.5.5\n" 
     15 
     16#: functions.php:66 functions.php:113 functions.php:1396 
     17msgid "Cheatin&#8217; uh?" 
     18msgstr "" 
     19 
     20#: functions.php:321 
    1921msgid "Enter title of new page" 
    20 msgstr "Skriv inn tittelen på ny side" 
    21  
    22 #: functions.php:46 
     22msgstr "Skriv inn tittel op ny side" 
     23 
     24#: functions.php:322 
    2325msgid "child pages" 
    24 msgstr "underordnede sider" 
    25  
    26 #: functions.php:47 
     26msgstr "undersider" 
     27 
     28#: functions.php:323 functions.php:970 
    2729msgid "Edit page" 
    28 msgstr "Rediger siden" 
    29  
    30 #: functions.php:48 
     30msgstr "Rediger side" 
     31 
     32#: functions.php:324 functions.php:971 
    3133msgid "View page" 
    32 msgstr "Vis side" 
    33  
    34 #: functions.php:49 
     34msgstr "Se side" 
     35 
     36#: functions.php:325 functions.php:970 
    3537msgid "Edit" 
    3638msgstr "Rediger" 
    3739 
    38 #: functions.php:50 
     40#: functions.php:326 functions.php:971 
    3941msgid "View" 
    40 msgstr "Vis" 
    41  
    42 #: functions.php:51 
     42msgstr "Se på" 
     43 
     44#: functions.php:327 
    4345msgid "Add page" 
    4446msgstr "Legg til side" 
    4547 
    46 #: functions.php:52 
     48#: functions.php:328 functions.php:979 
    4749msgid "Add new page after" 
    4850msgstr "Legg til ny side etter" 
    4951 
    50 #: functions.php:53 
     52#: functions.php:329 
    5153msgid "after" 
    5254msgstr "etter" 
    5355 
    54 #: functions.php:54 
     56#: functions.php:330 
    5557msgid "inside" 
    5658msgstr "inne i" 
    5759 
    58 #: functions.php:55 
     60#: functions.php:331 
     61msgid "Sorry, can't create a sub page to a page with status \"draft\"." 
     62msgstr "Beklager, kan ikke legge til underside med status  \"kladd\"." 
     63 
     64#: functions.php:332 
     65msgid "Sorry, can't create a sub page to a page with status \"trash\"." 
     66msgstr "Beklager, kan ikke legge til underside med status  \"søppel\"." 
     67 
     68#: functions.php:333 
     69msgid "Sorry, can't create a page after a page with status \"trash\"." 
     70msgstr "" 
     71"Beklager, kan ikke legge til en side etter en side med status  \"søppel\"." 
     72 
     73#: functions.php:334 functions.php:984 
    5974msgid "Add new page inside" 
    6075msgstr "Legg til ny side inne i" 
    6176 
    62 #: functions.php:56 
     77#: functions.php:335 functions.php:341 
    6378msgid "draft" 
    6479msgstr "kladd" 
    6580 
    66 #: functions.php:57 
     81#: functions.php:336 functions.php:342 
    6782msgid "future" 
    68 msgstr "fremtidig" 
    69  
    70 #: functions.php:58 
     83msgstr "fremtid" 
     84 
     85#: functions.php:337 functions.php:343 
    7186msgid "protected" 
    72 msgstr "beskyttes" 
    73  
    74 #: functions.php:59 
     87msgstr "beskyttet" 
     88 
     89#: functions.php:338 functions.php:344 functions.php:1296 
    7590msgid "pending" 
    76 msgstr "påvente" 
    77  
    78 #: functions.php:60 
     91msgstr "ventende" 
     92 
     93#: functions.php:339 functions.php:345 
    7994msgid "private" 
    8095msgstr "privat" 
    8196 
    82 #: functions.php:61 
     97#: functions.php:340 functions.php:346 
     98msgid "trash" 
     99msgstr "søppel" 
     100 
     101#: functions.php:347 
    83102msgid "Password protected page" 
    84 msgstr "Passordbeskyttet side" 
    85  
    86 #: functions.php:113 
     103msgstr "passorbeskyttet side" 
     104 
     105#: functions.php:348 
     106msgid "Adding page..." 
     107msgstr "Legger til side.." 
     108 
     109#: functions.php:349 
     110msgid "Adding ..." 
     111msgstr "Legger til.." 
     112 
     113#: functions.php:350 functions.php:1057 
     114msgid "No posts found." 
     115msgstr "Ingen innlegg funnet" 
     116 
     117#: functions.php:448 
     118msgid "Tree View" 
     119msgstr "Tremeny" 
     120 
     121#: functions.php:457 
     122msgid "List View" 
     123msgstr "Listemeny" 
     124 
     125#: functions.php:493 
     126msgid "Settings" 
     127msgstr "Innstillinger" 
     128 
     129#: functions.php:533 
     130msgctxt "name of dashboard" 
     131msgid "%1$s Tree" 
     132msgstr "%1$s Tre" 
     133 
     134#: functions.php:571 
     135msgctxt "name in menu" 
     136msgid "Tree View" 
     137msgstr "Tremeny" 
     138 
     139#: functions.php:572 
     140msgctxt "title on page with tree" 
     141msgid "%1$s Tree View" 
     142msgstr "%1$s Tremeny" 
     143 
     144#: functions.php:592 
    87145msgid "settings" 
    88146msgstr "innstillinger" 
    89147 
    90 #: functions.php:120 
    91 msgid "Show tree" 
    92 msgstr "Vis tre" 
    93  
    94 #: functions.php:124 
    95 msgid "on the dashboard" 
    96 msgstr "på skrivebordet" 
    97  
    98 #: functions.php:128 
    99 msgid "under the pages menu" 
    100 msgstr "under sidenes meny" 
    101  
    102 #: functions.php:135 
     148#: functions.php:598 
     149msgid "Select where to show a tree for pages and custom post types" 
     150msgstr "" 
     151 
     152#: functions.php:642 
     153msgid "On dashboard" 
     154msgstr "" 
     155 
     156#: functions.php:646 
     157msgid "In menu" 
     158msgstr "" 
     159 
     160#: functions.php:650 
     161msgid "On post overview screen" 
     162msgstr "" 
     163 
     164#: functions.php:669 
    103165msgid "Save Changes" 
    104 msgstr "Lagre Endringene" 
    105  
    106 #: functions.php:150 
    107 msgid "No pages found. Maybe you want to <a href='post-new.php?post_type=page'>add a new page</a>?" 
    108 msgstr "Ingen sider funnet. Kanskje du vil  <a href='post-new.php?post_type=page'>legge til en ny side</a>?" 
    109  
    110 #: functions.php:157 
     166msgstr "Lagre endringer" 
     167 
     168#: functions.php:913 
    111169msgid "All" 
    112170msgstr "Alle" 
    113171 
    114 #: functions.php:158 
     172#: functions.php:918 
    115173msgid "Public" 
    116174msgstr "Offentlig" 
    117175 
    118 #: functions.php:160 
     176#: functions.php:923 
     177msgid "Trash" 
     178msgstr "Søppel" 
     179 
     180#: functions.php:931 
    119181msgid "Expand" 
    120 msgstr "Ekspander" 
    121  
    122 #: functions.php:161 
     182msgstr "Utvid" 
     183 
     184#: functions.php:932 
    123185msgid "Collapse" 
    124 msgstr "Kollaps" 
    125  
    126 #: functions.php:166 
     186msgstr "Kollapse" 
     187 
     188#: functions.php:940 
    127189msgid "Clear search" 
    128 msgstr "Fjern søk" 
    129  
    130 #: functions.php:167 
     190msgstr "Slett søk" 
     191 
     192#: functions.php:941 
    131193msgid "Search" 
    132194msgstr "Søk" 
    133195 
    134 #: functions.php:168 
     196#: functions.php:942 
    135197msgid "Searching..." 
    136 msgstr "Søker..." 
    137  
    138 #: functions.php:173 
     198msgstr "Søker.." 
     199 
     200#: functions.php:943 
     201msgid "Nothing found." 
     202msgstr "Ingenting funnet." 
     203 
     204#: functions.php:950 
    139205msgid "Loading..." 
    140 msgstr "Laster..." 
    141  
    142 #: functions.php:175 
     206msgstr "Laster.." 
     207 
     208#: functions.php:955 
    143209msgid "Search: no pages found" 
    144 msgstr "Søk: ingen sider funnet" 
    145  
    146 #: functions.php:177 
     210msgstr "Søk: Ingen sider funnet" 
     211 
     212#: functions.php:958 
    147213msgid "Loading tree" 
    148 msgstr "Laster tre" 
    149  
    150 #: functions.php:277 
     214msgstr "Laster treet" 
     215 
     216#: functions.php:979 functions.php:1016 
     217msgid "After" 
     218msgstr "Etter" 
     219 
     220#: functions.php:984 functions.php:1017 
     221msgid "Inside" 
     222msgstr "Inne i" 
     223 
     224#: functions.php:988 
     225msgid "Can not create page inside of a page with draft status" 
     226msgstr "Kan ikke lage en side inne i en side med status kladd" 
     227 
     228#: functions.php:1005 
     229msgid "Add page(s)" 
     230msgstr "Legg til side(r)" 
     231 
     232#: functions.php:1010 
     233msgid "Enter title here" 
     234msgstr "Legg til tittel her" 
     235 
     236#: functions.php:1015 
     237msgid "Position" 
     238msgstr "Stilling" 
     239 
     240#: functions.php:1022 
     241msgid "Status" 
     242msgstr "Status" 
     243 
     244#: functions.php:1023 
     245msgid "Draft" 
     246msgstr "Kladd" 
     247 
     248#: functions.php:1024 
     249msgid "Published" 
     250msgstr "Publisert" 
     251 
     252#: functions.php:1028 
     253msgid "Add" 
     254msgstr "Legg til" 
     255 
     256#: functions.php:1029 
     257msgid "or" 
     258msgstr "eller" 
     259 
     260#: functions.php:1030 
     261msgid "cancel" 
     262msgstr "avbryte" 
     263 
     264#: functions.php:1040 
     265msgid "Last modified" 
     266msgstr "Sist endret" 
     267 
     268#: functions.php:1042 
     269msgid "by" 
     270msgstr "av" 
     271 
     272#: functions.php:1045 
     273msgid "Page ID" 
     274msgstr "Sidens ID" 
     275 
     276#: functions.php:1088 
     277msgctxt "headline of page with tree" 
     278msgid "%1$s Tree View" 
     279msgstr "%1$s Tremeny" 
     280 
     281#: functions.php:1248 
     282msgid "Unknown user" 
     283msgstr "Ukjent bruker" 
     284 
     285#: functions.php:1253 
    151286msgid "<Untitled page>" 
    152 msgstr "<Uten tittel>" 
    153  
    154 #: functions.php:295 
    155 msgid "Click to edit. Drag to move." 
    156 msgstr "Klikk for å redigere. Dra for å flytte." 
    157  
    158 #: functions.php:432 
     287msgstr "<Ukjent side>" 
     288 
     289#: functions.php:1286 
     290msgid "Comments" 
     291msgstr "Kommentarer" 
     292 
     293#: functions.php:1293 
     294msgid "%s pending" 
     295msgstr "%s venter" 
     296 
     297#: functions.php:1303 
     298msgctxt "comment count" 
     299msgid "0" 
     300msgstr "0" 
     301 
     302#: functions.php:1303 
     303msgctxt "comment count" 
     304msgid "1" 
     305msgstr "1" 
     306 
     307#: functions.php:1303 
     308msgctxt "comment count" 
     309msgid "%" 
     310msgstr "%" 
     311 
     312#: functions.php:1502 
    159313msgid "New page" 
    160314msgstr "Ny side" 
    161315 
     316#: functions.php:1692 
     317msgid "Thanks for using my plugin" 
     318msgstr "" 
     319 
     320#: functions.php:1694 
     321msgid "" 
     322"Hi there! I just wanna says thanks for using my plugin. I hope you like it " 
     323"as much as I do." 
     324msgstr "" 
     325 
     326#: functions.php:1695 
     327msgid "/Pär Thernström - plugin creator" 
     328msgstr "" 
     329 
     330#: functions.php:1697 
     331msgid "I like this plugin<br>– how can I thank you?" 
     332msgstr "" 
     333 
     334#: functions.php:1698 
     335msgid "There are serveral ways for you to show your appreciation:" 
     336msgstr "" 
     337 
     338#: functions.php:1700 
     339msgid "" 
     340"<a href=\"%1$s\">Give it a nice review</a> over at the WordPress Plugin " 
     341"Directory" 
     342msgstr "" 
     343 
     344#: functions.php:1701 
     345msgid "<a href=\"%1$s\">Give a donation</a> – any amount will make me happy" 
     346msgstr "" 
     347 
     348#: functions.php:1702 
     349msgid "" 
     350"<a href=\"%1$s\">Post a nice tweet</a> or make a nice blog post about the " 
     351"plugin" 
     352msgstr "" 
     353 
     354#: functions.php:1705 
     355msgid "Support" 
     356msgstr "" 
     357 
     358#: functions.php:1706 
     359msgid "Plese see the <a href=\"%1$s\">support forum</a> for help." 
     360msgstr "" 
     361 
     362#: functions.php:1710 
     363msgid "Hide until next upgrade" 
     364msgstr "" 
  • cms-tree-page-view/trunk/readme.txt

    r748669 r779826  
    44Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin 
    55Requires at least: 3.5.1 
    6 Tested up to: 3.5.1 
    7 Stable tag: 1.2.13 
     6Tested up to: 3.6.1 
     7Stable tag: 1.2.14 
    88 
    99Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages. 
     
    112112== Changelog == 
    113113 
     114= 1.2.14 
     115- Now the tree view is enabled by default for hiearchical post types. Should make it easier for new users to get started. 
     116- Removed some annoying calls to console.log(). 
     117- Fixed bulk edit and quick edit not working for posts. Fixes http://wordpress.org/support/topic/breaks-bulk-edit-feature. 
     118- Fixed error with removed users. Fixes http://wordpress.org/support/topic/better-wp-security-conflict-1. 
     119- Order now also includes post_title instead of just menu_order. Fixes http://wordpress.org/support/topic/orderby-should-include-post_title. 
     120- Updated norwegian translation. 
     121 
    114122= 1.2.13 = 
    115123- Added Serbo-Croatian translation by Andrijana Nikolic from [webhostinggeeks](http://webhostinggeeks.com/) 
  • cms-tree-page-view/trunk/scripts/cms_tree_page_view.js

    r709847 r779826  
    153153    my.log = function(what) { 
    154154        if (typeof(window.console) === "object" && typeof(window.console.log) === "function" ) { 
    155             console.log(what); 
     155            // console.log(what); 
    156156        } 
    157157    }; 
Note: See TracChangeset for help on using the changeset viewer.