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 support to override default icons #23

Merged
merged 2 commits into from
May 12, 2017

Conversation

suyogyashukla
Copy link

@suyogyashukla suyogyashukla commented May 12, 2017

Override default Our Focus Widget icons from Child Theme suyogyashukla/Portif#2

Override default Our Focus Widget icons from Child Theme suyogyashukla/Portif#2
@ineagu
Copy link
Contributor

ineagu commented May 12, 2017

not possible one filter with multiple params ?

cc @rodica-andronache

@suyogyashukla
Copy link
Author

Not sure how to do that. @rodica-andronache Any ideas? :D

@ineagu
Copy link
Contributor

ineagu commented May 12, 2017 via email

@rodica-andronache rodica-andronache merged commit 43d1270 into Codeinwp:development May 12, 2017
@rodica-andronache
Copy link
Contributor

@suyogyashukla I changed the filters to have just one, with an extra parameter.

Now, in your child theme you can do something like this:
`add_filter( 'zerif_ourfocus_icon_default_filter','example_callback', 10, 2 );
function example_callback( $arg1, $arg2 ) {

if( $arg2 == 'first' ) {
           return get_stylesheet_directory_uri() . "/images/first.jpg";
} elseif( $arg2 == 'second' ) {

	return get_stylesheet_directory_uri() . "/images/second.jpg";
}

}`

You can find more explanations here: https://gist.github.com/rodica-andronache/42b57f63006466678200feb84f72a82e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants