forked from topdown/phpStorm-CC-Helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.php
22 lines (16 loc) · 855 Bytes
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
* @see https://gist.github.com/1105126
*/
// Also some more hints and fixes
// WP functions for adding to the admin bar
// This will provide code completion for admin_bar functions like add_menu()
/** @var $wp_admin_bar WP_Admin_Bar */
global $wp_admin_bar;
// Fixing dynamic includes, also so they link properly in the editors environment
require_once(get_template_directory() . '/inc/base.php');
//As is the above require will show an error in phpStorm "Cant resolve target....."
//To fix this is easy, this fixes the error and also allows control click on the base.php and opens it
/** @define "get_template_directory()" "/var/www/wp-dev/wp-content/themes/tridium" This is just for the IDE */
require_once(get_template_directory() . '/inc/base.php');
// These same methods can be used to fix most errors and completion in phpStorm