Title: include
Last modified: August 20, 2016

---

# include

 *  Resolved [webslinger_cc](https://wordpress.org/support/users/webslinger_cc/)
 * (@webslinger_cc)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/include-2-2/)
 * I need to capture any graphics used in the post editor from the media library
   or wherever and store that information into an already created database table.
   Once the graphic has been added and the post has been either Save Draft or Published
   I need to save the image’s exif data into a separate table called “sights”.
 * A simple <? php include ?> will do the trick as the included page runs great 
   on its own. However when I insert it into the post.php page, the page quits working.
   BTW there is more than 1 post.php page.
 * This is not a post php into a browser page (like so many plug-in(s) will do) 
   but rather put image data created at the time a post is saved or published into
   a database table.
    Should be super simple but I have a “Can’t see the forest 
   for the trees” syndrome.
 * [http://www.artandarchitecture-sf.com/wp-content/uploads/test4.php](http://www.artandarchitecture-sf.com/wp-content/uploads/test4.php)
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/include-2-2/#post-3508067)
 * You don’t want to add includes into core WP files like post.php, any of them.(
   There’s 3 I know of) Doing so will eventually lead to trouble. You should be 
   able to hook the filter ‘wp_insert_post_data’ from a plugin. You are passed the
   new or updated data before it is inserted. You could also get the current content
   in the DB if it exists to generate a diff (or php equivalent) so you know which
   exif data to remove as well as add. Of course, you would need to search the content
   to extract the src url from img tags.
 *  Thread Starter [webslinger_cc](https://wordpress.org/support/users/webslinger_cc/)
 * (@webslinger_cc)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/include-2-2/#post-3508098)
 * <<You don’t want to add includes into core WP files >>.
    Not too practical for
   a professed open architecture program. I will see about the ‘wp_insert_post_data’
   process or I will come up with something more realistic.
 * Easy enough to create my own posting page, just thought I would work inside the
   bubble if possible.
 * Thank you bcworkz for your prompt and helpful reply.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘include’ is closed to new replies.

## Tags

 * [php include](https://wordpress.org/support/topic-tag/php-include/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [webslinger_cc](https://wordpress.org/support/users/webslinger_cc/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/include-2-2/#post-3508098)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
