Problem getting started
-
add_action( 'admin_init', 'rjt_load_tables' ); function rjt_load_tables() { if(function_exists('add_db_table_editor')){ add_db_table_editor('title=Products&table=wp_rjt_product'); add_db_table_editor(array( 'title'=>'Prices', 'table'=>'wp_rjt_prices')); } }
I am using the above in a plug to try and add two tables to the Dashboard on my site. Both tables exist, and if I put a “hello world” in the middle it appears on the admin screen.
Trying to add this with out using the hook fails as my plugin gets started before the add_db_table_editor function is available.
Sorry if I am doing something stupid.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem getting started’ is closed to new replies.