: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
exit; // Exit if accessed directly
* Module Name: Archive Posts
class TB_Archive_Posts_Module extends Themify_Builder_Component_Module {
parent::__construct(array(
'name' => __('Archive Posts', 'tbp'),
'slug' => 'archive-posts',
'category' => array('archive')
public function get_assets() {
if(!defined('THEMIFY_BUILDER_CSS_MODULES')){
'image'=>THEMIFY_BUILDER_CSS_MODULES.'image.css',
'post'=>THEMIFY_BUILDER_CSS_MODULES.'post.css'
public function get_icon(){
public function get_options() {
$post_meta = Tbp_Utils::get_module_settings('post-meta','options');
foreach($post_meta as $k=>$v){
if($v['type']==='tbp_custom_css'){
$post_title = Tbp_Utils::get_module_settings('post-title','options');
foreach($post_title as $k=>$v){
if($v['type']==='tbp_custom_css'){
$post_image = Tbp_Utils::get_module_settings('featured-image','options');
foreach($post_image as $k=>$v){
if($v['type']==='tbp_custom_css'){
$post_content = Tbp_Utils::get_module_settings('post-content','options');
foreach($post_content as $k=>$v){
if($v['type']==='tbp_custom_css'){
unset($post_content[$k]);
'label' => __('Display as', 'tbp'),
array('value' => 'grid','name'=>__('Grid', 'tbp')),
array('value' => 'slider','name'=>__('Slider', 'tbp'))
'label' => __('Slider Options', 'tbp'),
'slider_options' => true,
'wrap_class' => 'tb_group_element_slider'
'label' => __('Post Layout', 'tbp'),
'classSelector'=>'.builder-posts-wrap'
array('img' => 'list_post', 'value' => 'list-post', 'label' => __('List Post', 'tbp')),
array('img' => 'grid2', 'value' => 'grid2', 'label' => __('Grid 2', 'tbp')),
array('img' => 'grid3', 'value' => 'grid3', 'label' => __('Grid 3', 'tbp')),
array('img' => 'grid4', 'value' => 'grid4', 'label' => __('Grid 4', 'tbp')),
array('img' => 'grid5', 'value' => 'grid5', 'label' => __('Grid 5', 'tbp')),
array('img' => 'grid6', 'value' => 'grid6', 'label' => __('Grid 6', 'tbp')),
array('img' => 'list_thumb_image', 'value' => 'list-thumb-image', 'label' => __('List Thumb Image', 'tbp')),
array('img' => 'grid2_thumb', 'value' => 'grid2-thumb', 'label' => __('Grid 2 Thumb', 'tbp'))
'list-post' => array('hide' => 'masonry'),
'grid2' => array('show' => 'masonry'),
'grid3' => array('show' =>'masonry'),
'grid4' => array('show' => 'masonry'),
'grid5' => array('show' => 'masonry'),
'grid6' => array('show' =>'masonry')
'wrap_class' => 'tb_group_element_grid',
'type' => 'toggle_switch',
'label' => __( 'Masonry', 'tbp'),
'on' => array( 'name' => 'yes', 'value' => 'en' ),
'off' => array( 'name' => 'no', 'value' => 'dis' ),
'wrap_class' => 'tb_group_element_grid',
'type' => 'toggle_switch',
'label' => __( 'Pagination', 'tbp'),
'on' => array( 'name' => 'yes', 'value' => 's' ),
'off' => array( 'name' => 'no', 'value' => 'hi' ),
'checked' => array( 'show' => 'pagination_option' ),
'not_checked' => array( 'hide' => 'pagination_option'),
'wrap_class' => 'tb_group_element_grid',
'id' => 'pagination_option',
'numbers' => __('Numbers', 'tbp'),
'link' => __('Next/Prev Link', 'tbp'),
'numbers' => array( 'hide' => array( 'next_link', 'prev_link' ) ),
'link' => array( 'show' => array( 'next_link', 'prev_link' ) ),
'wrap_class' => 'pushed tb_group_element_grid',
'label' => __('Posts Per Page', 'tbp')
'label' => __('Offset', 'tbp')
'label' => __('Order', 'tbp'),
'help' => __('Sort posts in ascending or descending order.', 'tbp'),
'label' => __('Order By', 'tbp'),
'select' => array('hide' => 'meta_key'),
'meta_value' => array('show' =>'meta_key'),
'meta_value_num' => array('show' => 'meta_key')
'label' => __('Custom Field Key', 'tbp'),
'wrap_class' => 'tb_disable_dc',
'label' => __('Next Link', 'tbp')
'label' => __('Prev Link', 'tbp')
'label' => __('No Posts Found', 'tbp'),
'id' => 'tab_content_archive_posts',
'type' => 'toggleable_fields',
'label' => __( 'Featured Image', 'tbp'),
'label' => __('Title', 'tbp'),
'label' => __( 'Post Date', 'tbp'),
'label' => __('Date Format', 'tbp'),
'F j, Y' => __( 'August 18, 2019 (F j, Y)', 'tbp'),
'Y-m-d' => __( '2019-08-18 (Y-m-d)', 'tbp'),
'm/d/Y' => __( '08/18/2019 (m/d/Y)', 'tbp'),
'd/m/Y' => __('18/08/2019 (d/m/Y)', 'tbp'),
'def' => __('Default', 'tbp'),
'custom' => __('Custom Format', 'tbp')
'custom' => array( 'show' => 'custom' ),
'F j, Y' => array( 'hide' => 'custom' ),
'Y-m-d' => array( 'hide' => 'custom'),
'm/d/Y' => array( 'hide' => 'custom'),
'd/m/Y' => array( 'hide' =>'custom' ),
'def' => array( 'hide' => 'custom')
'label' => __( 'Custom Format', 'tbp'),
'help' => __( 'Enter date format in these letters: l D d j S F m M n Y y', 'tbp')
'label' => __('Icon', 'tbp')
'label' => __('Before Text', 'tbp')
'label' => __('After Text', 'tbp')
'label' => __( 'Post Meta', 'tbp'),
'label' => __( 'Content', 'tbp'),
'options' => $post_content
'label' => __( 'More Link', 'tbp'),
'label' => __('Link', 'tbp'),
array( 'name' => __( 'Permalink', 'tbp'), 'value' => 'permalink' ),
array( 'name' => __( 'None', 'tbp'), 'value' => 'none' )
'label' => __('More Text', 'tbp')
array('type' => 'tbp_custom_css')
public function get_styling() {
self::get_expand('bg', array(
self::get_image('', 'b_c_g', 'bg_c', 'background-color')
self::get_image(':hover', 'b_c_g_h', 'bg_c_h', 'background-color', 'h')
self::get_expand('f', array(
self::get_font_family('', 'f_f_g'),
self::get_color_type(array(' span', ' span a', ' .tb_text_wrap', ' p', ' .tbp_post_date', '.module .tbp_title', '.module .tbp_title a')),
self::get_font_size('', 'f_s_g'),
self::get_line_height('', 'l_h_g'),
self::get_letter_spacing(' .post', 'l_s_g'),
self::get_text_align(' .post', 't_a_g'),
self::get_text_transform('', 't_t_g'),
self::get_font_style('', 'f_g', 'f_b'),
self::get_text_shadow('', 't_sh'),
self::get_font_family('', 'f_f_g', 'h'),
self::get_color_type(array(' span', ' span a', ' .tb_text_wrap', ' p', ' .tbp_post_date', '.module .tbp_title', '.module .tbp_title a'), 'h'),
self::get_font_size('', 'f_s_g', '', 'h'),
self::get_line_height('', 'l_h_g', 'h'),
self::get_letter_spacing(' .post', 'l_s_g', 'h'),
self::get_text_align(' .post', 't_a_g', 'h'),
self::get_text_transform('', 't_t_g', 'h'),
self::get_font_style('', 'f_g', 'f_b', 'h'),
self::get_text_shadow('','t_sh','h'),
self::get_expand( 'l', array(
self::get_color( ' a:not(.post-edit-link)', 'l_c_gl' ),
self::get_text_decoration( 'a:not(.post-edit-link)', 't_d_gl' )
self::get_color( ' .post a:not(.post-edit-link):hover', 'l_c_gl_h', null, null, '' ),
self::get_text_decoration( ' .post a:not(.post-edit-link):hover', 't_d_gl_h', '' )
self::get_expand('p', array(
self::get_padding('', 'g_p')
self::get_padding('', 'g_p', 'h')
self::get_expand('m', array(
self::get_margin('', 'g_m')
self::get_margin('', 'g_m', 'h')
self::get_expand('b', array(
self::get_border('', 'g_b')
self::get_border('', 'g_b', 'h')
'options' => count($a = self::get_blend(' .loops-wrapper .post'))>2 ? array($a) : $a
'options' => count($a = self::get_blend(' .loops-wrapper .post','bl_m_h','h'))>2 ? array($a + array('ishover'=>true)) : $a
self::get_expand('w', array(
self::get_width('', 'w', 'h')
! method_exists( $this, 'get_max_height' ) ? array() :
self::get_expand('ht', array(
self::get_expand('r_c', array(
self::get_border_radius('', 'r_c')
self::get_border_radius('', 'r_c', 'h')
self::get_expand('sh', array(
self::get_box_shadow('', 'g_sh')
self::get_box_shadow('', 'g_sh', 'h')
self::get_expand('disp', self::get_display())
$archive_post_container = array(
self::get_expand('bg', array(
self::get_color(' .post', 'b_c_a_p_cn', 'bg_c', 'background-color')
self::get_color(' .post', 'b_c_a_p_cn', 'bg_c', 'background-color', 'h')
self::get_expand('p', array(
self::get_padding(' .post', 'p_cn')