ddwcaf_validate_shortcode( $ddwcaf_configuration[ 'affiliate_registration_form_shortcode' ] ), [ $this, 'ddwcaf_get_affiliate_registration_form_shortcode_content' ] ); add_shortcode( $this->ddwcaf_validate_shortcode( $ddwcaf_configuration[ 'affiliate_dashboard_shortcode' ] ), [ $this, 'ddwcaf_get_affiliate_dashboard_shortcode_shortcode_content' ] ); } /** * Validate shortcode function * * @param string $shortcode * @return string */ public function ddwcaf_validate_shortcode( $shortcode ) { $shortcode = str_replace( '[', '', $shortcode ); $shortcode = str_replace( ']', '', $shortcode ); $shortcode = str_replace( ' ', '', $shortcode ); return $shortcode; } } }