Last active
April 5, 2019 12:41
-
-
Save sybrew/af21c149e5acf5a089efcea0a545dad0 to your computer and use it in GitHub Desktop.
Add ACF fields to the content parser of Focus. See: https://github.com/sybrew/The-SEO-Framework-Extension-Manager/blob/2d70d5a141491209340b72a8cefeb574dd00b538/extensions/essentials/focus/trunk/inc/classes/admin.class.php#L99-L128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Ref: https://github.com/sybrew/The-SEO-Framework-Extension-Manager/blob/2d70d5a141491209340b72a8cefeb574dd00b538/extensions/essentials/focus/trunk/inc/classes/admin.class.php#L99-L128 | |
/** | |
* Adds my custom fields to the Focus parser. | |
* | |
* @param array $elements | |
* @return array | |
*/ | |
add_filter( 'the_seo_framework_focus_elements', function( $elements ) { | |
$elements['pageContent'] += [ | |
".acf-field[data-name='my acf field name'] input" => 'append', | |
".acf-field[data-name='my other acf field name'] input" => 'append', | |
]; | |
return $elements; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment