Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../clone/wp-conte.../plugins/themify-.../modules
File: module-testimonial.php
<?php
[0] Fix | Delete
[1] Fix | Delete
defined('ABSPATH') || exit;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Module Name: Testimonial Posts
[5] Fix | Delete
* Description: Display testimonial custom post type
[6] Fix | Delete
*/
[7] Fix | Delete
class TB_Testimonial_Module extends Themify_Builder_Component_Module {//deprecated
[8] Fix | Delete
const SLUG='testimonial';
[9] Fix | Delete
public static function init():void {
[10] Fix | Delete
add_filter('themify_metabox/fields/themify-meta-boxes', array(__CLASS__, 'cpt_meta_boxes'), 100); // requires low priority so that it loads after theme's metaboxes
[11] Fix | Delete
if (!shortcode_exists('themify_testimonial_posts')) {
[12] Fix | Delete
add_shortcode('themify_testimonial_posts', array(__CLASS__, 'do_shortcode'));
[13] Fix | Delete
}
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
public static function get_module_name():string {
[17] Fix | Delete
add_filter( 'themify_builder_active_vars', [ __CLASS__, 'builder_active_enqueue' ] );
[18] Fix | Delete
return __('Testimonial Posts', 'themify');
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
public static function get_module_icon():string {
[22] Fix | Delete
return 'clipboard';
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
public static function get_js_css():array {
[26] Fix | Delete
return array(
[27] Fix | Delete
'css' => 1
[28] Fix | Delete
);
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
public static function get_json_file():array{
[32] Fix | Delete
return ['f'=>THEMIFY_BUILDER_URI.'/json/'.self::SLUG.'.json','v'=>THEMIFY_VERSION];
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
public static function builder_active_enqueue(array $vars ):array {
[36] Fix | Delete
$vars['addons'][THEMIFY_BUILDER_URI . '/js/editor/deprecated/'.self::SLUG.'.js']=THEMIFY_VERSION;
[37] Fix | Delete
return $vars;
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
public static function get_metabox() {
[41] Fix | Delete
// Testimonial Meta Box Options
[42] Fix | Delete
return array(
[43] Fix | Delete
// Featured Image Size
[44] Fix | Delete
Themify_Builder_Model::$featured_image_size,
[45] Fix | Delete
// Image Width
[46] Fix | Delete
Themify_Builder_Model::$image_width,
[47] Fix | Delete
// Image Height
[48] Fix | Delete
Themify_Builder_Model::$image_height,
[49] Fix | Delete
// Testimonial Author Name
[50] Fix | Delete
array(
[51] Fix | Delete
'name' => '_testimonial_name',
[52] Fix | Delete
'title' => __('Testimonial Author Name', 'themify'),
[53] Fix | Delete
'description' => '',
[54] Fix | Delete
'type' => 'textbox',
[55] Fix | Delete
'meta' => array()
[56] Fix | Delete
),
[57] Fix | Delete
// Testimonial Author Link
[58] Fix | Delete
array(
[59] Fix | Delete
'name' => '_testimonial_link',
[60] Fix | Delete
'title' => __('Testimonial Author Link', 'themify'),
[61] Fix | Delete
'description' => '',
[62] Fix | Delete
'type' => 'textbox',
[63] Fix | Delete
'meta' => array()
[64] Fix | Delete
),
[65] Fix | Delete
// Testimonial Author Company
[66] Fix | Delete
array(
[67] Fix | Delete
'name' => '_testimonial_company',
[68] Fix | Delete
'title' => __('Testimonial Author Company', 'themify'),
[69] Fix | Delete
'description' => '',
[70] Fix | Delete
'type' => 'textbox',
[71] Fix | Delete
'meta' => array()
[72] Fix | Delete
),
[73] Fix | Delete
// Testimonial Author Position
[74] Fix | Delete
array(
[75] Fix | Delete
'name' => '_testimonial_position',
[76] Fix | Delete
'title' => __('Testimonial Author Position', 'themify'),
[77] Fix | Delete
'description' => '',
[78] Fix | Delete
'type' => 'textbox',
[79] Fix | Delete
'meta' => array()
[80] Fix | Delete
)
[81] Fix | Delete
);
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
public static function do_shortcode($atts) {
[85] Fix | Delete
[86] Fix | Delete
$atts = shortcode_atts(array(
[87] Fix | Delete
'id' => '',
[88] Fix | Delete
'title' => 'no', // no
[89] Fix | Delete
'image' => 'yes', // no
[90] Fix | Delete
'image_w' => 80,
[91] Fix | Delete
'image_h' => 80,
[92] Fix | Delete
'display' => 'content', // excerpt, none
[93] Fix | Delete
'more_link' => false, // true goes to post type archive, and admits custom link
[94] Fix | Delete
'more_text' => __('More &rarr;', 'themify'),
[95] Fix | Delete
'limit' => 4,
[96] Fix | Delete
'category' => 0, // integer category ID
[97] Fix | Delete
'order' => 'DESC', // ASC
[98] Fix | Delete
'orderby' => 'date', // title, rand
[99] Fix | Delete
'style' => 'grid2', // grid3, grid4, list-post
[100] Fix | Delete
'show_author' => 'yes', // no
[101] Fix | Delete
'section_link' => false // true goes to post type archive, and admits custom link
[102] Fix | Delete
), $atts);
[103] Fix | Delete
[104] Fix | Delete
$module = array(
[105] Fix | Delete
'module_ID' => self::SLUG.'-' . rand(0, 10000),
[106] Fix | Delete
'mod_name' => self::SLUG,
[107] Fix | Delete
'mod_settings' => array(
[108] Fix | Delete
'mod_title_testimonial' => '',
[109] Fix | Delete
'layout_testimonial' => $atts['style'],
[110] Fix | Delete
'category_testimonial' => $atts['category'],
[111] Fix | Delete
'post_per_page_testimonial' => $atts['limit'],
[112] Fix | Delete
'offset_testimonial' => '',
[113] Fix | Delete
'order_testimonial' => $atts['order'],
[114] Fix | Delete
'orderby_testimonial' => $atts['orderby'],
[115] Fix | Delete
'display_testimonial' => $atts['display'],
[116] Fix | Delete
'hide_feat_img_testimonial' => '',
[117] Fix | Delete
'image_size_testimonial' => '',
[118] Fix | Delete
'img_width_testimonial' => $atts['image_w'],
[119] Fix | Delete
'img_height_testimonial' => $atts['image_h'],
[120] Fix | Delete
'unlink_feat_img_testimonial' => 'no',
[121] Fix | Delete
'hide_post_title_testimonial' => $atts['title'] === 'yes' ? 'no' : 'yes',
[122] Fix | Delete
'unlink_post_title_testimonial' => 'no',
[123] Fix | Delete
'hide_post_date_testimonial' => 'no',
[124] Fix | Delete
'hide_post_meta_testimonial' => 'no',
[125] Fix | Delete
'hide_page_nav_testimonial' => 'yes',
[126] Fix | Delete
'animation_effect' => '',
[127] Fix | Delete
'css_testimonial' => ''
[128] Fix | Delete
)
[129] Fix | Delete
);
[130] Fix | Delete
[131] Fix | Delete
return self::retrieve_template('template-blog.php', $module, THEMIFY_BUILDER_TEMPLATES_DIR, '', false);
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
/**
[135] Fix | Delete
* Render plain content for static content.
[136] Fix | Delete
*
[137] Fix | Delete
* @param array $module
[138] Fix | Delete
* @return string
[139] Fix | Delete
*/
[140] Fix | Delete
public static function get_static_content(array $module):string {
[141] Fix | Delete
return ''; // no static content for dynamic content
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
public static function get_translatable_text_fields( $module ) : array {
[145] Fix | Delete
return [ 'mod_title_testimonial' ];
[146] Fix | Delete
}
[147] Fix | Delete
}
[148] Fix | Delete
[149] Fix | Delete
///////////////////////////////////////
[150] Fix | Delete
// Module Options
[151] Fix | Delete
///////////////////////////////////////
[152] Fix | Delete
[153] Fix | Delete
TB_Testimonial_Module::init(); //deprecated
[154] Fix | Delete
[155] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function