wip find user fields

This commit is contained in:
asus
2024-02-14 17:10:44 +01:00
parent 7b8e61a59f
commit 8d0122f63e
4 changed files with 32 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ function fipfcard_main_shortcode() {
$fipfcard_tools = new PLGNTOOLS();
$fipfcard_tools->add_files_to_front( array(
"example_style.css",
"example_init.js",
@@ -76,12 +77,21 @@ function fipfcard_main_shortcode() {
$names = ["hugo", "camille"];
$ages = ["13", "34", "56"];
$getPostMeta = get_post_meta( get_the_ID() );
$getMetaData = get_metadata( 'post', get_the_ID() );
$post_meta = $getPostMeta;
$getUserMeta = get_metadata( 'user', get_current_user_id() );
$user_meta = $getUserMeta;
$html_front = $fipfcard_tools->create_html(
array(
"example_index.html",
"example_index2.html",
),
compact(
"post_meta",
"user_meta",
"names",
"ages",
)

View File

@@ -1,4 +1,21 @@
<div id="model_plugin_shortcode">
<ol>
<p>list of post meta :</p>
<?php
foreach($post_meta as $meta_key => $meta_value) {
include($html_dir."templates/print_meta.html");
}
?>
</ol>
<ol>
<p>list of user meta :</p>
<?php
foreach($user_meta as $meta_key => $meta_value) {
include($html_dir."templates/print_meta.html");
}
?>
</ol>
<p>i am a new p</p>
<p class="first_el_to_change">to change</p>
<button id='test_ajax_1' name="ajax_button_1" value="2024">2024</button>

View File

@@ -0,0 +1,4 @@
<li>
"<?php echo esc_html($meta_key); ?>" :
<?php echo esc_html(json_encode($meta_key)); ?>
</li>

Submodule private updated: a3f485f995...3a33975c3f