Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickebates committed Dec 20, 2018
2 parents 3420864 + dd063a5 commit 7a4d81d
Show file tree
Hide file tree
Showing 92 changed files with 2,193 additions and 1,658 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Project Nami
===============

### Version: `2.0.1` ###
### Version: `2.0.2` ###

### Description: ###
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://deploy.azure.com/?repository=https://github.com/ProjectNami/projectnami/tree/latest)
Expand Down
18 changes: 18 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@

<div class="changelog point-releases">
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
73
),
'5.0.2',
number_format_i18n( 73 )
);
?>
<?php
/* translators: %s: Codex URL */
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_5.0.2' );
?>
</p>
<p>
<?php
/* translators: %s: WordPress version number */
Expand Down
1 change: 1 addition & 0 deletions wp-admin/includes/plugin-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ function install_plugin_install_status($api, $loop = false) {
$status = 'install';
$url = false;
$update_file = false;
$version = '';

/*
* Check to see if this plugin is known to be installed,
Expand Down
48 changes: 20 additions & 28 deletions wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1029,18 +1029,24 @@ function wp_edit_posts_query( $q = false ) {
$post_type = 'post';

$avail_post_stati = get_available_post_statuses($post_type);
$post_status = '';
$perm = '';

if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) {
$post_status = $q['post_status'];
$perm = 'readable';
}

$orderby = '';

if ( isset( $q['orderby'] ) ) {
$orderby = $q['orderby'];
} elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
$orderby = 'modified';
}

$order = '';

if ( isset( $q['order'] ) ) {
$order = $q['order'];
} elseif ( isset( $q['post_status'] ) && 'pending' == $q['post_status'] ) {
Expand Down Expand Up @@ -1080,7 +1086,7 @@ function wp_edit_posts_query( $q = false ) {
$query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page');

// Hierarchical types require special args.
if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) {
if ( is_post_type_hierarchical( $post_type ) && empty( $orderby ) ) {
$query['orderby'] = 'menu_order title';
$query['order'] = 'asc';
$query['posts_per_page'] = -1;
Expand Down Expand Up @@ -2212,36 +2218,22 @@ function the_block_editor_meta_box_post_form_hidden_fields( $post ) {
* Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards
* compatibility, we can capture the output from these actions, and extract the hidden input fields.
*/
$actions = array(
'edit_form_after_title',
'edit_form_advanced',
);

foreach ( $actions as $action ) {
ob_start();
do_action_deprecated(
$action,
array( $post ),
'5.0.0',
'block_editor_meta_box_hidden_fields',
__( 'This action is still supported in the classic editor, but is deprecated in the block editor.' )
);
$classic_output = ob_get_clean();

if ( ! $classic_output ) {
ob_start();
/** This filter is documented in wp-admin/edit-form-advanced.php */
do_action( 'edit_form_after_title', $post );
/** This filter is documented in wp-admin/edit-form-advanced.php */
do_action( 'edit_form_advanced', $post );
$classic_output = ob_get_clean();

$classic_elements = wp_html_split( $classic_output );
$hidden_inputs = '';
foreach( $classic_elements as $element ) {
if ( 0 !== strpos( $element, '<input ') ) {
continue;
}

$classic_elements = wp_html_split( $classic_output );
$hidden_inputs = '';
foreach( $classic_elements as $element ) {
if ( 0 !== strpos( $element, '<input ') ) {
continue;
}

if ( preg_match( '/\stype=[\'"]hidden[\'"]\s/', $element ) ) {
echo $element;
}
if ( preg_match( '/\stype=[\'"]hidden[\'"]\s/', $element ) ) {
echo $element;
}
}
?>
Expand Down
2 changes: 0 additions & 2 deletions wp-content/themes/twentynineteen/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
// Remove for now @TODO
// the_archive_description( '<div class="page-description">', '</div>' );
?>
</header><!-- .page-header -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ public static function get_social_link_svg( $uri, $size ) {
'facebook.com',
'fb.me',
),
'feed' => array(
'feed' => array(
'feed',
),
'google-plus' => array(
'plus.google.com',
),
'lastfm' => array(
'lastfm' => array(
'last.fm',
),
'mail' => array(
'mail' => array(
'mailto:',
),
'slideshare' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,42 @@ protected function html5_comment( $comment, $depth, $args ) {
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
} else {
printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
echo $avatar;
}
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
} else {
printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
echo $avatar;
}
}
/*
* Using the `check` icon instead of `check_circle`, since we can't add a
* fill color to the inner check shape when in circle form.
*/
if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}

/*
* Using the `check` icon instead of `check_circle`, since we can't add a
* fill color to the inner check shape when in circle form.
*/
if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
/* translators: %s: SVG Icon */
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}

printf(
/* translators: %s: comment author link */
printf(
/* translators: %s: comment author link */
wp_kses(
__( '%s <span class="screen-reader-text says">says:</span>', 'twentynineteen' ),
sprintf( '<span class="fn">%s</span>', $comment_author )
);
array(
'span' => array(
'class' => array(),
),
)
),
'<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
);

if ( ! empty( $comment_author_url ) ) {
echo '</a>';
}
if ( ! empty( $comment_author_url ) ) {
echo '</a>';
}
?>
</div><!-- .comment-author -->

Expand Down Expand Up @@ -110,5 +115,4 @@ protected function html5_comment( $comment, $depth, $args ) {
?>
<?php
}

}
50 changes: 25 additions & 25 deletions wp-content/themes/twentynineteen/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,38 @@
<div class="<?php echo $discussion->responses > 0 ? 'comments-title-wrap' : 'comments-title-wrap no-responses'; ?>">
<h2 class="comments-title">
<?php
if ( comments_open() ) {
if ( have_comments() ) {
_e( 'Join the Conversation', 'twentynineteen' );
} else {
_e( 'Leave a comment', 'twentynineteen' );
}
if ( comments_open() ) {
if ( have_comments() ) {
_e( 'Join the Conversation', 'twentynineteen' );
} else {
_e( 'Leave a comment', 'twentynineteen' );
}
} else {
if ( '1' == $discussion->responses ) {
/* translators: %s: post title */
printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
} else {
if ( '1' == $discussion->responses ) {
/* translators: %s: post title */
printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s reply on &ldquo;%2$s&rdquo;',
'%1$s replies on &ldquo;%2$s&rdquo;',
$discussion->responses,
'comments title',
'twentynineteen'
),
number_format_i18n( $discussion->responses ),
get_the_title()
);
}
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s reply on &ldquo;%2$s&rdquo;',
'%1$s replies on &ldquo;%2$s&rdquo;',
$discussion->responses,
'comments title',
'twentynineteen'
),
number_format_i18n( $discussion->responses ),
get_the_title()
);
}
}
?>
</h2><!-- .comments-title -->
<?php
// Only show discussion meta information when comments are open and available.
if ( have_comments() && comments_open() ) {
if ( have_comments() && comments_open() ) {
get_template_part( 'template-parts/post/discussion', 'meta' );
}
}
?>
</div><!-- .comments-title-flex -->
<?php
Expand Down
29 changes: 22 additions & 7 deletions wp-content/themes/twentynineteen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ function twentynineteen_scripts() {

wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' );

wp_enqueue_script( 'twentynineteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

if ( has_nav_menu( 'menu-1' ) ) {
wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.0', true );
wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.0', true );
Expand All @@ -236,6 +234,24 @@ function twentynineteen_scripts() {
}
add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' );

/**
* Fix skip link focus in IE11.
*
* This does not enqueue the script because it is tiny and because it is only for IE11,
* thus it does not warrant having an entire dedicated blocking script being loaded.
*
* @link https://git.io/vWdr2
*/
function twentynineteen_skip_link_focus_fix() {
// The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`.
?>
<script>
/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);
</script>
<?php
}
add_action( 'wp_print_footer_scripts', 'twentynineteen_skip_link_focus_fix' );

/**
* Enqueue supplemental block editor styles.
*/
Expand Down Expand Up @@ -263,14 +279,13 @@ function twentynineteen_colors_css_wrap() {

require_once get_parent_theme_file_path( '/inc/color-patterns.php' );

if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) {
$primary_color = 199;
} else {
$primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) );
$primary_color = 199;
if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {
$primary_color = get_theme_mod( 'primary_color_hue', 199 );
}
?>

<style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . $primary_color . '"' : ''; ?>>
<style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>>
<?php echo twentynineteen_custom_colors_css(); ?>
</style>
<?php
Expand Down
15 changes: 11 additions & 4 deletions wp-content/themes/twentynineteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@

<?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?>
<div class="site-featured-image">
<?php twentynineteen_post_thumbnail(); ?>
<?php the_post(); ?>
<?php $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; ?>
<div class="<?php echo ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) ? 'entry-header has-discussion' : 'entry-header'; ?>">
<?php
twentynineteen_post_thumbnail();
the_post();
$discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null;

$classes = 'entry-header';
if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) {
$classes = 'entry-header has-discussion';
}
?>
<div class="<?php echo $classes; ?>">
<?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
</div><!-- .entry-header -->
<?php rewind_posts(); ?>
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/twentynineteen/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
echo wp_get_attachment_image( get_the_ID(), $image_size );
?>

<figcaption class="wp-caption-text"><?php echo get_the_excerpt(); ?></figcaption>
<figcaption class="wp-caption-text"><?php the_excerpt(); ?></figcaption>

</figure><!-- .entry-attachment -->

Expand Down
Loading

0 comments on commit 7a4d81d

Please sign in to comment.