WordPress.org

Ready to get started?Download WordPress

Ideas

Page List and Editor Preferences: Apply to All Users

  1. bkjproductions
    Member

    WordPress has the ability to keep the preferences of both Lists of Posts and the Page/Post Editor layout. For example, in a List view of Pages, you can hide or show columns using theĀ Screen Options link at the top right. Likewise, when editing a Post or Page, you can control the visibility of the various Metaboxes on the page (such as Custom Fields). When using WP as a CMS, it would be great if the users all had the same preferences initially, in particular if you're using a plugin like Yoast's SEO and there are extra columns in a list of Pages or Posts---it can get quite confusing for the novice to see them.

    This information is stored in the database as part of the wp_usermeta table. For example, there is a meta_key named closedpostboxes_page with serialized data that expresses the current state of the Post editor's closed boxes.

    In the SQL example below, we have several Custom Post Types: Committees, Misc and Notes. So the meta_key "closedpostboxes_committees" has a meta_value with serialized data {wrapped: like, this}.

    In theory it should be easy to set the preferences for all users to have the same settings, which would make WordPress more like a CMS, as all users would have the same general Dashboard look.

    As a workaround for now, we can do a SQL INSERT command, if we know the user's ID.
    I'm hoping some clever developer can pick up on this and create a plugin for applying preferences from, say, the Admin, to all other users. Or maybe make it part of WP core?

    Here is an example for user ID 8:

    INSERT INTO  wp_usermeta
    ( user_id, meta_key, meta_value)
    VALUES
    ( 8, 'closedpostboxes_committees', 'a:7:{i:0;s:11:"categorydiv";i:1;s:16:"tagsdiv-post_tag";i:2;s:11:"postexcerpt";i:3;s:10:"wpseo_meta";i:4;s:10:"postcustom";i:5;s:16:"commentstatusdiv";i:6;s:13:"trackbacksdiv";}'),
    ( 8, 'closedpostboxes_dashboard', 'a:1:{i:0;s:11:"w3tc_latest";}'),
    ( 8, 'closedpostboxes_misc', 'a:5:{i:0;s:11:"categorydiv";i:1;s:16:"tagsdiv-post_tag";i:2;s:10:"wpseo_meta";i:3;s:10:"postcustom";i:4;s:16:"commentstatusdiv";}'),
    ( 8, 'closedpostboxes_notes', 'a:3:{i:0;s:16:"commentstatusdiv";i:1;s:10:"postcustom";i:2;s:11:"commentsdiv";}'),
    ( 8, 'closedpostboxes_page', 'a:3:{i:0;s:10:"wpseo_meta";i:1;s:10:"postcustom";i:2;s:18:"rs_event_sectionid";}'),
    ( 8, 'closedpostboxes_post', 'a:3:{i:0;s:10:"postcustom";i:1;s:18:"rs_event_sectionid";i:2;s:10:"wpseo_meta";}'),
    ( 8, 'edit_committees_per_page', '200'),
    ( 8, 'edit_misc_per_page', '200'),
    ( 8, 'edit_notes_per_page', '200'),
    ( 8, 'edit_page_per_page', '200'),
    ( 8, 'edit_post_per_page', '200'),
    ( 8, 'upload_per_page', '200'),
    ( 8, 'manageedit-committeescolumnshidden', 'a:16:{i:0;s:9:"Thumbnail";i:1;s:10:"categories";i:2;s:4:"tags";i:3;s:9:"post_type";i:4;s:11:"wpseo-score";i:5;s:11:"wpseo-title";i:6;s:14:"wpseo-metadesc";i:7;s:13:"wpseo-focuskw";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";}'),
    ( 8, 'manageedit-misccolumnshidden', 'a:12:{i:0;s:9:"post_type";i:1;s:9:"thumbnail";i:2;s:11:"wpseo-score";i:3;s:11:"wpseo-title";i:4;s:14:"wpseo-metadesc";i:5;s:13:"wpseo-focuskw";i:6;s:0:"";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";}'),
    ( 8, 'manageedit-notescolumnshidden', 'a:4:{i:0;s:9:"Thumbnail";i:1;s:9:"post_type";i:2;s:0:"";i:3;s:0:"";}'),
    ( 8, 'manageedit-pagecolumnshidden', 'a:14:{i:0;s:9:"Thumbnail";i:1;s:8:"comments";i:2;s:9:"post_type";i:3;s:11:"wpseo-score";i:4;s:11:"wpseo-title";i:5;s:14:"wpseo-metadesc";i:6;s:13:"wpseo-focuskw";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";}'),
    ( 8, 'manageedit-postcolumnshidden', 'a:14:{i:0;s:4:"tags";i:1;s:9:"post_type";i:2;s:9:"thumbnail";i:3;s:11:"wpseo-score";i:4;s:11:"wpseo-title";i:5;s:14:"wpseo-metadesc";i:6;s:13:"wpseo-focuskw";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";}'),
    ( 8, 'manageuploadcolumnshidden', 'a:2:{i:0;s:8:"comments";i:1;s:0:"";}'),
    ( 8, 'meta-box-order_committees', 'a:3:{s:4:"side";s:75:"submitdiv,pageparentdiv,categorydiv,tagsdiv-post_tag,authordiv,postimagediv";s:6:"normal";s:72:"postexcerpt,wpseo_meta,postcustom,commentstatusdiv,trackbacksdiv,slugdiv";s:8:"advanced";s:0:"";}'),
    ( 8, 'meta-box-order_dashboard', 'a:4:{s:6:"normal";s:82:"custom_help_widget,w3tc_pagespeed,dashboard_right_now,DashboardRecentPostsExtended";s:4:"side";s:11:"w3tc_latest";s:7:"column3";s:0:"";s:7:"column4";s:0:"";}'),
    ( 8, 'meta-box-order_misc', 'a:3:{s:4:"side";s:75:"submitdiv,categorydiv,tagsdiv-post_tag,postimagediv,pageparentdiv,authordiv";s:6:"normal";s:72:"postexcerpt,wpseo_meta,trackbacksdiv,postcustom,commentstatusdiv,slugdiv";s:8:"advanced";s:0:"";}'),
    ( 8, 'meta-box-order_notes', 'a:3:{s:4:"side";s:63:"submitdiv,pageparentdiv,postimagediv,authordiv,commentstatusdiv";s:6:"normal";s:42:"postexcerpt,postcustom,commentsdiv,slugdiv";s:8:"advanced";s:0:"";}'),
    ( 8, 'meta-box-order_page', 'a:3:{s:4:"side";s:46:"submitdiv,pageparentdiv,postimagediv,authordiv";s:6:"normal";s:26:"be_gallery_metabox,slugdiv";s:8:"advanced";s:40:"rs_event_sectionid,postcustom,wpseo_meta";}'),
    ( 8, 'meta-box-order_post', 'a:3:{s:4:"side";s:61:"submitdiv,categorydiv,tagsdiv-post_tag,postimagediv,authordiv";s:6:"normal";s:49:"be_gallery_metabox,postexcerpt,postcustom,slugdiv";s:8:"advanced";s:29:"rs_event_sectionid,wpseo_meta";}'),
    ( 8, 'metaboxhidden_committees', 'a:4:{i:0;s:10:"wpseo_meta";i:1;s:16:"commentstatusdiv";i:2;s:13:"trackbacksdiv";i:3;s:7:"slugdiv";}'),
    ( 8, 'metaboxhidden_dashboard', 'a:2:{i:0;s:14:"w3tc_pagespeed";i:1;s:11:"w3tc_latest";}'),
    ( 8, 'metaboxhidden_misc', 'a:6:{i:0;s:11:"categorydiv";i:1;s:16:"tagsdiv-post_tag";i:2;s:10:"wpseo_meta";i:3;s:13:"trackbacksdiv";i:4;s:16:"commentstatusdiv";i:5;s:7:"slugdiv";}'),
    ( 8, 'metaboxhidden_notes', 'a:7:{i:0;s:13:"pageparentdiv";i:1;s:12:"postimagediv";i:2;s:16:"commentstatusdiv";i:3;s:11:"postexcerpt";i:4;s:10:"postcustom";i:5;s:11:"commentsdiv";i:6;s:7:"slugdiv";}'),
    ( 8, 'metaboxhidden_page', 'a:1:{i:0;s:7:"slugdiv";}'),
    ( 8, 'metaboxhidden_post', 'a:3:{i:0;s:7:"slugdiv";i:1;s:18:"rs_event_sectionid";i:2;s:10:"wpseo_meta";}')
    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    2 Votes
  • Status

    This idea is under consideration