prefix}postmeta WHERE meta_key = 'rule'"; // $acf_pro_sql1="SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_edit_last'"; //OLD $acf_pro_sql2="SELECT * FROM {$wpdb->prefix}posts INNER JOIN {$wpdb->prefix}postmeta ON {$wpdb->prefix}posts.ID = {$wpdb->prefix}postmeta.post_id WHERE 1=1 AND {$wpdb->prefix}posts.post_type = 'acf-field-group' AND {$wpdb->prefix}posts.post_status = 'publish' AND {$wpdb->prefix}postmeta.meta_key = '_edit_last' ORDER BY {$wpdb->prefix}posts.menu_order, {$wpdb->prefix}posts.post_date DESC"; if(!$ACF_PRO_active): //ACF $acf_field_group_VARS = $wpdb->get_results($acf_sql1); else: //ACF PRO $acf_field_group_VARS = $wpdb->get_results($acf_pro_sql2); endif; ?>
ACF Show PHP Variables | Template Usage(Copy and Paste into your template file.) "; echo ' Variables for ACF function: ';
echo "" . $getf . ""; // echo ""; // echo " ";
echo " ";
echo "";
?>
" . $getfinst . " "; echo " |
|---|
";
if($count = 1):
$count++;
echo '';
echo " <?php"; echo " /**"; echo ""; endif; foreach($acf_field_group_keys_ARRAY as $acf_field_group_keys_EACH){ //var_dump($acf_field_field_VAR); if(!$ACF_PRO_active): $acf_field_group_keys_EACH = get_field_object($acf_field_group_keys_EACH); else: $acf_field_group_keys_EACH = get_field_object($acf_field_group_keys_EACH->post_name); endif; $acf_field_LABEL = $acf_field_group_keys_EACH['label']; $acf_field_NAME = $acf_field_group_keys_EACH['name']; $acf_field_KEY = $acf_field_group_keys_EACH['key']; $acf_field_TYPE = $acf_field_group_keys_EACH['type']; $acf_field_INSTRUCTIONS = $acf_field_group_keys_EACH['instructions']; ?>
';
//echo '';
echo '';
echo ' $' . $acf_field_NAME . ' = ';
echo '';
//echo '';
echo 'get_field(''.$acf_field_NAME.'');';
echo ' // # ' . $acf_field_TYPE . '';
echo ' // #'. htmlspecialchars($acf_field_INSTRUCTIONS) .'';
?>
";//die(); ?> '; echo " "; echo ''; endif; foreach($acf_field_group_keys_ARRAY as $acf_field_group_keys_EACH){ //var_dump($acf_field_field_VAR); if(!$ACF_PRO_active): $acf_field_group_keys_EACH = get_field_object($acf_field_group_keys_EACH); else: $acf_field_group_keys_EACH = get_field_object($acf_field_group_keys_EACH->post_name); endif; $acf_field_LABEL = $acf_field_group_keys_EACH['label']; $acf_field_NAME = $acf_field_group_keys_EACH['name']; $acf_field_KEY = $acf_field_group_keys_EACH['key']; $acf_field_TYPE = $acf_field_group_keys_EACH['type']; $acf_field_INSTRUCTIONS = $acf_field_group_keys_EACH['instructions']; echo ''; require('acf-examples.php'); echo ''; }//end foreach if($count = 1): $count++; echo " ?>"; endif; echo " |