开发者 | coffee2code |
---|---|
更新时间 | 2021年9月17日 15:07 |
捐献地址: | 去捐款 |
PHP版本: | 4.6 及以上 |
WordPress版本: | 5.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
expandable-dashboard-recent-comments.zip
inside the plugins directory for your site (typically wp-content/plugins/
)When you hover over the comment, a line of action links will appear (typically "Approve", "Reply", "Edit", "Spam", and "Trash"). If the comment has been automatically excerpted by WordPress, then a "Show more" link will appear. Click it to view the full comment.
The comment has not been been excerpted; you are already seeing the comment in its entirety so there is no need to be able to "show more".
Assuming you are using a supported version of WordPress and you have JavaScript enabled in your browser, this just means that none of the comments being listed have been excerpted, thus there is no need to be able to "Expand all" or "Collapse all" in this instance.
If all of the comments in the widget are currently collapsed, then the "Collapse all" link will appear grayed out to indicate there is nothing for it to collapse. Likewise, if all of the comments in the widget are currently expanded, then "Expand all" will appear grayed out to indicate there is nothing for it to expand. As comments are expanded and collapsed, these two links will adjust themselves to appear grayed out or active as appropriate.
Yes. Please see the "Hooks" section for documentation on the c2c_expandable_dashboard_recent_comments_start_expanded
filter which allows for this.
If JavaScript is disabled in a visitor's browser, then all of the expand/collapse links and behavior aren't enabled. But rest assured, there aren't any errors. Why not implement a fallback if JS is disabled? If you're going to click a link that causes a page reload to view the full comment, you might as well just click through to the comment.
Yes.
phpunit/
into tests/
phpunit/bin
into tests/
get_comment_class()
phpunit/
to house all files related to unit testingbin/
to phpunit/bin/
tests/bootstrap.php
to phpunit/
tests/
to phpunit/tests/
phpunit.xml
to phpunit.xml.dist
per best practicescomment_row_action()
, enqueue_admin_css()
, enqueue_admin_js()
, get_comment_class()
, register_styles()
c2c_expandable_dashboard_recent_comments_start_expanded
filterget_comments_class()
from private
to protected
to facilitate unit testing