What is the correct way to call wordpress functions from another script?
-
So, I hope this is the correct section.
It’s very frustrating, I swear I have searched everywhere online and I can’t seem to find similar problem to mine.I simply need to use some functions included in :
wp-admin/file.php
wp-admin/media.php
wp-admin/image.phpWhat I am doing is
<?php require('wp-admin/includes/media.php'); require('wp-admin/includes/file.php'); require('wp-admin/includes/image.php'); ...the rest of the script ?>
I’m not including the rest of the script because the error is already here :
Fatal error: Call to undefined function __() in /membri/infomjmotor/wp-admin/includes/file.php on line 13
Okay, if we go looking for the line 13 of file.php what we’ll find is a series of functions that actually start with “__(“. What do these two underscores mean? The problem seems to be within these, because if I remove them the error changes.
What am I doing wrong? This should be pretty simple…Including the scripts I need and using the functions I need. But I think WordPress doesn’t like this. I can’t find anyone having the same problem, I have not upgraded, this is a fresh install.
I tried reinstalling, even different versions, the problem persists even in a fresh install.
Thanks.
- The topic ‘What is the correct way to call wordpress functions from another script?’ is closed to new replies.