Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Wordpress PHP

Posted on 2014-09-10
5
Medium Priority
?
274 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 2000 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 111

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

730 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