Created
October 17, 2014 16:46
-
-
Save ninnypants/8c66012fa4b7f1e51f4f to your computer and use it in GitHub Desktop.
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
function widget($args, $instance) | |
{ | |
$title = apply_filters( 'widget_title', "hallo", $instance, $this->id_base ); | |
// Variables | |
$acf_key = "widget_" . $this->id_base . "_" . $this->number; | |
// Debug information | |
echo "<h3>ACF Key:</h3>"; | |
echo $acf_key . "<br />"; | |
echo "<br />"; | |
echo "<h3>Fields:</h3>"; | |
echo "<pre>"; | |
print_r($instance["fields"]); | |
echo "</pre>"; | |
echo "<br />"; | |
echo "Use get_field(\"fieldname\", \$acf_key); to get the fields in the widget function."; | |
echo "<br />"; | |
echo "<br />"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment