I have modified a few WordPress core files, and was wondering how to create a plugin, which contains these files, that will override the core files when activated?
I have modified a few WordPress core files, and was wondering how to create a plugin, which contains these files, that will override the core files when activated?
You will want to get acquainted with the Plugin_API.
Dup topic deleted ;)
(yep, dupe. thanks, i switched categories)
I've checked out the plugin API, but have never written a plugin and know limited php. Can anyone give me a hint in the right direction?
You might want to consider what part of core you are 'replacing' and then ask here or join the wp-hackers email list and ask there. Also look at the WordPress plugin repository to see how plugins similar to what you want to accomplish do things.
These are my core edits:
Remove "Allow Trackbacks and Pingbacks" option on Edit Pages:
File: /wp-admin/includes/meta-boxes.php
Commented out/deleted Line 379
Remove "Allow Pings" on admin Quick Edit menu:
File: /wp-admin/includes/template.php
Commented out/deleted lines 1193-1196
Unregister widgets from the widget pool:
File: /wp-includes/default-widgets.php
Commented out various lines within 1015-1037
and change some widget descriptions
Only show "Upload" option for "Add New Themes":
File: /wp-admin/theme-install.php
Line 29: $tabs['upload'] = __('Upload');
Commented out lines 30-36
As far as CSS, I've come up with this so far:
add_action('admin_print_styles-edit-pages.php','the_function');
// Then the_function would be something like...
function the_function() {
?>
<style type="text/css">
// Hide "Allow Trackbacks and Pingbacks" & "Allow Pings" code,
// and hide other code
</style>
<?php
}oh well, i'll just overwrite core files.
This topic has been closed to new replies.