@@ 630-643 (lines=14) @@ | ||
627 | */ |
|
628 | public function registerManifestFile($namespace, $url_base, $manifest_file, $manifest_file_path = '') |
|
629 | { |
|
630 | if (isset($this->manifest_data[ $namespace ])) { |
|
631 | if (! $this->debug()) { |
|
632 | return; |
|
633 | } |
|
634 | throw new InvalidArgumentException( |
|
635 | sprintf( |
|
636 | esc_html__( |
|
637 | 'The namespace for this manifest file has already been registered, choose a namespace other than %s', |
|
638 | 'event_espresso' |
|
639 | ), |
|
640 | $namespace |
|
641 | ) |
|
642 | ); |
|
643 | } |
|
644 | if (filter_var($url_base, FILTER_VALIDATE_URL) === false) { |
|
645 | if (is_admin()) { |
|
646 | EE_Error::add_error( |
|
@@ 342-355 (lines=14) @@ | ||
339 | $this->jsdata['templates'] = array(); |
|
340 | } |
|
341 | //no overrides allowed. |
|
342 | if (isset($this->jsdata['templates'][ $template_reference ])) { |
|
343 | if (! $this->debug()) { |
|
344 | return; |
|
345 | } |
|
346 | throw new InvalidArgumentException( |
|
347 | sprintf( |
|
348 | __( |
|
349 | 'The %1$s key already exists for the templates array in the js data array. No overrides are allowed.', |
|
350 | 'event_espresso' |
|
351 | ), |
|
352 | $template_reference |
|
353 | ) |
|
354 | ); |
|
355 | } |
|
356 | $this->jsdata['templates'][ $template_reference ] = $template_content; |
|
357 | } |
|
358 |