Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19127 closed task (blessed) (fixed)

Welcome Panel should be displayed for the first administrator

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 3.3 Priority: high
Severity: normal Version: 3.3
Component: Administration Keywords: has-patch
Focuses: Cc:

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 13 years ago.
19127.2.diff (2.1 KB) - added by nacin 13 years ago.
Uses wp_install_defaults() and fixes unrelated primary_blog bug.
19127.3.diff (3.2 KB) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (16)

@nacin
13 years ago

#1 @nacin
13 years ago

  • Keywords has-patch added

@nacin
13 years ago

Uses wp_install_defaults() and fixes unrelated primary_blog bug.

#2 @nacin
13 years ago

  • Description modified (diff)

#3 @nacin
13 years 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.

@nacin
13 years ago

#4 @nacin
13 years 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.

#5 follow-up: @technosailor
13 years 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?

#6 in reply to: ↑ 5 @nacin
13 years 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.

#7 @sam_benne
13 years 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?

#8 follow-up: @SergeyBiryukov
13 years ago

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

#9 in reply to: ↑ 8 @sam_benne
13 years ago

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

#10 @nacin
13 years ago

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

Handling 23-Nov.

#11 @nacin
13 years 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.

#12 @MadtownLems
13 years 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.

#13 @jane
13 years 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.