Skip to content

Instantly share code, notes, and snippets.

@keefyhub
Created January 28, 2019 11:57
Show Gist options
  • Select an option

  • Save keefyhub/4c2191e2a96b5a3770be898aee305428 to your computer and use it in GitHub Desktop.

Select an option

Save keefyhub/4c2191e2a96b5a3770be898aee305428 to your computer and use it in GitHub Desktop.
Get available layouts from flexible content class
$class = new ReflectionClass('\SS_ACF\Components\FlexibleContent');
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
asort($methods);
foreach ($methods as $function) {
if ($function->class === 'SS_ACF\Components\FlexibleContent') {
echo "'{$function->name}',<br>";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment