This file contains 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 | |
function my_password_form() { | |
global $post; | |
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); | |
$o = '<form class="protected-post-form" action="' . get_option( 'siteurl' ) . '/wp-pass.php" method="post"> | |
' . __( "To view this protected post, enter the password below:" ) . ' | |
<label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /> | |
</form> | |
'; | |
return $o; |
This file contains 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
if (0 !== $size && false !== $id) { | |
$this->update($entity, $id, $data); | |
} else { | |
$id = $this->create($entity, $data); | |
}; | |
break; | |
case "create": | |
//create: | |
$id = $this->create($entity, $data); | |
//sleep(5); |