Articles of core

How to show updated edit on preview URL without clicking preview button

http://localhost/demosite/?page_id=19&preview=true ^ This is the preview URL for a page with id 19, now whenever I made some changes to it’s page content and refresh above URL it don’t show the latest changes I made unless I click preview button, I think preview button trigger some kind of function which save page and then above […]

Changing the comments link produced by the get_comments_link() and get_comments_pagenum_link() functions

Currently my theme calls upon get_comments_link() to create the standard anchor #comments to link to the comments below the post, as does the get_comments_pagenum_link() function on paginated comments. I would like to replace the #comments anchor in these functions with any other string, without of course changing WP’s core php files. A simple add_filter to […]

How do I implement a .diff changeset from core.trac.wordpress.org locally?

I have a local copy of the latest version of wordpress that I set up using svn co http://core.svn.wordpress.org/trunk/ There is a diff that I want to pull into my local fileset: http://core.trac.wordpress.org/attachment/ticket/19371/19371.diff Is this something that I can do with subversion? What commands do I need to use?

Add More Fields to Users Pages (Admin Panel)

So I’m trying to create some custom fields for users. I need to give users access to a 30 day trial of some software and I want to keep track of that in the users page of administration panel. If the user is in the trail I want to add “Trial” at the top and […]

wordpress update will overwrite files changes?

I edit function.php and page.php files for my custom use, everything is fine, but i have query that if wordpress will update then it will overwrite all the files and changes made ??

PHP notice coming from the WordPress core?

Do you also experience this particular notice? ( Of course one has to turn on the DEBUG mode at the wp-config.php to be able to see this kind of a notice ). > Notice: add_shortcode_param is deprecated since version 4.4 (will be > removed in 5.1)! Use vc_add_shortcode_param instead. in > F:\inetpub\wwwroot\…….\wp-includes\functions.php on line 3783 […]

Hook before & after plugin / core update

I’m working on a maintenance plugin for my website and I want to enable it before plugin/core upgrade starts and disable it after plugin/upgrade ends. Any ideas ? Thanks! 🙂 PS: all I know is I can use “update_feedback” hook after core upgrade ends

Is this plugin being loaded before file.php, subsequently not allowing me to use certain functions?

I’m trying to use get_home_path() in my plugin, however, I get a call to undefined function fatal error (running WordPress 3.8). I believe this would imply that my plugin is being loaded before wp-admin/includes/file.php where get_home_path() is located, right? Is it just me, or is that a little odd? How can I make file.php load […]

Replacing the default content created while the site creation

How do you replace the default title for first comment? Mr WordPress on Hello world! I could not able to locate this in theme’s comments.php file I want to edit the title ‘Mr wordpress on Hello world’ to Admin on -Site Name- How can I replace the default text created with about us page? This […]

Best way to extends core classes in theme?

I need to add functions to my WP_User objects, to be used like this : <?php // in my templates : $user = new User($id); $user->sendHelloWorldEmail(); // in my functions.php class User extends WP_User { public function sendHelloWorldEmail(){ // do stuff … } } My question is : what is the best way to overload […]