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

Contact Info Widget: add 2 hooks to add data to the widget. #3397

Merged
merged 3 commits into from Feb 11, 2016

Conversation

Projects
None yet
3 participants
@jeherve
Copy link
Member

jeherve commented Feb 10, 2016

Once the hooks are added, a site owner could add data to the form like so:

function jeherve_add_mailto_widget() {
    echo "<a href='mailto:me@example.com'>Contact us!</a>";
}
add_action( 'jetpack_contact_info_widget_end', 'jeherve_add_mailto_widget' );

Suggested here:
https://wordpress.org/support/topic/add-an-email-link-to-contact-info-jetpack-hours-info-widget?replies=1&view=all

*
* @since 3.9.2
*/
do_action( 'jetpack_contact_info_widget_beginning' );

This comment has been minimized.

@eliorivero

eliorivero Feb 10, 2016

Contributor

Maybe this could be named _start instead? Writing beginning is prone to errors for non-english devs and there are a couple of actions in core that end in _start so it's more consistent.

This comment has been minimized.

@jeherve

jeherve Feb 10, 2016

Author Member

Good point! I changed that in 04db263

@eliorivero

This comment has been minimized.

Copy link
Contributor

eliorivero commented Feb 10, 2016

Added @module into inline docs but other than that, lgtm and works fine.

@jeherve

This comment has been minimized.

Copy link
Member

jeherve commented on 904e5a2 Feb 10, 2016

👍 I had forgotten about that!

zinigor added a commit that referenced this pull request Feb 11, 2016

Merge pull request #3397 from Automattic/add/actions-contact-info-widget
Contact Info Widget: add 2 hooks to add data to the widget.

@zinigor zinigor merged commit 6ee1165 into master Feb 11, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@kraftbj kraftbj deleted the add/actions-contact-info-widget branch Apr 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment