Solved

Wordpress PHP

Posted on 2014-09-10
5
255 Views
Last Modified: 2014-09-10
Is there a way in Wordpress with php to show what function, hook, filter or action is creating a specific piece of code?;
0
Comment
Question by:rgranlund
  • 3
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40314962
Nope.
0
 
LVL 7

Author Comment

by:rgranlund
ID: 40315194
Is there a way to replace one function with another?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 40315236
Sure.  If you know where the code is, you can edit it.  I strongly suggest moving to a child theme footing if you haven't yet done so and avoid hacking the core.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40315398
Further to what Jason advises...

WordPress has Themes.  You install one, and you've got it.  But WordPress also has updates to its software, and to its Themes.  If you modify a Theme and it gets updated, you lose your modifications.  These updates are automatic and necessary.  Hence the idea of Child Themes.  They are like object-oriented inheritance, in that they extend the original theme with your own custom modifications.  Make a Google search for WordPress Child Themes and learn more before you invest your time, talent and treasure in something that could get blown away without notice!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40315406
I also may have spoken too soon.  You might be able to get a report of which functions/hooks/filters are firing on a specific page by using Debug Objects:

http://wordpress.org/plugins/debug-objects/

Not sure it will be helpful, if it returns a list of EVERYTHING that fires each time a page loads but it might be better than nothing.

Also for good reading:

http://nacin.com/2010/04/23/5-ways-to-debug-wordpress/
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now