This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Load Ember templates in WordPress | |
*/ | |
public static function load_views() { | |
$iterator = new \DirectoryIterator( plugin_dir_path( __FILE__ ) . 'views' ); | |
foreach ( $iterator as $file ) { | |
/** | |
* @var \SplFileInfo $file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mime_type = sanitize_mime_type( $_FILES['upload']['type'] ); | |
update_post_meta( get_the_ID(), 'mime_type', $mime_type ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = esc_url_raw( $_POST['url'] ); | |
update_post_meta( get_the_ID(), 'url', $url ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$email = sanitize_email( $_POST['email'] ); | |
update_post_meta( get_the_ID(), 'email', $email ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$slug = sanitize_title( $_POST['title'], 'untitled' ); | |
update_post_meta( get_the_ID(), 'slug', $slug ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$title = sanitize_text_field( $_POST['title'] ); | |
update_post_meta( get_the_ID(), 'title', $title ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html_class = sanitize_html_class( $_POST['html_class'] ); | |
update_post_meta( get_the_ID(), 'html_class', $html_class ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$message = wp_kses_post( $_POST['message'] ); | |
update_post_meta( get_the_ID(), 'message', $message ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$excerpt = wp_kses_post( balanceTags( substr( $_POST['content'], 0, 300 ), true ) ); | |
update_post_meta( get_the_ID(), 'excerpt', $excerpt ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
register_meta( 'post', 'email', 'is_email' ); | |
update_post_meta( get_the_ID(), 'email', $_POST['email'] ); |