$this->get_revert_href(),
'id' => 'elementor-import-export__revert_kit',
'class' => 'button',
];
?>
render_last_kit_thumbnail( $last_imported_kit ); ?>
>
maybe_add_referrer_param( $nonced_admin_post_url );
}
/**
* Checks if referred by a kit and adds the referrer ID to the href
*
* @param string $href
*
* @return string
*/
private function maybe_add_referrer_param( string $href ): string {
$param_name = 'referrer_kit';
if ( empty( $_GET[ $param_name ] ) ) {
return $href;
}
return add_query_arg( $param_name, sanitize_key( $_GET[ $param_name ] ), $href );
}
/**
* Render the last kit thumbnail if exists
*
* @param $last_imported_kit
*
* @return void
*/
private function render_last_kit_thumbnail( $last_imported_kit ) {
if ( empty( $last_imported_kit['kit_thumbnail'] ) ) {
return;
}
?>