/home/techb158/l2hypotheques.com/wp-content/plugins/complianz-gdpr/gutenberg
Edit: /home/techb158/l2hypotheques.com/wp-content/plugins/complianz-gdpr/gutenberg/block.php (3259B)
get_rest_url(),
'cmplz_preview' => CMPLZ_URL. 'assets/images/gutenberg-preview.png',
'user_can_unfiltered_html' => current_user_can('unfiltered_html'),
)
);
wp_set_script_translations( 'cmplz-block', 'complianz-gdpr' , CMPLZ_PATH . '/languages');
$load_css = cmplz_get_option('use_document_css', true );
if ($load_css) {
$v = filemtime(CMPLZ_PATH . "assets/css/document.min.css");
wp_enqueue_style(
'cmplz-block', // Handle.
CMPLZ_URL . "assets/css/document.min.css",
array( 'wp-edit-blocks' ), $v
);
} else {
$v = filemtime(CMPLZ_PATH . "assets/css/document-grid.min.css");
wp_enqueue_style(
'cmplz-block', // Handle.
CMPLZ_URL . "assets/css/document-grid.min.css",
array( 'wp-edit-blocks' ), $v
);
}
}
add_action( 'enqueue_block_editor_assets', 'cmplz_editor_assets' );
register_block_type('complianz/document', array(
'render_callback' => 'cmplz_render_document_block',
));
register_block_type('complianz/consent-area', array(
'render_callback' => 'cmplz_render_consent_area_block',
));
/**
* Handles the front end rendering of the complianz consent area block
*
* @param array $attributes
* @param string $content
* @return string
*/
function cmplz_render_consent_area_block($attributes, $content)
{
$category = isset($attributes['category']) ? cmplz_sanitize_category( $attributes['category'] ) : 'marketing';
$service = isset($attributes['service']) ? COMPLIANZ::$cookie_blocker->sanitize_service_name( $attributes['service'] ) : 'general';
$post_id = (int) $attributes['postId'];
$block_id = sanitize_title($attributes['blockId']);
$placeholder_content = $attributes['placeholderContent'] ?? '';
ob_start();
?>
get_document_html($type, $region);
}
}
return $html;
}