-
-
Save musamamasood/6d6e0d10d620705c3e5c6e46d32b6329 to your computer and use it in GitHub Desktop.
PHPStorm等で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
<?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