Replace core wordpress file with my own

Yes, it is possible. You can modify that file and use it. But… It will be a lot of work to maintain those changes. You’ll have to merge them after every WordPress update and check if these changes don’t break anything in WP. That’s why such modifications aren’t very common practice and they’re not recommended.

Add Password Generator on password protected page

It is not possible to modify the post submit meta boxes with a filter. But you can do that with JavaScript. This script will generate 10-12 random alphanumeric string and put it in the password field (if it is empty) when you click the Password protected radio button. $(‘#visibility-radio-password’).click(function () { // If there is … Read more

Safely editing core files

There is no “safe” way to edit core files; if you do you will need to check and repeat the edition after every update. Not recommended at all. Instead of editing core files, you could use any of the actions and filters available. For example, pre_comment_on_post (example code not tested): add_action( ‘pre_comment_on_post’, function( $post_id ) … Read more

How to modify files inside wp-includes directory in wordpress

I wouldn’t recommending any core files. Instead, you can filter the title and make your changes, like so: add_filter( ‘document_title_parts’, function( $title ) ) { // $title is an array of parts if ( strlen( $title[‘title’] ) > 10 ) { $title[‘title’] = substr( $title[‘title’], 0, 5 ); // Show only first 5 characters } … Read more

How to: Avoid a bunch of useless Auto Draft ID entries related in posts table and disable autosave feature in ‘post-new.php’?

Read the thread Disable/ Stop “auto-draft” posts on wp-hackers to understand why this is a very bad idea. Let me quote the explanations from @Otto: Auto-drafts exist because of the fact that multiple users can create new posts at the same time. If two people enter post-new at roughly the same moment, then have their … Read more

Which core file is responsible for gravatars?

I still think Rarst’s answer is better and that there is no need to remove Gravatar links in the core WordPress files, but … The files you are looking for are: /wp-admin/credits.php /wp-admin/options-discussion.php /wp-content/plugins/akismet/akismet.js /wp-includes/pluggable.php /wp-includes/post-template.php Since you may need to do this every time WordPress updates, you could search the WordPress files for the … Read more