Bookmark links are not showing the correct title text on page load or when adding/deleting.
Only a few simple changes are needed to make this work.
1) In the
2) In the
3) In the
4) In
Only a few simple changes are needed to make this work.
1) In the
bookmark_macros
template, replace the regex #phrase\('bookmark'\)(?:\|for_attr)?#
with ($content.isBookmarked() ? $editText|for_attr : $addText|for_attr)
.2) In the
bookmark_macros
template, replace the regex #addClass:is-bookmarked, ({\$editText\|for_attr}|{\$editText})#
with addClass:is-bookmarked, titleAttr:sync
.3) In the
bookmark_macros
template, replace the regex #removeClass:is-bookmarked, ({\$addText\|for_attr}|{\$addText})#
with removeClass:is-bookmarked, titleAttr:sync
.4) In
XF\ControllerPlugin\Bookmark::actionSaveBookmark
, successful replies with the switchKey
JSON parameter of bookmarked
need to also set the text
JSON parmater to \XF::phrase('edit_bookmark')
while replies with the switchKey
JSON parameter of bookmarkremoved
need to also set the text
JSON parameter to \XF::phrase('add_bookmark')
.