示例#1
0
    /**
     * Render the HTML.
     *
     * @param \WP_Post $post Post object.
     *
     * @return void
     */
    public function render(\WP_Post $post)
    {
        $meta_value = get_post_meta($post->ID, $this->meta_key, TRUE);
        $this->nonce->print_field();
        ?>
		<p>
			<?php 
        esc_html_e('Please enter the URL of the external content.', 'external-content');
        ?>
		</p>
		<table class="form-table">
			<tbody>
			<tr>
				<th scope="row">
					<label for="<?php 
        echo $this->meta_key;
        ?>
">
						<?php 
        esc_html_e('External URL', 'external-content');
        ?>
					</label>
				</th>
				<td>
					<input type="url" name="<?php 
        echo $this->meta_key;
        ?>
" class="large-text"
						placeholder="http://example.com" value="<?php 
        echo esc_attr($meta_value);
        ?>
">
				</td>
			</tr>
			</tbody>
		</table>
		<?php 
    }