Opened 11 years ago
Closed 11 years ago
#24061 closed enhancement (wontfix)
Introduce blog-archived.php and blog-spam.php
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Multisite | Keywords: | has-patch |
Focuses: | Cc: |
Description
When Multisite is active and an archived or spammed site is loaded, WordPress first looks for a file in the content directory called blog-suspended.php
and loads it if it's found.
Two problems:
- The file name is counter-intuitive because 'suspended' isn't the name of a status that a site can have.
- It's not possible to serve a different file for spammed and archived sites.
The upcoming patch introduces support for blog-spam.php
and blog-archived.php
for sites with the respective status. It will fall back to blog-suspended.php
for backwards compatibility.
Attachments (5)
Change History (17)
#3
@
11 years ago
- Milestone changed from Awaiting Review to 3.7
24061.2.diff is johnbillion's patch refreshed against trunk. Adds blog-spam.php
and blog-archived.php
as possible drop in templates.
Moving to 3.7 for discussion
#4
@
11 years ago
Would this be appropriate to loop back to #17164 ? We still have the four options, and only having custom pages for two, when they're all hella confusing. I would think maybe dropping some of the options, if we're not going to make them useful, would make sense.
spam
deactivate
delete
Then we can sort out archive, which acts like an almost delete, later.
#5
follow-up:
↓ 6
@
11 years ago
We should really just fire an action before all of this and forget these files exist. :-)
#6
in reply to:
↑ 5
@
11 years ago
Replying to nacin:
We should really just fire an action before all of this and forget these files exist. :-)
24061.3.diff goes this route. There's already an ms_site_check
filter, so I went with ms_site_check_status
for the action. Also removed the unused $wpdb
global and replaced blog with site where appropriate.
#8
follow-up:
↓ 9
@
11 years ago
- Keywords needs-docs removed
24061.4.diff introduces the ms_site_check_status
action with docs. The new patch avoids the massive green/red caused by my overeager attempts to replace all mentions of blog
with site
. :)
#9
in reply to:
↑ 8
@
11 years ago
Replying to jeremyfelt:
24061.4.diff introduces the
ms_site_check_status
action with docs. The new patch avoids the massive green/red caused by my overeager attempts to replace all mentions ofblog
withsite
. :)
- 'Object' should be lowercase
- Can you be a little more descriptive than 'Contains site details' or point somewhere that has that information?
For the descriptive route, something like this:
* @param object $site An object containing the site's ___, ____, and ___.
For the @see route, something like this would work (notice no period with the @see):
* @param object $site Contains site details. @see some_function()
#10
@
11 years ago
Refreshed docs for the new action in 24061.5.diff.
#11
@
11 years ago
I was kind of kidding about the action, but it actually makes a lot of sense.
Also, blog-suspended.php could also be used to "route" users to a custom blog-archived.php or blog-spam.php.
I'm not sure we need to actually introduce any more files here. They just feel really restricting and hacky, and they have "blog-" in the name, and more commonly would be a theme template (for the main site), or something.
#12
@
11 years ago
- Milestone 3.7 deleted
- Resolution set to wontfix
- Status changed from new to closed
I'll be honest, the existing ms_site_check filter is enough to include and die. It doesn't let you alter the function's return value, but A) neither does the action, and B) the only return value that is valid for this function is true anyway; the alternative is to specifically do something and exit.
Patch