Discussion:
finding a code snippet in wordpress core
Haluk Karamete
2014-01-31 15:19:58 UTC
Permalink
Is there an online tool where I can run queries like

where on wordpress core register_post_type function is called?

I'm trying to get to the section where you guys create the 'post' and
'page' post types..
Nikola Nikolov
2014-01-31 15:34:31 UTC
Permalink
Hi,

Well I don't about an online tool, but the thing I do when I need to look
for something in core(and I don't already know where to find it), is to
simply use my text editor to search through the core files.

What you are looking for in this case is found in /wp-includes/post.php and
it's the function called create_initial_post_types().

It seems like queryposts.com will be a good place to look for core code and
functions in the future(and now), for instance you can take a look at
the create_initial_post_types
function page <http://queryposts.com/function/create_initial_post_types/>there.
Post by Haluk Karamete
Is there an online tool where I can run queries like
where on wordpress core register_post_type function is called?
I'm trying to get to the section where you guys create the 'post' and
'page' post types..
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
J.D. Grimes
2014-01-31 15:41:45 UTC
Permalink
I usually run grep on my local checkout:

grep -nr ‘register_post_type(‘ /path/to/wp

-J.D.
Post by Nikola Nikolov
Hi,
Well I don't about an online tool, but the thing I do when I need to look
for something in core(and I don't already know where to find it), is to
simply use my text editor to search through the core files.
What you are looking for in this case is found in /wp-includes/post.php and
it's the function called create_initial_post_types().
It seems like queryposts.com will be a good place to look for core code and
functions in the future(and now), for instance you can take a look at
the create_initial_post_types
function page <http://queryposts.com/function/create_initial_post_types/>there.
Post by Haluk Karamete
Is there an online tool where I can run queries like
where on wordpress core register_post_type function is called?
I'm trying to get to the section where you guys create the 'post' and
'page' post types..
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Chris McCoy
2014-01-31 15:43:52 UTC
Permalink
Or just grep -r ³register_post_type² .
grep -nr Œregister_post_type(Œ /path/to/wp
-J.D.
Post by Nikola Nikolov
Hi,
Well I don't about an online tool, but the thing I do when I need to look
for something in core(and I don't already know where to find it), is to
simply use my text editor to search through the core files.
What you are looking for in this case is found in /wp-includes/post.php and
it's the function called create_initial_post_types().
It seems like queryposts.com will be a good place to look for core code and
functions in the future(and now), for instance you can take a look at
the create_initial_post_types
function page
<http://queryposts.com/function/create_initial_post_types/>there.
On Fri, Jan 31, 2014 at 5:19 PM, Haluk Karamete
Post by Haluk Karamete
Is there an online tool where I can run queries like
where on wordpress core register_post_type function is called?
I'm trying to get to the section where you guys create the 'post' and
'page' post types..
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
John Blackbourn
2014-01-31 16:01:25 UTC
Permalink
Yeah this isn't something you should need an online tool for. If you're
using an IDE or an editor with some sort of project management, you should
import WordPress as part of your project and then you can do a project-wide
search. If your editor doesn't support searching within files, you should
use something like grep or ack to find what you're looking for (and get a
new editor).
Post by Chris McCoy
Or just grep -r ³register_post_type² .
grep -nr OEregister_post_type(OE /path/to/wp
-J.D.
Post by Nikola Nikolov
Hi,
Well I don't about an online tool, but the thing I do when I need to look
for something in core(and I don't already know where to find it), is to
simply use my text editor to search through the core files.
What you are looking for in this case is found in /wp-includes/post.php and
it's the function called create_initial_post_types().
It seems like queryposts.com will be a good place to look for core code and
functions in the future(and now), for instance you can take a look at
the create_initial_post_types
function page
<http://queryposts.com/function/create_initial_post_types/>there.
On Fri, Jan 31, 2014 at 5:19 PM, Haluk Karamete
Post by Haluk Karamete
Is there an online tool where I can run queries like
where on wordpress core register_post_type function is called?
I'm trying to get to the section where you guys create the 'post' and
'page' post types..
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Frank Bueltge
2014-02-01 15:36:29 UTC
Permalink
Also a simple requirement on my side on the IDE, very fast and easy to use
via key.
Eclipse/Aptana -- Strg + H on the project directory.

Also a online service for this requirement is http://wpseek.com/
Best regards

Loading...