Overwriting Core WordPress Functions with Plugins

Is there a way to overwrite a core function is the WordPress core using a plugin? I don’t need to inject code, I need to replace the function entirely with a re-written version. The specific function is wp_nav_menu_item_post_type_meta_box() in /wp-admin/includes/nav-menu.php Basically there’s a lack of functionality that is not meeting a clients need, so I … Read more

function triggered by “manage_users_custom_column” filter not working

I am trying to add a custom column un users.php but it stays empty. I have successfully added a column to the users admin page with this code in my theme’s functions.php file: function add_user_test_column( $columns ) { $columns[‘test1’] = ‘Test’; return $columns; } add_filter( ‘manage_users_columns’, ‘add_user_test_column’ ); I have tried to add something to … Read more

Editor access to plugin settings

I’m trying to give access to an user with the role Editor to this plugin settings page: https://wordpress.org/plugins/commenter-data/ In the code of this plugin on line 31 of commenter.php there is this function: function cd_setting_page(){ add_options_page( ‘Commenter data Settings’, ‘Commenter data Settings’, ‘administrator’, ‘commenterdata-settings’, array( $this, ‘cd_renderer’ )); } This only allows for the administrator … Read more

Removing custom background and header feature in child theme

I am creating a child theme using twentyten as my base. I am looking for a way to remove the features of adding custom header and background without touching functions.php file in the parent theme. no luck with this 🙁 function my_child_theme_setup() { remove_theme_support(‘custom-background’); remove_theme_support(‘custom-header’); } add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ ); 5 Answers 5 Both the … Read more

How do I “replace a function via plugins” in WordPress?

I’m new to WordPress and am not understanding their docs. What I’d like to do is to replace the wp_hash_password (and a few other password related functions) with my own. I’ve already written the functions and had them tested outside WordPress to ensure functionality. “wp_hash_password function can be replaced via plugins. If plugins do not … Read more