WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#4331 closed enhancement (invalid)

Filtering admin head titles, allowing head injections in upload frame

Reported by: oaoao Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

I've been trying to use Wordpress for a custom CMS and have been a little frustrated with the lack of control over the admin side. To that end, I've made one new filter and one new action.

New action:
admin_head-upload
Allows for insertion of css & js in the upload frame's <head>.

New filter:
admin_title
Everything within <title> is filtered in bookmarklet.php, upload.php and admin-header.php. This required a trivial change to bloginfo(), since it did not present the option of returning instead of a direct echo. I've added $display=false to the arg list, ala wp_title() and others.

Attachments (1)

admin-title-filter-and-upload-header.patch (3.7 KB) - added by oaoao 7 years ago.
patch

Download all attachments as: .zip

Change History (12)

comment:1 follow-up: rob1n7 years ago

Use get_bloginfo().

comment:2 rob1n7 years ago

  • Owner changed from anonymous to rob1n

comment:3 in reply to: ↑ 1 oaoao7 years ago

Replying to rob1n:

Use get_bloginfo().

correct me if i'm wrong, but get_bloginfo() does not run the appropriate filters over the content. a user could potentially be doing something with 'name' prior to the title filter.

comment:4 oaoao7 years ago

  • Cc oaoao added

comment:5 rob1n7 years ago

  • Owner rob1n deleted

comment:6 foolswisdom7 years ago

  • Milestone changed from 2.3 to 2.5 (future)

comment:7 oaoao6 years ago

  • Milestone changed from 2.5 to 2.4

Still no way to filter admin head titles. How can you have a custom CMS when you cant even alter titles without touching core files?

comment:8 lloydbudd6 years ago

  • Keywords has-patch added

comment:9 ffemtcj6 years ago

  • Milestone changed from 2.5 to 2.6

comment:10 mrmist5 years ago

  • Keywords needs-patch added; has-patch removed

I reckon this would need freshening to cope with new bits added to the admin functionality.

comment:11 filosofo5 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

The upload filter is not necessary with the current uploader, and the title name can be filtered using some combination of the option_blogname or bloginfo filters.

Note: See TracTickets for help on using tickets.