Ticket #645 (reopened defect)

Opened 4 months ago

Last modified 4 months ago

Dashboard feeds: get_site_option vice get_option.

Reported by: lunabyte Assigned to: somebody
Priority: normal Milestone:
Component: component1 Version:
Severity: normal Keywords: dashboard feeds
Cc:

Description

Yes, there is a filter that runs on the feeds. Only if there isn't anything in the db though, or so it appears.

Would be nice to have those feeds called as a site_option instead of the normal option, with a site_admin check around the edit link.

Then a site admin could change these on a whim, and it would take effect for everyone and not just new registrations.

Change History

06/03/08 14:28:07 changed by donncha

  • status changed from new to closed.
  • resolution set to wontfix.

There's no need to use a site option, the filters should execute regardless of db values. There's also a check for "edit_dashboard" capability. You could remove that for non site_admin users. Without that, users won't get the "Edit" link.

06/03/08 15:23:39 changed by lunabyte

  • status changed from closed to reopened.
  • resolution deleted.

"the filters should execute regardless of db values"

Keyword: should

In testing, with the 1.5.1 release I found this to not be the case. While it did work when a new blog was created, it did not work with existing blogs, which retained the original settings vice what was specified in the filter.

So, at least to me, it just seemed more logical to instead use a site option, instead of removing/adding things from the dashboard widgets, and wasting a lot of code.

06/05/08 10:39:27 changed by donncha

I see what's happening. If the option 'dashboard_widget_options' exists then the widgets aren't recreated. You could use a pre filter on the above option to build your own list of widgets.

For example:

add_filter( 'pre_option_dashboard_widget_options', 'custom_dashboard_widgets' );

06/05/08 15:25:57 changed by lunabyte

That is true, but sure seems like an awful lot wasted of code, doesn't it?

You'll have the file read with the default widgets, which is then skipped and replaced with the same/similar thing.