Skip to content
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

Add filter to custom service icon #45270

Closed
wants to merge 1 commit into from
Closed

Add filter to custom service icon #45270

wants to merge 1 commit into from

Conversation

yannkozon
Copy link

What?

Add filter to custom service icon for social-link blocks

Why?

A simply filter for custom service icon

Testing Instructions

function example_callback( $value, $service ) {

	if( $service === 'facebook' ) {
		return '<svg width="24" height="24" ...></svg>';
	}

    return $value;
}
add_filter( 'social_link_icon', 'example_callback', 10, 2 );

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 25, 2022
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @yannkozon! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Soean Soean added [Block] Social Affects the Social Block - used to display Social Media accounts [Type] Enhancement A suggestion for improvement. labels Oct 25, 2022
@skorasaurus
Copy link
Member

skorasaurus commented Oct 25, 2022

This is certainly a lot simpler than #30749 although I haven't looked at any of the code or any of the discussion there.

@ChrissiQ
Copy link

I believe it is simpler because it is only doing the PHP half of the equation. I think this filter will not affect the block editor, only the front end. So the other PR is more complete.

@yannkozon yannkozon closed this by deleting the head repository Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants