-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESET - Inno/move elementor abstracts to common #2070
base: master
Are you sure you want to change the base?
Conversation
…-template-integration
…o inno/move-elementor-abstracts-to-common
* Which widget instance is being used for this template engine. | ||
* | ||
* @since TBD | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->set_template_folder_lookup( true ); | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$widget" missing
/** | ||
* Factory method to create a new instance of the Template Engine. | ||
* | ||
* @param $widget The widget instance to set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.MissingParamType
Missing parameter type
return $instance; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.MissingParamTag
Doc comment for parameter "$widget" missing
* | ||
* @since TBD | ||
* | ||
* @param $widget The widget instance to set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.MissingParamType
Missing parameter type
…o inno/move-elementor-abstracts-to-common
return (string) apply_filters( 'tec_elementor_widget_slug_prefix', $prefix, $trim, $this ); | ||
} | ||
|
||
public function create_slug( $slug ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function create_slug()
return $this->template; | ||
} | ||
|
||
public function get_template_prefix( $file = '' ): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.Missing
Missing doc comment for function get_template_prefix()
* @param int $accepted_args The number of arguments the filter accepts. | ||
*/ | ||
protected function set_template_filter( string $on, ?callable $callback = null, int $priority = 10, int $accepted_args = 1 ): void { | ||
$hook_name = $this->get_template_prefix( $this->trim_slug() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.IncorrectWarning
Equals sign not aligned correctly; expected 1 space but found 5 spaces
* @return string | ||
*/ | ||
public function get_asset_file_name( $suffix = 'css' ) { | ||
$file = static::get_asset_base_path() . static::trim_slug(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
* @return string | ||
*/ | ||
public function get_asset_handle( $suffix = 'css' ) { | ||
$handle = static::get_asset_prefix() . static::trim_slug(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
Function closing brace must go on the next line following the body; found 1 blank lines before brace
*/ | ||
public function get_output(): string { | ||
$template = $this->get_template(); | ||
$output = $template->template( 'widgets/base', $this->get_template_args(), false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpcs] reported by reviewdog 🐶Generic.Formatting.MultipleStatementAlignment.NotSameWarning
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space
This was me noodling about moving the base classes to common - to make them extendable in ET+, etc w/o requiring TEC
required: the-events-calendar/the-events-calendar#4528