Created
January 16, 2014 12:07
-
-
Save rodica-andronache/8453859 to your computer and use it in GitHub Desktop.
Operatii de citire/scriere fisiere/pagini in Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Daca folosesc functii php precum file_get_contents() o sa am erori in Theme Check. | |
| Pt a le rezolva, trebuie folosit WP_Filesystem.Aceste metode sunt in general folosite pt partea de admin. | |
| Pt a le folosi, in alta parte, nu in admin: | |
| require_once(ABSPATH . 'wp-admin/includes/file.php'); | |
| WP_Filesystem(); | |
| global $wp_filesystem; | |
| $likenr = $wp_filesystem->get_contents('http://graph.facebook.com/'.$fb_link.'?fields=likes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment