diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1434213..4cc46d1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.
+## [2.5.1] 2024-05-01
+### Updated
+- {iftheme} tag now works even when at the beginning of a string.
+- Updated for Moodle coding guidelines.
+
## [2.5.0] 2024-04-24
### Added
- New {menucoursemore} tag.
diff --git a/lang/en/filter_filtercodes.php b/lang/en/filter_filtercodes.php
index dea8fcc..7af8880 100644
--- a/lang/en/filter_filtercodes.php
+++ b/lang/en/filter_filtercodes.php
@@ -25,113 +25,53 @@
defined('MOODLE_INTERNAL') || die();
-$string['pluginname'] = 'Filter Codes';
-$string['filtername'] = 'Filter Codes';
-$string['privacy:metadata'] = 'The Filter Codes plugin does not store any personal data about any user.';
+$string['brief'] = 'Brief';
+$string['categorycardshowpic'] = 'Show {categorycards} background';
+$string['categorycardshowpic_desc'] = 'If enabled, will display a background colour/pattern for {categorycards} tag similar to the course images when no image was specified.';
+$string['chartprogressbarlabel'] = '{$a->label}: {$a->value}';
$string['contentmissing'] = '
Content is missing.
Please notify the webmaster.
';
+$string['coursecardsbyenrol'] = 'Maximum {coursecardsbyenrol} cards.';
+$string['coursecardsbyenrol_desc'] = 'Maximum number of course cards to display for {coursecardsbyenrol} tag. Set to zero for unlimited (not recommended).';
+$string['coursecardsformat'] = 'Course cards layout';
+$string['coursecardsformat_desc'] = 'Display {coursecards}, {coursecardsbyenrol} and {mycoursescards} either:
+
+
Vertical: Course image above course name.
+
Horizontal: Course image to the left of course name, category and summary; or
+
List in a table: Course name, category and summary.
+
';
+$string['coursecontactlinktype'] = 'Contact link type';
+$string['coursecontactlinktype_desc'] = 'Choose the type of link for the contact\'s link in the {coursecontacts} tags.';
+$string['coursecontactshowdesc'] = 'Show contact\'s profile description.';
+$string['coursecontactshowdesc_desc'] = 'If enabled, will display the contact\'s profile description in {coursecontacts} tags.';
+$string['coursecontactshowpic'] = 'Show contact picture';
+$string['coursecontactshowpic_desc'] = 'If enabled, will display the contact\'s profile picture in {coursecontacts} tags.';
+$string['defaultemail'] = '';
$string['defaultfirstname'] = '';
$string['defaultsurname'] = '';
$string['defaultusername'] = '';
-$string['defaultemail'] = '';
+$string['disabled_customnav_description'] = 'Note regarding support for custom menu - To enable support for FilterCodes in your Moodle site\'s custom menu, you may need to customize your theme or Moodle core. Information on how to add FilterCodes support in custom menus.';
$string['enable_customnav'] = 'Custom navigation support';
$string['enable_customnav_description'] = 'Experimental: Enable support for FilterCode tags in Moodle custom navigation menu.
Note: Is known to be compatible with Clean and Boost based themes in Moodle 3.2 to 3.4 only. Does not filter tags on the Moodle Theme Settings page.';
-$string['disabled_customnav_description'] = 'Note regarding support for custom menu - To enable support for FilterCodes in your Moodle site\'s custom menu, you may need to customize your theme or Moodle core. Information on how to add FilterCodes support in custom menus.';
$string['enable_scrape'] = 'Scrape tag support';
$string['enable_scrape_description'] = 'Enable the scrape tag.';
$string['enable_sesskey'] = 'Sesskey tag support';
$string['enable_sesskey_description'] = 'Enable the sesskey tag globally. This feature is disabled in forums even when enabled globally.';
$string['escapebraces'] = 'Escape tags';
$string['escapebraces_desc'] = 'When this option is checked, you will be able to display FilterCode tags without them being interpreted by this filter by wrapping your tag in [ brackets ]. This can be very useful when creating FilterCodes documentation for the teachers and course creators on your Moodle site.
Example: [{fullname}] will not display the user\'s full name but display the {fullname} tag instead without the brackets.';
-$string['hidecompletedcourses'] = 'Hide completed courses';
-$string['hidecompletedcourses_desc'] = 'Enable to filter out completed courses in {mycoursesmenu} tag listings.';
-$string['nocompletedcourses'] = 'None of the courses in which you are enrolled have been marked as completed.';
-$string['coursecontactshowpic'] = 'Show contact picture';
-$string['coursecontactshowpic_desc'] = 'If enabled, will display the contact\'s profile picture in {coursecontacts} tags.';
-$string['coursecontactshowdesc'] = 'Show contact\'s profile description.';
-$string['coursecontactshowdesc_desc'] = 'If enabled, will display the contact\'s profile description in {coursecontacts} tags.';
-$string['coursecontactlinktype'] = 'Contact link type';
-$string['coursecontactlinktype_desc'] = 'Choose the type of link for the contact\'s link in the {coursecontacts} tags.';
-$string['showhiddenprofilefields'] = 'Show hidden profile fields';
-$string['showhiddenprofilefields_desc'] = 'Enable the {profile_field_...} tag to process all profile fields including ones hidden from the user.';
-$string['ifprofilefiedonlyvisible'] = '{ifprofile_field_} only visible.';
-$string['ifprofilefiedonlyvisible_desc'] = 'When checked, restrict the {ifprofile_field_...} tag to only access visible user profile fields. Hidden fields will behave as if they were empty. If unchecked, this tag will be also able to check hidden fields.';
-$string['categorycardshowpic'] = 'Show {categorycards} background';
-$string['categorycardshowpic_desc'] = 'If enabled, will display a background colour/pattern for {categorycards} tag similar to the course images when no image was specified.';
-$string['coursecardsformat'] = 'Course cards layout';
-$string['coursecardsformat_desc'] = 'Display {coursecards}, {coursecardsbyenrol} and {mycoursescards} either:
-
-
Vertical: Course image above course name.
-
Horizontal: Course image to the left of course name, category and summary; or
-
List in a table: Course name, category and summary.
-
';
-$string['coursecardsbyenrol'] = 'Maximum {coursecardsbyenrol} cards.';
-$string['coursecardsbyenrol_desc'] = 'Maximum number of course cards to display for {coursecardsbyenrol} tag. Set to zero for unlimited (not recommended).';
-$string['chartprogressbarlabel'] = '{$a->label}: {$a->value}';
-$string['teamcardsformat'] = 'Team cards format';
-$string['teamcardsformat_desc'] = 'Choose how the team members will appear in the {teamcards} tag.
-
-
None: Displays just the picture and name as a card without the user description.
-
Icon: Same as none except that the user description appears in an information popup bubble.
-
Brief: Same as none but displays the description below the user picture and name.
-
Verbose: List format. Recommended if your team members tends to have long user descriptions.
-
';
-$string['brief'] = 'Brief';
-$string['verbose'] = 'Verbose';
-$string['teamcardslinktype'] = 'Team link type';
-$string['teamcardslinktype_desc'] = 'Choose the type of link for the team member\'s link in the {teamcards} tag. Note: Photo will automatically be linked to profile when the user is logged-in regardless of your choice here.';
-$string['narrowpage'] = 'Narrow page';
-$string['narrowpage_desc'] = 'Enable this option to optimize display of information if Moodle is using a theme with limited page width (e.g., Boost in Moodle 4.0+).';
-$string['sizeb'] = 'B';
-$string['sizekb'] = 'KB';
-$string['sizemb'] = 'MB';
-$string['sizegb'] = 'GB';
-$string['sizetb'] = 'TB';
-$string['sizeeb'] = 'EB';
-$string['sizezb'] = 'ZB';
-$string['sizeyb'] = 'YB';
-
-$string['globaltagheadingtitle'] = 'Global custom tags';
-$string['globaltagheadingdesc'] = 'Define your own global tags, sometimes also called global blocks.';
-$string['globaltagcount'] = 'Number of global tags.';
-$string['globaltagcountdesc'] = 'Select the number of tags you want to define. For optimal performance, only select the the number you will need.';
-$string['globaltagnametitle'] = 'Tag: global_';
-$string['globaltagnamedesc'] = 'This will be part of your tag name, prefixed with "global_". Example: If you enter "address" here, your tag will be called {global_address}". Must be a single string of letters only. Spaces, numbers and special characters are not permitted.';
-$string['globaltagcontenttitle'] = 'Content';
-$string['globaltagcontentdesc'] = 'This is the content that your global tag will replace. Example: If your tag is called "{global_address}", that tag will be replaced by the content entered into this field.';
-$string['pagebuilder'] = 'Page builder';
-$string['pagebuilderlink'] = 'https://www.layoutit.com/build';
-$string['photoeditor'] = 'Photo editor';
-$string['photoeditorlink'] = 'https://pixlr.com/editor/';
-$string['screenrec'] = 'Screen recorder';
-$string['screenreclink'] = 'https://screenapp.io/#/recording';
-$string['notavailable'] = 'Not available';
-
-$string['moremenu'] = 'More'; // Only used for Moodle before 4.0.
-$string['unenrolme'] = 'Unenrol me from this course'; // Only used for Moodle before 4.2.
-
-$string['formquickquestion'] = '
-
-';
+';
$string['formcontactus'] = '
';
-
-$string['formcourserequest'] = '
-
';
-
$string['formsupport'] = '
';
+$string['globaltagcontentdesc'] = 'This is the content that your global tag will replace. Example: If your tag is called "{global_address}", that tag will be replaced by the content entered into this field.';
+$string['globaltagcontenttitle'] = 'Content';
+$string['globaltagcount'] = 'Number of global tags.';
+$string['globaltagcountdesc'] = 'Select the number of tags you want to define. For optimal performance, only select the the number you will need.';
+$string['globaltagheadingdesc'] = 'Define your own global tags, sometimes also called global blocks.';
+$string['globaltagheadingtitle'] = 'Global custom tags';
+$string['globaltagnamedesc'] = 'This will be part of your tag name, prefixed with "global_". Example: If you enter "address" here, your tag will be called {global_address}". Must be a single string of letters only. Spaces, numbers and special characters are not permitted.';
+$string['globaltagnametitle'] = 'Tag: global_';
+$string['hidecompletedcourses'] = 'Hide completed courses';
+$string['hidecompletedcourses_desc'] = 'Enable to filter out completed courses in {mycoursesmenu} tag listings.';
+$string['ifprofilefiedonlyvisible_desc'] = 'When checked, restrict the {ifprofile_field_...} tag to only access visible user profile fields. Hidden fields will behave as if they were empty. If unchecked, this tag will be also able to check hidden fields.';
+$string['ifprofilefiedonlyvisible'] = '{ifprofile_field_} only visible.';
+$string['moremenu'] = 'More'; // Only used for Moodle before 4.0.
+$string['narrowpage'] = 'Narrow page';
+$string['narrowpage_desc'] = 'Enable this option to optimize display of information if Moodle is using a theme with limited page width (e.g., Boost in Moodle 4.0+).';
+$string['nocompletedcourses'] = 'None of the courses in which you are enrolled have been marked as completed.';
+$string['notavailable'] = 'Not available';
+$string['pagebuilder'] = 'Page builder';
+$string['pagebuilderlink'] = 'https://www.layoutit.com/build';
+$string['photoeditor'] = 'Photo editor';
+$string['photoeditorlink'] = 'https://pixlr.com/editor/';
+$string['pluginname'] = 'Filter Codes';
+$string['privacy:metadata'] = 'The Filter Codes plugin does not store any personal data about any user.';
+$string['screenrec'] = 'Screen recorder';
+$string['screenreclink'] = 'https://screenapp.io/#/recording';
+$string['showhiddenprofilefields'] = 'Show hidden profile fields';
+$string['showhiddenprofilefields_desc'] = 'Enable the {profile_field_...} tag to process all profile fields including ones hidden from the user.';
+$string['sizeb'] = 'B';
+$string['sizeeb'] = 'EB';
+$string['sizegb'] = 'GB';
+$string['sizekb'] = 'KB';
+$string['sizemb'] = 'MB';
+$string['sizetb'] = 'TB';
+$string['sizeyb'] = 'YB';
+$string['sizezb'] = 'ZB';
+$string['teamcardsformat'] = 'Team cards format';
+$string['teamcardsformat_desc'] = 'Choose how the team members will appear in the {teamcards} tag.
+
+
None: Displays just the picture and name as a card without the user description.
+
Icon: Same as none except that the user description appears in an information popup bubble.
+
Brief: Same as none but displays the description below the user picture and name.
+
Verbose: List format. Recommended if your team members tends to have long user descriptions.
+
';
+$string['teamcardslinktype'] = 'Team link type';
+$string['teamcardslinktype_desc'] = 'Choose the type of link for the team member\'s link in the {teamcards} tag. Note: Photo will automatically be linked to profile when the user is logged-in regardless of your choice here.';
+$string['unenrolme'] = 'Unenrol me from this course'; // Only used for Moodle before 4.2.
+$string['verbose'] = 'Verbose';
-$string['formcheckin'] = '
-';
+
+';
diff --git a/version.php b/version.php
index 3cacfee..1528d53 100644
--- a/version.php
+++ b/version.php
@@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2024042400; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->version = 2024050100; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2014051200; // Requires Moodle version 2.7 or later.
$plugin->component = 'filter_filtercodes'; // Full name of the plugin (used for diagnostics).
-$plugin->release = '2.5.0';
+$plugin->release = '2.5.1';
$plugin->maturity = MATURITY_STABLE;