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-.../includes/plugin-c...
File: pmpro.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Builder Plugin Compatibility Code
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify_Builder
[4] Fix | Delete
* @subpackage Themify_Builder/classes
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* @link https://wordpress.org/plugins/paid-memberships-pro/
[9] Fix | Delete
*/
[10] Fix | Delete
class Themify_Builder_Plugin_Compat_PMPro {
[11] Fix | Delete
[12] Fix | Delete
static function init() {
[13] Fix | Delete
add_filter( 'themify_builder_display', array( __CLASS__, 'pmpro_themify_builder_display' ), 10, 2 );
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Paid Membership Pro
[18] Fix | Delete
* Show Builder contents only if user has access
[19] Fix | Delete
*
[20] Fix | Delete
* @access public
[21] Fix | Delete
* @return bool
[22] Fix | Delete
*/
[23] Fix | Delete
public static function pmpro_themify_builder_display(bool $display,?int $post_id ):bool {
[24] Fix | Delete
$hasaccess = pmpro_has_membership_access( NULL, NULL, true );
[25] Fix | Delete
if( is_array( $hasaccess ) ) {
[26] Fix | Delete
//returned an array to give us the membership level values
[27] Fix | Delete
$post_membership_levels_ids = $hasaccess[1];
[28] Fix | Delete
$post_membership_levels_names = $hasaccess[2];
[29] Fix | Delete
$hasaccess = $hasaccess[0];
[30] Fix | Delete
}
[31] Fix | Delete
return ! $hasaccess?false:$display;
[32] Fix | Delete
}
[33] Fix | Delete
}
[34] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function