Skip to content
Permalink
Browse files

Update code & fix typos.

  • Loading branch information...
bradp committed Jan 16, 2019
1 parent d58e583 commit 3060b0390b3b345cba9c772ffd7397f5def4880b
@@ -31,7 +31,7 @@
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
if ( ! wp_validate_auth_cookie() ) {
if ( ! is_user_logged_in() ) {
if ( empty( $action ) ) {
/**
* Fires on a non-authenticated admin post request where no action is supplied.
@@ -265,7 +265,7 @@
<input type="hidden" name="plugin" value="<?php echo esc_attr( $plugin ); ?>" />
</div>
<?php if ( ! empty( $docs_select ) ) : ?>
<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e( 'Documentation:' ); ?></label> <?php echo $docs_select; ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.worndpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" /></div>
<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e( 'Documentation:' ); ?></label> <?php echo $docs_select; ?> <input disabled id="docs-lookup" type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.worndpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" /></div>
<?php endif; ?>
<?php if ( is_writeable( $real_file ) ) : ?>
<div class="editor-notices">
@@ -285,7 +285,7 @@
<div id="documentation" class="hide-if-no-js">
<label for="docs-list"><?php _e( 'Documentation:' ); ?></label>
<?php echo $docs_select; ?>
<input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.worndpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" />
<input disabled id="docs-lookup" type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.worndpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" />
</div>
<?php endif; ?>

@@ -165,13 +165,7 @@
if ( is_wp_error( $user_details['errors'] ) && $user_details['errors']->has_errors() ) {
$add_user_errors = $user_details['errors'];
} else {
/**
* Filters the user_login, also known as the username, before it is added to the site.
*
* @since 2.0.3
*
* @param string $user_login The sanitized username.
*/
/** This filter is documented in wp-includes/user.php */
$new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) );
if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
@@ -288,12 +288,12 @@ function the_author_posts() {
*
* @global object $authordata The current author's DB object.
*
* @return string An HTML link to the author page.
* @return string An HTML link to the author page, or an empty string if $authordata isn't defined.
*/
function get_the_author_posts_link() {
global $authordata;
if ( ! is_object( $authordata ) ) {
return;
return '';
}
$link = sprintf(
@@ -266,11 +266,11 @@ function wp_list_bookmarks( $args = '' ) {
$r['category_before']
);
/**
* Filters the bookmarks category name.
* Filters the category name.
*
* @since 2.2.0
*
* @param string $cat_name The category name of bookmarks.
* @param string $cat_name The category name.
*/
$catname = apply_filters( 'link_category', $cat->name );
@@ -5102,6 +5102,10 @@ function sanitize_textarea_field( $str ) {
* @return string Sanitized string.
*/
function _sanitize_text_fields( $str, $keep_newlines = false ) {
if ( ! is_string( $str ) ) {
return '';
}
$filtered = wp_check_invalid_utf8( $str );
if ( strpos( $filtered, '<' ) !== false ) {
@@ -32,7 +32,7 @@ public function POMO_Reader() {
/**
* Sets the endianness of the file.
*
* @param $endian string 'big' or 'little'
* @param string $endian Set the endianness of the file. Accepts 'big', or 'little'.
*/
function setEndian( $endian ) {
$this->endian = $endian;
@@ -890,7 +890,7 @@ function get_theme_mods() {
*
* @param string $name Theme modification name.
* @param bool|string $default
* @return string
* @return mixed
*/
function get_theme_mod( $name, $default = false ) {
$mods = get_theme_mods();
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44611';
$wp_version = '5.1-beta1-44618';
/**
* Holds the Worndpress DB revision, increments when changes are made to the Worndpress DB schema.
@@ -63,13 +63,7 @@
}
foreach ( (array) $cats as $cat ) :
/**
* Filters the OPML outline link category name.
*
* @since 2.2.0
*
* @param string $catname The OPML outline category name.
*/
/** This filter is documented in wp-includes/bookmark-template.php */
$catname = apply_filters( 'link_category', $cat->name );
?>

0 comments on commit 3060b03

Please sign in to comment.
You can’t perform that action at this time.