Available on: Newsmag V1.8+, Newspaper V5+
This api call is used to add a new footer template to the theme.
Usage:
<?php td_api_footer_template::add( $id, $params_array ) ?>
Parameters:
$id (string) (required)
- the footer template id – the id has to be different from the ones used on the other footer templates registered in theme
$params_array (array) (required)
- an array which contains the parameters of the footer template
Key name
|
Type
|
Description
|
---|---|---|
img | string | the footer template icon, it appears on Theme Panel -> Footer |
file | string | the path of the footer template file |
text | string | the name of the footer template style |
Examples:
In the following example we’ll add Footer Template 77 , you can see how the code looks on plugin, you have to modify the file path to match with the plugin current folder, we use the variables which were introduced in the Plugin Method section, ex:
td_api_footer_template::add('td_footer_template_77', array( 'img' => $this->plugin_url . '/images/panel/footer_templates/icon-footer-77.png', 'file' => $this->plugin_path . '/parts/footer/td_footer_template_77.php', 'text' => 'Style 77' ) );