This add-on works on the base of Tevolution plugin, so you should also refer its hooks along with here mentioned hooks. Here is the list of hooks to add your custom code in “Manage Location” section of Tevolution LocationManager plugin
1) Add tabs at the back-end
Using both the “do_action” and “apply_filter” as shown below, you can create a new tab and fill in your content (text, function etc) in the “Manage Locations” section at the back-end in your directory site.
Apply Filter
location_settings_tabs
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
Example
<?php
add_action(‘location_tabs_content’,’action_function_name’); function action_function_name($location_tabs){ switch($location_tabs){ case ‘extra_tabs’: // add you extra tabs content what you want to add break;} }
?>
do_action
location_tabs_content
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
Example
<?php
add_filter (‘location_settings_tabs’,’function_name’) function function_name($tabs){ $tabs[‘extra_tabs’]=’Extra tabs’; return $tabs;}
?>
Note: To fill in the content, you have to pass your create tab’s parameter into the do_action as shown in above example
2) Add sub tabs at the back-end
Using both the “do_action” and “apply_filter” as shown below, you can create a new sub tab under the existing tab and fill in your content (text, function etc) in the “Manage Locations” section at the back-end in your directory site.
Apply Filter
location_manage_locations_subtabs
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
Example
<?php
add_filter(‘location_manage_locations_subtabs’,’location_subtab_function’); function location_subtab_function($sub_tabs){
$sub_tabs[‘all_cities’]=’All Cities ;’
return $sub_tabs;
}
?>
do_action
manage_location_content
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
Example
<?php
add_action(‘manage_location_content’,’manage_location_content_function’);
function manage_location_content_function($subtabs_content){
switch($subtabs_content){
case ‘all_cities’:
// add you content here
break;
}
}
3) Add/modify location selection box
There are basically 3 hooks that represents the city selection box in 3 different style, so if you want to add something using your custom code near this box on front-end then use these hooks accordingly,
1) City Selection box horizontally
Whatever you custom code using this hook is called above header(dropdowns) section on front-end
Action
add_action('after_body','location_header_horizontal',10);
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
2) Left edge of the site
Whatever you custom code using this hook is called left edge of the site section section on front-end
Action
add_action('after_body','location_header_location',10);
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
3) Above header (lists)
Whatever you custom code using this hook is called above header(lists) section on front-end
Action
add_action('after_body','location_header_navigation',10);
Folder Location
../wp-content/plugins/Tevolution-LocationManager/function
Used in files
manage_function.php
Any Queries? Contact us and we’ll help you out.