MP_Addon_API_PostType::input( mixed $post, mixed $meta )
API key metabox callback.
Contents
Parameters Parameters
- $post
-
(mixed) (Required) post
- $meta
-
(mixed) (Required) meta
Source Source
File: calculator-API-add-on/inc/MP_Addon_API_PostType.php
public function input( $post, $meta ) {
$value = ( get_post_meta( $post->ID, $meta['id'], true ) ) ? esc_attr( get_post_meta( $post->ID, $meta['id'], true ) ) : md5( wp_create_nonce( MortgagePlatform::$prefix . 'api' . time() ) );
wp_nonce_field( plugin_basename( __FILE__ ), MortgagePlatform::$prefix . 'api' );
echo '<input style="width: 100%; padding: 10px" name="' . esc_attr( $meta['id'] ) . '" id="' . esc_attr( $meta['id'] ) . '" style="width: 100%" value="' . esc_attr( $value ) . '">';
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |