WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 19 months ago

Last modified 19 months ago

#19127 closed task (blessed) (fixed)

Welcome Panel should be displayed for the first administrator

Reported by: nacin Owned by: nacin
Priority: high Milestone: 3.3
Component: Administration Version: 3.3
Severity: normal Keywords: has-patch
Cc: sam_benne

Description (last modified by nacin)

The Welcome Panel should be shown in two situations:

  1. A new install.
  1. A new site in a network, where:
    1. the user hasn't seen it before for another site, and
    2. is not a super admin.

Attached patch implements this as a new usermeta key. It's also possible to implement this as a blog option which stores the user ID who needs to see it before clearing it, which would keep usermeta bloat down, but we wouldn't be able to patch 2a. As it piggybacks on the same usermeta key for toggling the panel from Screen Options, the implementation is very straightforward.

The code is in wpmu_create_blog() (non-empty blog) and wp_install(). It probably makes more sense in wp_install_defaults(). There's a separate bug fix here as well (note the $user_id passed to is_super_admin()).

Attachments (3)

19127.diff (1.9 KB) - added by nacin 20 months ago.
19127.2.diff (2.1 KB) - added by nacin 20 months ago.
Uses wp_install_defaults() and fixes unrelated primary_blog bug.
19127.3.diff (3.2 KB) - added by nacin 20 months ago.

Download all attachments as: .zip

Change History (16)

nacin20 months ago

comment:1 nacin20 months ago

  • Keywords has-patch added

nacin20 months ago

Uses wp_install_defaults() and fixes unrelated primary_blog bug.

comment:2 nacin20 months ago

  • Description modified (diff)

comment:3 nacin20 months ago

In [19182]:

Send $user_id to is_super_admin() when checking to set primary_blog for a user in wpmu_create_blog(). see #19127.

nacin20 months ago

comment:4 nacin20 months ago

19127.3.diff is a quick pass at a new solution. I was thinking about blog IDs and all sorts of craziness, but basically, we need three states: off, toggled on, and on for a multisite site owner. (We can use toggled on for the initial admin user in single-site as well.)

Patch is rough, but works in the situations described. Adds a single global usermeta key but only for users that ever see or show the welcome panel.

comment:5 follow-up: technosailor19 months ago

Just doing some research and testing on WP 3.3. Setup a clean install off trunk (r464273), logged in and while a pointer is displayed for Admin Bar updated to 3.3 (Why does this even show for a new 3.3 install.... there's no context about compared to what. It's a new install! But I digress...), there is no Welcome screen. I can turn it on in screen options, but I was under the impression based on Nacin's criteria for display, that this would be turned on by default.

Am I missing something - perhaps a constant somewhere that an Administrator can set - that triggers this welcome panel automatically?

comment:6 in reply to: ↑ 5 nacin19 months ago

Replying to technosailor:

Am I missing something - perhaps a constant somewhere that an Administrator can set - that triggers this welcome panel automatically?

This isn't committed to trunk yet.

comment:7 sam_benne19 months ago

  • Cc sam_benne added
  • Severity changed from normal to minor
  • Type changed from task (blessed) to feature request
  • Version set to 3.3

I have found the welcome message and I think it looks great. Will it have a hook or filter added to it. As I am currently building a site for a customer and was thinking of using the welcome panel but to show our own message. So we can add links to the pages we created etc?

comment:8 follow-up: SergeyBiryukov19 months ago

  • Severity changed from minor to normal
  • Type changed from feature request to task (blessed)

comment:9 in reply to: ↑ 8 sam_benne19 months ago

Replying to SergeyBiryukov:
Sorry didn't realise they were global settings.

comment:10 nacin19 months ago

  • Owner set to nacin
  • Priority changed from normal to high
  • Status changed from new to accepted

Handling 23-Nov.

comment:11 nacin19 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In [19418]:

Change show/hide storage mechanism for show_welcome_panel. 0 = hide, 1 = show, 2 = show if the multisite owner. Make welcome panel dismissable without JS (openable too via the URL). fixes #19338, fixes #19127.

comment:12 MadtownLems19 months ago

  • Type changed from task (blessed) to feature request

Will it have a hook or filter added to it.

+1 for this functionality. I love the concept and it looks great, but I really just want to point people to our own Getting Started guide rather than expose them to everything else in the Codex.

comment:13 jane19 months ago

  • Type changed from feature request to task (blessed)

@MadtownLems: Please don't change the Type away from Task (only core team sets tasks, which are the feature requests/enhancements we've committed to doing). We also don't change types after a ticket has been closed.

Note: See TracTickets for help on using tickets.