- fix user page blocks

This commit is contained in:
ashubawork
2023-07-12 11:46:03 +03:00
parent b56573dd9b
commit 973dd64713
3 changed files with 23 additions and 3 deletions
+13
View File
@@ -13,6 +13,11 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
*/
class Shortcodes {
/**
* @var array
*/
public $forms_exist = array();
/**
* @var string
*/
@@ -597,6 +602,14 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
* @return string
*/
public function ultimatemember( $args = array() ) {
if ( isset( $args['form_id'] ) ) {
$id = $args['form_id'];
if ( isset( $this->forms_exist[ $id ] ) && true === $this->forms_exist[ $id ] ) {
return '';
}
$this->forms_exist[ $id ] = true;
}
return $this->load( $args );
}