Function Reference: geodir_after_custom_detail_table_create
Summary
Add nightbourhood column in custom post detail table.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
- $plugin_prefix
- (string) (required) Geodirectory plugin table prefix.
- Default: None
Package
GeoDirectory_Location_Manager
Parameters
- $post_type
- (string) (required) The post type.
- Default: None
- $detail_table
- (string) (required) The deatil table name.
- Default: None
Change Log
Since: 1.0.0
Source File
geodir_after_custom_detail_table_create() is located in geodir_location_manager/geodir_location_hooks_actions.php [Line: 2160]
Source Code
function geodir_after_custom_detail_table_create($post_type, $detail_table='') { global $wpdb,$plugin_prefix; $post_types = geodir_get_posttypes(); if($detail_table == '') $detail_table = $plugin_prefix . $post_type . '_detail'; if(in_array($post_type, $post_types)){ $meta_field_add = "VARCHAR( 30 ) NULL"; geodir_add_column_if_not_exist( $detail_table, "post_neighbourhood", $meta_field_add ); } }