Solved

Wordpress PHP

Posted on 2014-09-10
5
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 110

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

729 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