Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* ----------------------------------------------------------------------------
- Newspaper 6 Child theme - Please do not use this child theme with older versions of Newspaper Theme
- What can be overwritten via the child theme:
- - everything from /parts folder
- - all the loops (loop.php loop-single-1.php) etc
- - the rest of the theme has to be modified via the theme api:
- http://forum.tagdiv.com/the-theme-api/
- */
- /* ----------------------------------------------------------------------------
- hook used to modify/add/delete items via the theme API
- */
- add_action('td_global_after', 'child_theme_td_global_after');
- function child_theme_td_global_after() {
- /*
- You can use the api inside this function:
- See how the api is used in Newspaper/includes/td_config.php the API starts from "static function td_global_after() {"
- Api Documentation: http://forum.tagdiv.com/the-child-theme-method/
- */
- td_api_block::update('td_block_authors',
- array(
- 'map_in_visual_composer' => true,
- "name" => 'Authors box',
- "base" => "td_block_authors",
- "class" => "",
- "controls" => "full",
- "category" => 'Blocks',
- 'icon' => 'icon-pagebuilder-td_block_authors',
- 'file' => get_stylesheet_directory() . '/includes/shortcodes/td_block_authors.php',
- "params" => array(
- array(
- "param_name" => "custom_title",
- "type" => "textfield",
- "value" => 'OUR AUTHORS',
- "heading" => "Block title",
- "description" => "",
- "holder" => "div",
- "class" => ""
- ),
- array(
- "param_name" => "custom_url",
- "type" => "textfield",
- "value" => "",
- "heading" => 'Block title - custom url',
- "description" => "Optional - (when the module title is clicked)",
- "holder" => "div",
- "class" => ""
- ),
- array(
- "param_name" => "sort",
- "type" => "dropdown",
- "value" => array('- Sort by name -' => '', 'Sort by post count' => 'post_count'),
- "heading" => 'Sort authors by:',
- "description" => "",
- "holder" => "div",
- "class" => ""
- ),
- array(
- "param_name" => "exclude",
- "type" => "textfield",
- "value" => '',
- "heading" => "Exclude authors id (, separated)",
- "description" => "",
- "holder" => "div",
- "class" => ""
- ),
- array(
- "param_name" => "include",
- "type" => "textfield",
- "value" => '',
- "heading" => "Include authors id (, separated) - do not use with exclude",
- "description" => "",
- "holder" => "div",
- "class" => ""
- ),
- array(
- "type" => "colorpicker",
- "holder" => "div",
- "class" => "",
- "heading" => 'Title text color',
- "param_name" => "header_text_color",
- "value" => '', //Default Red color
- "description" => 'Optional - Choose a custom title text color for this block'
- ),
- array(
- "type" => "colorpicker",
- "holder" => "div",
- "class" => "",
- "heading" => 'Title background color',
- "param_name" => "header_color",
- "value" => '', //Default Red color
- "description" => 'Optional - Choose a custom title background color for this block'
- )
- )
- )
- );
- }
- /* ----------------------------------------------------------------------------
- add the parent style + style.css from this folder
- */
- add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1000 );
- function theme_enqueue_styles() {
- wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', '6c', 'all' );
- wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'));
- }
Advertisement
Add Comment
Please, Sign In to add comment