meta_form [ WordPress Function ]
meta_form ( No parameters )
| Defined at: |
|
{@internal Missing Short Description}}
Source
<?php
function meta_form() {
global $wpdb;
$limit = (int) apply_filters( 'postmeta_form_limit', 30 );
$keys = $wpdb->get_col( "
SELECT meta_key
FROM $wpdb->postmeta
GROUP BY meta_key
HAVING meta_key NOT LIKE '\_%'
ORDER BY meta_key
LIMIT $limit" );
if ( $keys )
natcasesort($keys);
?>
<p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
<table id="newmeta">
<thead>
<tr>
<th class="left"><label for="metakeyselect"><?php _ex( 'Name', 'meta name' ) ?></label></th>
<th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
</tr>
</thead>
<tbody>
<tr>
<td id="newmetaleft" class="left">
<?php if ( $keys ) { ?>
<select id="metakeyselect" name="metakeyselect" tabindex="7">
<option value="#NONE#"><?php _e( '— Select —' ); ?></option>
<?php
foreach ( $keys as $key ) {
echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
}
?>
</select>
<input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" />
<a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
<span id="enternew"><?php _e('Enter new'); ?></span>
<span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
<?php } else { ?>
<input type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" />
<?php } ?>
</td>
<td><textarea id="metavalue" name="metavalue" rows="2" cols="25" tabindex="8"></textarea></td>
</tr>
<tr><td colspan="2" class="submit">
<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub', 'tabindex' => '9' ) ); ?>
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
</td></tr>
</tbody>
</table>
<?php
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Metaform - Wikipedia, the free encyclopedia
Metaform (born Justice Aaron) is an American music producer, musician, and songwriter. He is considered a prominent figure in the development of instrumental ...
en.wikipedia.org - WordPress › Support » overwrite function (meta_form)
I want to make a theme where I overwrite the admin "Custom Fields" area with some HTML/PHP tweaks. So on the functions.php page I define a new function, ...
wordpress.org - PHPXRef 0.7 : WordPress : Function Reference: meta_form()
Function and Method Cross Reference. meta_form(). Defined at: /wp-admin/ includes/template.php -> line 506. Referenced 1 times: ...
phpxref.ftwr.co.uk - METAFORM - MPMV2
If you live in the world of men, you may become a man. If you live in your own world, you will become yourself.
www.metaformonline.com