Created
June 18, 2015 04:29
-
-
Save torounit/595f7e8e0ffa9868101c to your computer and use it in GitHub Desktop.
PHPStorm等でWordPressのグローバル変数の入力補完を有効にする。プロジェクトのどこかに置いておくと補完されるようになる。
This file contains 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
<?php | |
trigger_error("This file should not be included, only analyzed by your IDE", E_USER_ERROR); | |
$wp_the_query = new WP_Query(); | |
/** @var WP_Query $wp_query */ | |
$wp_query = $wp_the_query; | |
$wp_rewrite = new WP_Rewrite(); | |
$wp = new WP(); | |
$wp_widget_factory = new WP_Widget_Factory(); | |
$wp_roles = new WP_Roles(); | |
/** @var WP_Post[] $posts */ | |
$posts = get_posts(); | |
$posts[0]->ID; | |
/** @var WP_Post $post */ | |
$post = get_post(); | |
$wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST ); | |
$wp_object_cache = new WP_Object_Cache(); | |
$wp_embed = new WP_Embed(); | |
$current_user = new WP_User(); | |
$userdata = new WP_User(); | |
$wp_list_table = new WP_List_Table(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment