Skip to content

Instantly share code, notes, and snippets.

@sybrew
Last active April 5, 2019 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sybrew/af21c149e5acf5a089efcea0a545dad0 to your computer and use it in GitHub Desktop.
Save sybrew/af21c149e5acf5a089efcea0a545dad0 to your computer and use it in GitHub Desktop.
<?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