Opened 18 years ago
Closed 18 years ago
#3616 closed enhancement (wontfix)
source code style: url handlers
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Optimization | Keywords: | URL Sourcecode reporter-feedback |
Focuses: | Cc: |
Description
Why not make all this url handlers in one file instead of having double things that means same things.
I don’t really get it but it’s in a lot of files mostly every admin php file and take a look in the root and in wp-includes it’s everywhere.
It will make some ease of easyness for everything in the future. should be a nice cleanup anyway. And have a urlhandler.php or url.php in wp-includes/ that have all this so it’s more simple for every developer to make nice changes and updates for wp core and future i think this is a good priority for 2.1 of wp.
And this is just for an examples:
Exempel 01
Should be more simple just to have this
<?php echo $admin_dir; ?>header <?php echo $admin_dir; ?>css/ <?php echo $admin_dir; ?>js/
And there is this two that i found around in all files for same thing
<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css <?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css
Exempel 02
Should be more simple just to have this
<?php echo $admin_dir; ?>admin-ajax.php
And there is this two that i found around in all files for same thing
<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php'; <?php echo get_option('siteurl'); ?>/wp-admin/admin-ajax.php";
There should be a better solution for this to
$admin_dir = 'wp-admin/'; $adminurl = get_option('siteurl') . '/wp-admin'; $redirect_to = 'wp-admin/' $link = 'wp-admin/install.php';
// Load all importers so that they can register. $import_loc = 'wp-admin/import'; $import_root = ABSPATH.$import_loc; $imports_dir = @ dir($import_root);
This is of course is correct but i think the admin files can be fixed with more ease.
include_once(ABSPATH . 'wp-admin/?????.php');
include_once(ABSPATH . WPINC . '?????.php');
Hi Xmion, if you could attach a patch for one of the scenarios that would be great!