Skip to content

Commit

Permalink
style: fix hook name
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Nov 19, 2023
1 parent 5d766ca commit 933a2ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,32 @@
<rule ref="WordPress">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode"/>
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
<exclude name="WordPress.WP.AlternativeFunctions.json_encode_json_encode"/>
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents"/>
</rule>

<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>

<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/"/>
</properties>
</rule>

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="gpt-vision-img-alt-generator"/>
</property>
</properties>
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion includes/AltGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function generate_alt_text( int $attachment_id ): string|WP_Error
$language = locale_get_display_language( $locale );

$user_prompt = apply_filters(
'acp/ai-alt-generator/user-prompt',
'acp/ai_alt_generator/user_prompt',
"Generate a high-quality and concise alt text in $language ($locale) for the provided image without adding any additional comments.",
$locale,
$language
Expand Down

0 comments on commit 933a2ae

Please sign in to comment.