diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index e0f4464d94..3213d55028 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -64,7 +64,7 @@ $core_actions_post = array( 'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post', 'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin', 'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme', - 'install-theme', 'get-post-thumbnail-html', + 'install-theme', 'get-post-thumbnail-html', 'get-community-events', ); // Deprecated diff --git a/wp-admin/css/dashboard-rtl.css b/wp-admin/css/dashboard-rtl.css index a2034e69ae..9435c58fb0 100644 --- a/wp-admin/css/dashboard-rtl.css +++ b/wp-admin/css/dashboard-rtl.css @@ -301,6 +301,145 @@ content: "\f153"; } +/* Dashboard WordPress events */ + +.community-events-errors { + margin: 0; +} + +.community-events-loading { + padding: 10px 12px 8px; +} + +.community-events { + margin-bottom: 6px; + padding: 0 12px; +} + +.community-events .spinner { + float: none; + margin: 0; + padding-bottom: 3px; +} + +.community-events-errors[aria-hidden="true"], +.community-events-errors *[aria-hidden="true"], +.community-events-loading[aria-hidden="true"], +.community-events[aria-hidden="true"], +.community-events *[aria-hidden="true"] { + display: none; +} + +.community-events .activity-block:first-child, +.community-events h2 { + padding-top: 12px; + padding-bottom: 10px; +} + +.community-events-form { + margin: 15px 0 5px; +} + +.community-events-form .regular-text { + width: 40%; + height: 28px; +} + +.community-events li.event-none { + border-right: 4px solid #0070AE; +} + +.community-events-form label { + display: inline-block; + padding-bottom: 3px; +} + +.community-events .activity-block > p { + margin-bottom: 0; + display: inline; +} + +#community-events-submit { + margin-right: 2px; +} + +.community-events .button-link:hover, +.community-events .button-link:active { + color: #00a0d2; +} + +.community-events-cancel.button.button-link { + color: #0073aa; + text-decoration: underline; + margin-right: 2px; +} + +.community-events ul { + background-color: #fafafa; + padding-right: 0; + padding-left: 0; + padding-bottom: 0; +} + +.community-events li { + margin: 0; + padding: 8px 12px; + color: #72777c; +} +.community-events li:first-child { + border-top: 1px solid #eee; +} + +.community-events li ~ li { + border-top: 1px solid #eee; +} + +.community-events .activity-block.last { + border-bottom: 1px solid #eee; + padding-top: 0; + margin-top: -1px; +} + +.community-events .event-info { + display: block; +} + +.event-icon { + height: 18px; + padding-left: 10px; + width: 18px; + display: none; /* Hide on smaller screens */ +} + +.event-icon:before { + color: #82878C; + font-size: 18px; +} +.event-meetup .event-icon:before { + content: "\f484"; +} +.event-wordcamp .event-icon:before { + content: "\f486"; +} + +.community-events .event-title { + font-weight: 600; + display: block; +} + +.community-events .event-date, +.community-events .event-time { + display: block; +} + +.community-events-footer { + margin-top: 0; + margin-bottom: 0; + padding: 12px; + border-top: 1px solid #eee; + color: #ddd; +} + /* Dashboard WordPress news */ #dashboard_primary .inside { @@ -333,9 +472,8 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_primary .rss-widget { - border-bottom: 1px solid #eee; font-size: 13px; - padding: 8px 12px 10px; + padding: 0 12px 0; } #dashboard_primary .rss-widget:last-child { @@ -357,7 +495,8 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_primary .rss-widget ul li { - margin-bottom: 8px; + padding: 4px 0; + margin: 0; } /* Dashboard right now */ @@ -874,9 +1013,9 @@ form.initial-form.quickpress-open input#title { } a.rsswidget { - font-size: 14px; + font-size: 13px; font-weight: 600; - line-height: 1.7em; + line-height: 1.4em; } .rss-widget ul li { @@ -1087,6 +1226,14 @@ a.rsswidget { width: 30px; margin: 4px 0 5px 10px; } + + .community-events-toggle-location { + height: 38px; + } + + .community-events-form .regular-text { + height: 31px; + } } /* Smartphone */ @@ -1110,3 +1257,30 @@ a.rsswidget { right: -35px; } } + +@media screen and (min-width: 355px) { + .community-events .event-info { + display: table-row; + float: right; + max-width: 59%; + } + + .event-icon, + .event-icon[aria-hidden="true"] { + display: table-cell; + } + + .event-info-inner { + display: table-cell; + } + + .community-events .event-date-time { + float: left; + max-width: 39%; + } + + .community-events .event-date, + .community-events .event-time { + text-align: left; + } +} diff --git a/wp-admin/css/dashboard-rtl.min.css b/wp-admin/css/dashboard-rtl.min.css index d28822d066..37a49575bb 100644 --- a/wp-admin/css/dashboard-rtl.min.css +++ b/wp-admin/css/dashboard-rtl.min.css @@ -1 +1 @@ -#dashboard_quick_press .draft-title,#the-comment-list td.comment,.dashboard-comment-wrap{word-wrap:break-word}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:left;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:left}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:none!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}#the-comment-list td.comment p.comment-author{margin-top:0;margin-right:0}#the-comment-list p.comment-author img{float:right;margin-left:8px}#the-comment-list p.comment-author strong a{border:none}#the-comment-list td{vertical-align:top}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}.welcome-panel h2{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h3{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#72777c}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:10px;left:10px;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.welcome-panel .welcome-panel-close:before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 0 3px 13px;padding:12px 36px;height:auto;line-height:1.4285714;white-space:normal}.welcome-panel-content{margin-right:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:right}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#444}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 0 1em 1em}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none;padding:0 0 8px}.welcome-panel .welcome-icon{background:0 0!important}#dashboard_right_now li a:before,#dashboard_right_now li span:before,.welcome-panel .welcome-icon:before{color:#82878c;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 10px;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date,.rssSummary{color:#72777c}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:"\f119";top:-3px}.welcome-panel .welcome-add-page:before{content:"\f132";top:-1px}.welcome-panel .welcome-view-site:before{content:"\f115";top:-2px}.welcome-panel .welcome-widgets-menus:before{content:"\f116";top:-2px}.welcome-panel .welcome-comments:before{content:"\f117";top:-1px}.welcome-panel .welcome-learn-more:before{content:"\f118";top:-1px}#dashboard_right_now li a:before,#dashboard_right_now li>span:before{content:"\f159";padding:0 0 0 5px}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:"\f105"}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:"\f109"}#dashboard_right_now .comment-count a:before{content:"\f101"}#dashboard_right_now .comment-mod-count a:before{content:"\f125"}#dashboard_right_now .storage-count a:before{content:"\f104"}#dashboard_right_now .storage-count.warning a:before{content:"\f153"}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .widget-loading{padding:12px 12px 0;margin-bottom:1em!important}#dashboard_primary .inside .notice,body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form p{margin-top:0}.rssSummary{margin-top:4px}#dashboard_primary .rss-widget{border-bottom:1px solid #eee;font-size:13px;padding:8px 12px 10px}#dashboard_primary .rss-widget:last-child{border-bottom:none;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span.rss-date{margin-right:12px}#dashboard_primary .rss-widget ul li{margin-bottom:8px}#dashboard_right_now ul{margin:0;display:inline-block;width:100%}#dashboard_right_now li{width:50%;float:right;margin-bottom:10px}#dashboard_right_now .inside{padding:0}#dashboard_right_now .main{padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{float:left;position:relative;top:-5px;margin-right:5px}.mu-storage{overflow:hidden}#dashboard-widgets h3.mu-storage{margin:0 0 10px;padding:0;font-size:14px;font-weight:400}#dashboard_right_now .sub{color:#555d66;background:#f5f5f5;border-top:1px solid #eee;padding:10px 12px 6px}#dashboard_right_now .sub h3{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_quick_press .drafts li time,#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#72777c}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 0 1px 1px}#dashboard_quick_press form{margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:right}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:none}#dashboard_quick_press .drafts .view-all{float:left;margin:0 0 0 12px}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{margin:0 0 0 5px}#dashboard-widgets h3,#dashboard-widgets h4,#dashboard_quick_press .drafts h2{margin:0 12px 8px;padding:0;font-size:14px;font-weight:400;color:#23282d}#dashboard_quick_press .drafts h2{line-height:inherit}#dashboard-widgets .inside h3,#dashboard-widgets .inside h4{margin-right:0;margin-left:0}#dashboard_activity .comment-meta span.approve:before{content:"\f227";font:20px/.5 dashicons;margin-right:5px;vertical-align:middle;position:relative;top:-1px;margin-left:2px}#dashboard_activity .inside{margin:0;padding-bottom:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 0 12px;text-align:center}#dashboard_activity .no-activity p{color:#72777c;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:"\f328";font:400 120px/1 dashicons;speak:none;display:block;margin:0 0 0 5px;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}#dashboard_activity .subsubsub a .count,#dashboard_activity .subsubsub a.current .count{color:#72777c}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{margin-bottom:8px}#future-posts ul span,#published-posts ul span{display:inline-block;margin-left:5px;min-width:150px;color:#72777c}.activity-block{border-bottom:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}.activity-block:last-child{border-bottom:none}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0;margin-right:12px}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list .avatar{position:absolute;top:12px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-right:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;right:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.postbox .button-link .edit-box{display:none}.edit-box{opacity:0}.edit-box:focus,.hndle:hover .edit-box{opacity:1}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0}#dashboard-widgets .button-link,#dashboard-widgets a{text-decoration:none}#dashboard-widgets h2 a,#dashboard_browser_nag a{text-decoration:underline}#dashboard-widgets .hndle .postbox-title-action{float:left;line-height:1.2}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative;margin:0 -12px}#activity-widget #the-comment-list .comment,#activity-widget #the-comment-list .pingback{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{min-height:50px;margin:0;padding:12px}#latest-comments #the-comment-list .pingback{padding-right:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:none}#latest-comments #the-comment-list .comment-meta{line-height:1.5em;margin:0;color:#666}#latest-comments #the-comment-list .comment-meta cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#description-wrap label,#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:14px;font-weight:600;line-height:1.7em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#72777c;font-size:13px;margin-right:3px}.rss-widget cite{display:block;text-align:left;margin:0 0 1em;padding:0}.rss-widget cite:before{content:"\2014"}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-left:125px}#dashboard_browser_nag .browser-icon{margin-top:-35px}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h2{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h2{border-bottom-color:#f6e2ac;background:0 0;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag h2.hndle{border:none;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container,#wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container:after,#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}#wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}.index-php .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left}#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-left:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 0 5px 10px}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:40px;white-space:nowrap;width:20px;height:20px;padding:5px;top:5px;left:5px}.welcome-panel .welcome-panel-close:before{font-size:20px;top:5px;right:-35px}} \ No newline at end of file +#dashboard_quick_press .draft-title,#the-comment-list td.comment,.dashboard-comment-wrap{word-wrap:break-word}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:left;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:left}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:none!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}#the-comment-list td.comment p.comment-author{margin-top:0;margin-right:0}#the-comment-list p.comment-author img{float:right;margin-left:8px}#the-comment-list p.comment-author strong a{border:none}#the-comment-list td{vertical-align:top}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}#dashboard_right_now .sub,.community-events li:first-child,.community-events li~li,.community-events-footer{border-top:1px solid #eee}.welcome-panel h2{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h3{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#72777c}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:10px;left:10px;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.welcome-panel .welcome-panel-close:before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 0 3px 13px;padding:12px 36px;height:auto;line-height:1.4285714;white-space:normal}.welcome-panel-content{margin-right:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:right}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#444}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 0 1em 1em}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none;padding:0 0 8px}.welcome-panel .welcome-icon{background:0 0!important}#dashboard_right_now li a:before,#dashboard_right_now li span:before,.welcome-panel .welcome-icon:before{color:#82878c;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 10px;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:"\f119";top:-3px}.welcome-panel .welcome-add-page:before{content:"\f132";top:-1px}.welcome-panel .welcome-view-site:before{content:"\f115";top:-2px}.welcome-panel .welcome-widgets-menus:before{content:"\f116";top:-2px}.welcome-panel .welcome-comments:before{content:"\f117";top:-1px}.welcome-panel .welcome-learn-more:before{content:"\f118";top:-1px}#dashboard_right_now li a:before,#dashboard_right_now li>span:before{content:"\f159";padding:0 0 0 5px}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:"\f105"}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:"\f109"}#dashboard_right_now .comment-count a:before{content:"\f101"}#dashboard_right_now .comment-mod-count a:before{content:"\f125"}#dashboard_right_now .storage-count a:before{content:"\f104"}#dashboard_right_now .storage-count.warning a:before{content:"\f153"}.community-events-errors{margin:0}.community-events-loading{padding:10px 12px 8px}.community-events{margin-bottom:6px;padding:0 12px}.community-events .spinner{float:none;margin:0;padding-bottom:3px}.community-events [aria-hidden=true],.community-events-errors [aria-hidden=true],.community-events-errors[aria-hidden=true],.community-events-loading[aria-hidden=true],.community-events[aria-hidden=true]{display:none}.community-events .activity-block:first-child,.community-events h2{padding-top:12px;padding-bottom:10px}.community-events-form{margin:15px 0 5px}.community-events-form .regular-text{width:40%;height:28px}.community-events li.event-none{border-right:4px solid #0070AE}.community-events-form label{display:inline-block;padding-bottom:3px}.community-events .activity-block>p{margin-bottom:0;display:inline}#community-events-submit{margin-right:2px}.community-events .button-link:active,.community-events .button-link:hover{color:#00a0d2}.community-events-cancel.button.button-link{color:#0073aa;text-decoration:underline;margin-right:2px}.community-events ul{background-color:#fafafa;padding-right:0;padding-left:0;padding-bottom:0}.community-events li{margin:0;padding:8px 12px;color:#72777c}.community-events .activity-block.last{border-bottom:1px solid #eee;padding-top:0;margin-top:-1px}.community-events .event-info{display:block}.event-icon{height:18px;padding-left:10px;width:18px;display:none}.event-icon:before{color:#82878C;font-size:18px}.event-meetup .event-icon:before{content:"\f484"}.event-wordcamp .event-icon:before{content:"\f486"}.community-events .event-title{font-weight:600;display:block}.community-events .event-date,.community-events .event-time{display:block}.community-events-footer{margin-top:0;margin-bottom:0;padding:12px;color:#ddd}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date,.rssSummary{color:#72777c}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .widget-loading{padding:12px 12px 0;margin-bottom:1em!important}#dashboard_primary .inside .notice,body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form p{margin-top:0}.rssSummary{margin-top:4px}#dashboard_primary .rss-widget{font-size:13px;padding:0 12px}#dashboard_primary .rss-widget:last-child{border-bottom:none;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span.rss-date{margin-right:12px}#dashboard_primary .rss-widget ul li{padding:4px 0;margin:0}#dashboard_right_now ul{margin:0;display:inline-block;width:100%}#dashboard_right_now li{width:50%;float:right;margin-bottom:10px}#dashboard_right_now .inside{padding:0}#dashboard_right_now .main{padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{float:left;position:relative;top:-5px;margin-right:5px}.mu-storage{overflow:hidden}#dashboard-widgets h3.mu-storage{margin:0 0 10px;padding:0;font-size:14px;font-weight:400}#dashboard_right_now .sub{color:#555d66;background:#f5f5f5;padding:10px 12px 6px}#dashboard_right_now .sub h3{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_quick_press .drafts li time,#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#72777c}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 0 1px 1px}#dashboard_quick_press form{margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:right}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:none}#dashboard_quick_press .drafts .view-all{float:left;margin:0 0 0 12px}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{margin:0 0 0 5px}#dashboard-widgets h3,#dashboard-widgets h4,#dashboard_quick_press .drafts h2{margin:0 12px 8px;padding:0;font-size:14px;font-weight:400;color:#23282d}#dashboard_quick_press .drafts h2{line-height:inherit}#dashboard-widgets .inside h3,#dashboard-widgets .inside h4{margin-right:0;margin-left:0}#dashboard_activity .comment-meta span.approve:before{content:"\f227";font:20px/.5 dashicons;margin-right:5px;vertical-align:middle;position:relative;top:-1px;margin-left:2px}#dashboard_activity .inside{margin:0;padding-bottom:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 0 12px;text-align:center}#dashboard_activity .no-activity p{color:#72777c;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:"\f328";font:400 120px/1 dashicons;speak:none;display:block;margin:0 0 0 5px;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}#dashboard_activity .subsubsub a .count,#dashboard_activity .subsubsub a.current .count{color:#72777c}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{margin-bottom:8px}#future-posts ul span,#published-posts ul span{display:inline-block;margin-left:5px;min-width:150px;color:#72777c}.activity-block{border-bottom:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}.activity-block:last-child{border-bottom:none}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0;margin-right:12px}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list .avatar{position:absolute;top:12px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-right:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;right:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.postbox .button-link .edit-box{display:none}.edit-box{opacity:0}.edit-box:focus,.hndle:hover .edit-box{opacity:1}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0}#dashboard-widgets .button-link,#dashboard-widgets a{text-decoration:none}#dashboard-widgets h2 a,#dashboard_browser_nag a{text-decoration:underline}#dashboard-widgets .hndle .postbox-title-action{float:left;line-height:1.2}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative;margin:0 -12px}#activity-widget #the-comment-list .comment,#activity-widget #the-comment-list .pingback{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{min-height:50px;margin:0;padding:12px}#latest-comments #the-comment-list .pingback{padding-right:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:none}#latest-comments #the-comment-list .comment-meta{line-height:1.5em;margin:0;color:#666}#latest-comments #the-comment-list .comment-meta cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#description-wrap label,#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:13px;font-weight:600;line-height:1.4em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#72777c;font-size:13px;margin-right:3px}.rss-widget cite{display:block;text-align:left;margin:0 0 1em;padding:0}.rss-widget cite:before{content:"\2014"}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-left:125px}#dashboard_browser_nag .browser-icon{margin-top:-35px}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h2{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h2{border-bottom-color:#f6e2ac;background:0 0;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag h2.hndle{border:none;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container,#wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container:after,#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}#wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}.index-php .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left}#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-left:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 0 5px 10px}.community-events-toggle-location{height:38px}.community-events-form .regular-text{height:31px}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:40px;white-space:nowrap;width:20px;height:20px;padding:5px;top:5px;left:5px}.welcome-panel .welcome-panel-close:before{font-size:20px;top:5px;right:-35px}}@media screen and (min-width:355px){.community-events .event-info{display:table-row;float:right;max-width:59%}.event-icon,.event-icon[aria-hidden=true],.event-info-inner{display:table-cell}.community-events .event-date-time{float:left;max-width:39%}.community-events .event-date,.community-events .event-time{text-align:left}} \ No newline at end of file diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css index 98fb99378d..6a35594302 100644 --- a/wp-admin/css/dashboard.css +++ b/wp-admin/css/dashboard.css @@ -301,6 +301,145 @@ content: "\f153"; } +/* Dashboard WordPress events */ + +.community-events-errors { + margin: 0; +} + +.community-events-loading { + padding: 10px 12px 8px; +} + +.community-events { + margin-bottom: 6px; + padding: 0 12px; +} + +.community-events .spinner { + float: none; + margin: 0; + padding-bottom: 3px; +} + +.community-events-errors[aria-hidden="true"], +.community-events-errors *[aria-hidden="true"], +.community-events-loading[aria-hidden="true"], +.community-events[aria-hidden="true"], +.community-events *[aria-hidden="true"] { + display: none; +} + +.community-events .activity-block:first-child, +.community-events h2 { + padding-top: 12px; + padding-bottom: 10px; +} + +.community-events-form { + margin: 15px 0 5px; +} + +.community-events-form .regular-text { + width: 40%; + height: 28px; +} + +.community-events li.event-none { + border-left: 4px solid #0070AE; +} + +.community-events-form label { + display: inline-block; + padding-bottom: 3px; +} + +.community-events .activity-block > p { + margin-bottom: 0; + display: inline; +} + +#community-events-submit { + margin-left: 2px; +} + +.community-events .button-link:hover, +.community-events .button-link:active { + color: #00a0d2; +} + +.community-events-cancel.button.button-link { + color: #0073aa; + text-decoration: underline; + margin-left: 2px; +} + +.community-events ul { + background-color: #fafafa; + padding-left: 0; + padding-right: 0; + padding-bottom: 0; +} + +.community-events li { + margin: 0; + padding: 8px 12px; + color: #72777c; +} +.community-events li:first-child { + border-top: 1px solid #eee; +} + +.community-events li ~ li { + border-top: 1px solid #eee; +} + +.community-events .activity-block.last { + border-bottom: 1px solid #eee; + padding-top: 0; + margin-top: -1px; +} + +.community-events .event-info { + display: block; +} + +.event-icon { + height: 18px; + padding-right: 10px; + width: 18px; + display: none; /* Hide on smaller screens */ +} + +.event-icon:before { + color: #82878C; + font-size: 18px; +} +.event-meetup .event-icon:before { + content: "\f484"; +} +.event-wordcamp .event-icon:before { + content: "\f486"; +} + +.community-events .event-title { + font-weight: 600; + display: block; +} + +.community-events .event-date, +.community-events .event-time { + display: block; +} + +.community-events-footer { + margin-top: 0; + margin-bottom: 0; + padding: 12px; + border-top: 1px solid #eee; + color: #ddd; +} + /* Dashboard WordPress news */ #dashboard_primary .inside { @@ -333,9 +472,8 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_primary .rss-widget { - border-bottom: 1px solid #eee; font-size: 13px; - padding: 8px 12px 10px; + padding: 0 12px 0; } #dashboard_primary .rss-widget:last-child { @@ -357,7 +495,8 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_primary .rss-widget ul li { - margin-bottom: 8px; + padding: 4px 0; + margin: 0; } /* Dashboard right now */ @@ -874,9 +1013,9 @@ form.initial-form.quickpress-open input#title { } a.rsswidget { - font-size: 14px; + font-size: 13px; font-weight: 600; - line-height: 1.7em; + line-height: 1.4em; } .rss-widget ul li { @@ -1087,6 +1226,14 @@ a.rsswidget { width: 30px; margin: 4px 10px 5px 0; } + + .community-events-toggle-location { + height: 38px; + } + + .community-events-form .regular-text { + height: 31px; + } } /* Smartphone */ @@ -1110,3 +1257,30 @@ a.rsswidget { left: -35px; } } + +@media screen and (min-width: 355px) { + .community-events .event-info { + display: table-row; + float: left; + max-width: 59%; + } + + .event-icon, + .event-icon[aria-hidden="true"] { + display: table-cell; + } + + .event-info-inner { + display: table-cell; + } + + .community-events .event-date-time { + float: right; + max-width: 39%; + } + + .community-events .event-date, + .community-events .event-time { + text-align: right; + } +} diff --git a/wp-admin/css/dashboard.min.css b/wp-admin/css/dashboard.min.css index 93ed8529a6..86b314840f 100644 --- a/wp-admin/css/dashboard.min.css +++ b/wp-admin/css/dashboard.min.css @@ -1 +1 @@ -#dashboard_quick_press .draft-title,#the-comment-list td.comment,.dashboard-comment-wrap{word-wrap:break-word}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:right;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:right}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:none!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}#the-comment-list td.comment p.comment-author{margin-top:0;margin-left:0}#the-comment-list p.comment-author img{float:left;margin-right:8px}#the-comment-list p.comment-author strong a{border:none}#the-comment-list td{vertical-align:top}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}.welcome-panel h2{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h3{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#72777c}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:10px;right:10px;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.welcome-panel .welcome-panel-close:before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 13px 3px 0;padding:12px 36px;height:auto;line-height:1.4285714;white-space:normal}.welcome-panel-content{margin-left:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:left}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#444}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 1em 1em 0}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none;padding:0 0 8px}.welcome-panel .welcome-icon{background:0 0!important}#dashboard_right_now li a:before,#dashboard_right_now li span:before,.welcome-panel .welcome-icon:before{color:#82878c;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 10px 0 0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date,.rssSummary{color:#72777c}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:"\f119";top:-3px}.welcome-panel .welcome-add-page:before{content:"\f132";top:-1px}.welcome-panel .welcome-view-site:before{content:"\f115";top:-2px}.welcome-panel .welcome-widgets-menus:before{content:"\f116";top:-2px}.welcome-panel .welcome-comments:before{content:"\f117";top:-1px}.welcome-panel .welcome-learn-more:before{content:"\f118";top:-1px}#dashboard_right_now li a:before,#dashboard_right_now li>span:before{content:"\f159";padding:0 5px 0 0}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:"\f105"}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:"\f109"}#dashboard_right_now .comment-count a:before{content:"\f101"}#dashboard_right_now .comment-mod-count a:before{content:"\f125"}#dashboard_right_now .storage-count a:before{content:"\f104"}#dashboard_right_now .storage-count.warning a:before{content:"\f153"}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .widget-loading{padding:12px 12px 0;margin-bottom:1em!important}#dashboard_primary .inside .notice,body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form p{margin-top:0}.rssSummary{margin-top:4px}#dashboard_primary .rss-widget{border-bottom:1px solid #eee;font-size:13px;padding:8px 12px 10px}#dashboard_primary .rss-widget:last-child{border-bottom:none;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span.rss-date{margin-left:12px}#dashboard_primary .rss-widget ul li{margin-bottom:8px}#dashboard_right_now ul{margin:0;display:inline-block;width:100%}#dashboard_right_now li{width:50%;float:left;margin-bottom:10px}#dashboard_right_now .inside{padding:0}#dashboard_right_now .main{padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{float:right;position:relative;top:-5px;margin-left:5px}.mu-storage{overflow:hidden}#dashboard-widgets h3.mu-storage{margin:0 0 10px;padding:0;font-size:14px;font-weight:400}#dashboard_right_now .sub{color:#555d66;background:#f5f5f5;border-top:1px solid #eee;padding:10px 12px 6px}#dashboard_right_now .sub h3{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_quick_press .drafts li time,#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#72777c}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 1px 1px 0}#dashboard_quick_press form{margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:left}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:none}#dashboard_quick_press .drafts .view-all{float:right;margin:0 12px 0 0}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{margin:0 5px 0 0}#dashboard-widgets h3,#dashboard-widgets h4,#dashboard_quick_press .drafts h2{margin:0 12px 8px;padding:0;font-size:14px;font-weight:400;color:#23282d}#dashboard_quick_press .drafts h2{line-height:inherit}#dashboard-widgets .inside h3,#dashboard-widgets .inside h4{margin-left:0;margin-right:0}#dashboard_activity .comment-meta span.approve:before{content:"\f227";font:20px/.5 dashicons;margin-left:5px;vertical-align:middle;position:relative;top:-1px;margin-right:2px}#dashboard_activity .inside{margin:0;padding-bottom:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 0 12px;text-align:center}#dashboard_activity .no-activity p{color:#72777c;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:"\f328";font:400 120px/1 dashicons;speak:none;display:block;margin:0 5px 0 0;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}#dashboard_activity .subsubsub a .count,#dashboard_activity .subsubsub a.current .count{color:#72777c}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{margin-bottom:8px}#future-posts ul span,#published-posts ul span{display:inline-block;margin-right:5px;min-width:150px;color:#72777c}.activity-block{border-bottom:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}.activity-block:last-child{border-bottom:none}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0;margin-left:12px}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list .avatar{position:absolute;top:12px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-left:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;left:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.postbox .button-link .edit-box{display:none}.edit-box{opacity:0}.edit-box:focus,.hndle:hover .edit-box{opacity:1}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0}#dashboard-widgets .button-link,#dashboard-widgets a{text-decoration:none}#dashboard-widgets h2 a,#dashboard_browser_nag a{text-decoration:underline}#dashboard-widgets .hndle .postbox-title-action{float:right;line-height:1.2}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative;margin:0 -12px}#activity-widget #the-comment-list .comment,#activity-widget #the-comment-list .pingback{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{min-height:50px;margin:0;padding:12px}#latest-comments #the-comment-list .pingback{padding-left:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:none}#latest-comments #the-comment-list .comment-meta{line-height:1.5em;margin:0;color:#666}#latest-comments #the-comment-list .comment-meta cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#description-wrap label,#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:14px;font-weight:600;line-height:1.7em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#72777c;font-size:13px;margin-left:3px}.rss-widget cite{display:block;text-align:right;margin:0 0 1em;padding:0}.rss-widget cite:before{content:"\2014"}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:125px}#dashboard_browser_nag .browser-icon{margin-top:-35px}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h2{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h2{border-bottom-color:#f6e2ac;background:0 0;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag h2.hndle{border:none;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container,#wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container:after,#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}#wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}.index-php .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right}#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-right:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 10px 5px 0}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:40px;white-space:nowrap;width:20px;height:20px;padding:5px;top:5px;right:5px}.welcome-panel .welcome-panel-close:before{font-size:20px;top:5px;left:-35px}} \ No newline at end of file +#dashboard_quick_press .draft-title,#the-comment-list td.comment,.dashboard-comment-wrap{word-wrap:break-word}#wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody-content #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets.columns-2 #postbox-container-2,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-2 #postbox-container-4{float:right;width:50.5%}#wpbody-content #dashboard-widgets.columns-3 .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets.columns-3 #postbox-container-3,#wpbody-content #dashboard-widgets.columns-3 #postbox-container-4{float:right}#dashboard-widgets .postbox-container,#wpbody-content #dashboard-widgets.columns-4 .postbox-container{width:25%}#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container{border:none!important}.ie8 #wpbody-content #dashboard-widgets .postbox-container{width:49.5%}.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,.ie8 #wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}.ie8 #dashboard-widgets #postbox-container-3 .empty-container,.ie8 #dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets-wrap{overflow:hidden;margin:0 -8px}#dashboard-widgets .postbox .inside{margin-bottom:0}#dashboard-widgets .meta-box-sortables{margin:0 8px;min-height:100px}#the-comment-list td.comment p.comment-author{margin-top:0;margin-left:0}#the-comment-list p.comment-author img{float:left;margin-right:8px}#the-comment-list p.comment-author strong a{border:none}#the-comment-list td{vertical-align:top}#the-comment-list td.comment img{max-width:100%}.welcome-panel{position:relative;overflow:auto;margin:16px 0;padding:23px 10px 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px;line-height:2.1em}#dashboard_right_now .sub,.community-events li:first-child,.community-events li~li,.community-events-footer{border-top:1px solid #eee}.welcome-panel h2{margin:0;font-size:21px;font-weight:400;line-height:1.2}.welcome-panel h3{margin:1.33em 0 0;font-size:16px}.welcome-panel li{font-size:14px}.welcome-panel p{color:#72777c}.welcome-panel a{text-decoration:none}.welcome-panel .about-description{font-size:16px;margin:0}.welcome-panel .welcome-panel-close{position:absolute;top:10px;right:10px;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.welcome-panel .welcome-panel-close:before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wp-core-ui .welcome-panel .button.button-hero{margin:15px 13px 3px 0;padding:12px 36px;height:auto;line-height:1.4285714;white-space:normal}.welcome-panel-content{margin-left:13px;max-width:1500px}.welcome-panel .welcome-panel-column-container{clear:both;position:relative}.welcome-panel .welcome-panel-column{width:32%;min-width:200px;float:left}.ie8 .welcome-panel .welcome-panel-column{min-width:230px}.welcome-panel .welcome-panel-column:first-child{width:36%}.welcome-panel-column p.hide-if-no-customize{margin-top:10px}.welcome-panel-column p{margin-top:7px;color:#444}.welcome-panel .welcome-widgets-menus{line-height:16px}.welcome-panel .welcome-panel-column ul{margin:.8em 1em 1em 0}.welcome-panel .welcome-panel-column li{line-height:16px;list-style-type:none;padding:0 0 8px}.welcome-panel .welcome-icon{background:0 0!important}#dashboard_right_now li a:before,#dashboard_right_now li span:before,.welcome-panel .welcome-icon:before{color:#82878c;font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 10px 0 0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}.welcome-panel .welcome-edit-page:before,.welcome-panel .welcome-write-blog:before{content:"\f119";top:-3px}.welcome-panel .welcome-add-page:before{content:"\f132";top:-1px}.welcome-panel .welcome-view-site:before{content:"\f115";top:-2px}.welcome-panel .welcome-widgets-menus:before{content:"\f116";top:-2px}.welcome-panel .welcome-comments:before{content:"\f117";top:-1px}.welcome-panel .welcome-learn-more:before{content:"\f118";top:-1px}#dashboard_right_now li a:before,#dashboard_right_now li>span:before{content:"\f159";padding:0 5px 0 0}#dashboard_right_now .page-count a:before,#dashboard_right_now .page-count span:before{content:"\f105"}#dashboard_right_now .post-count a:before,#dashboard_right_now .post-count span:before{content:"\f109"}#dashboard_right_now .comment-count a:before{content:"\f101"}#dashboard_right_now .comment-mod-count a:before{content:"\f125"}#dashboard_right_now .storage-count a:before{content:"\f104"}#dashboard_right_now .storage-count.warning a:before{content:"\f153"}.community-events-errors{margin:0}.community-events-loading{padding:10px 12px 8px}.community-events{margin-bottom:6px;padding:0 12px}.community-events .spinner{float:none;margin:0;padding-bottom:3px}.community-events [aria-hidden=true],.community-events-errors [aria-hidden=true],.community-events-errors[aria-hidden=true],.community-events-loading[aria-hidden=true],.community-events[aria-hidden=true]{display:none}.community-events .activity-block:first-child,.community-events h2{padding-top:12px;padding-bottom:10px}.community-events-form{margin:15px 0 5px}.community-events-form .regular-text{width:40%;height:28px}.community-events li.event-none{border-left:4px solid #0070AE}.community-events-form label{display:inline-block;padding-bottom:3px}.community-events .activity-block>p{margin-bottom:0;display:inline}#community-events-submit{margin-left:2px}.community-events .button-link:active,.community-events .button-link:hover{color:#00a0d2}.community-events-cancel.button.button-link{color:#0073aa;text-decoration:underline;margin-left:2px}.community-events ul{background-color:#fafafa;padding-left:0;padding-right:0;padding-bottom:0}.community-events li{margin:0;padding:8px 12px;color:#72777c}.community-events .activity-block.last{border-bottom:1px solid #eee;padding-top:0;margin-top:-1px}.community-events .event-info{display:block}.event-icon{height:18px;padding-right:10px;width:18px;display:none}.event-icon:before{color:#82878C;font-size:18px}.event-meetup .event-icon:before{content:"\f484"}.event-wordcamp .event-icon:before{content:"\f486"}.community-events .event-title{font-weight:600;display:block}.community-events .event-date,.community-events .event-time{display:block}.community-events-footer{margin-top:0;margin-bottom:0;padding:12px;color:#ddd}#dashboard_primary .rss-widget span,#dashboard_primary .rss-widget span.rss-date,.rssSummary{color:#72777c}#dashboard_primary .inside{margin:0;padding:0}#dashboard_primary .widget-loading{padding:12px 12px 0;margin-bottom:1em!important}#dashboard_primary .inside .notice,body #dashboard-widgets .postbox form .submit{margin:0}.dashboard-widget-control-form p{margin-top:0}.rssSummary{margin-top:4px}#dashboard_primary .rss-widget{font-size:13px;padding:0 12px}#dashboard_primary .rss-widget:last-child{border-bottom:none;padding-bottom:8px}#dashboard_primary .rss-widget a{font-weight:400}#dashboard_primary .rss-widget span.rss-date{margin-left:12px}#dashboard_primary .rss-widget ul li{padding:4px 0;margin:0}#dashboard_right_now ul{margin:0;display:inline-block;width:100%}#dashboard_right_now li{width:50%;float:left;margin-bottom:10px}#dashboard_right_now .inside{padding:0}#dashboard_right_now .main{padding:0 12px 11px}#dashboard_right_now .main p{margin:0}#dashboard_right_now #wp-version-message .button{float:right;position:relative;top:-5px;margin-left:5px}.mu-storage{overflow:hidden}#dashboard-widgets h3.mu-storage{margin:0 0 10px;padding:0;font-size:14px;font-weight:400}#dashboard_right_now .sub{color:#555d66;background:#f5f5f5;padding:10px 12px 6px}#dashboard_right_now .sub h3{color:#555}#dashboard_right_now .sub p{margin:0 0 1em}#dashboard_right_now .warning a:before,#dashboard_right_now .warning span:before{color:#d54e21}#dashboard_quick_press .drafts li time,#title-wrap #title-prompt-text,.textarea-wrap #content-prompt-text{color:#72777c}#dashboard_quick_press .inside{margin:0;padding:0}#dashboard_quick_press div.updated{margin-bottom:10px;border:1px solid #eee;border-width:1px 1px 1px 0}#dashboard_quick_press form{margin:12px}#dashboard_quick_press .drafts,#dashboard_quick_press .easy-blogging{padding:10px 0 0}input#save-post{float:left}form.initial-form.quickpress-open label.prompt{font-style:normal}form.initial-form.quickpress-open input#title{height:auto}#dashboard_quick_press input,#dashboard_quick_press textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}#dashboard_quick_press textarea{resize:vertical}#description-wrap{margin-top:12px}.input-text-wrap,.textarea-wrap{position:relative}.input-text-wrap .prompt,.textarea-wrap .prompt{position:absolute}.textarea-wrap #content-prompt-text{font-size:1.1em;padding:7px 8px}.textarea-wrap textarea#content{margin:0 0 8px;padding:6px 7px}#quick-press textarea#content{min-height:90px;max-height:1300px;resize:none}.js #dashboard_quick_press .drafts{border-top:1px solid #eee}#dashboard_quick_press .drafts abbr{border:none}#dashboard_quick_press .drafts .view-all{float:right;margin:0 12px 0 0}#dashboard_primary a.rsswidget{font-weight:400}#dashboard_quick_press .drafts ul{margin:0 12px}#dashboard_quick_press .drafts li{margin-bottom:1em}#dashboard_quick_press .drafts p{margin:0;word-wrap:break-word}#dashboard_quick_press .draft-title a,#dashboard_quick_press .draft-title time{margin:0 5px 0 0}#dashboard-widgets h3,#dashboard-widgets h4,#dashboard_quick_press .drafts h2{margin:0 12px 8px;padding:0;font-size:14px;font-weight:400;color:#23282d}#dashboard_quick_press .drafts h2{line-height:inherit}#dashboard-widgets .inside h3,#dashboard-widgets .inside h4{margin-left:0;margin-right:0}#dashboard_activity .comment-meta span.approve:before{content:"\f227";font:20px/.5 dashicons;margin-left:5px;vertical-align:middle;position:relative;top:-1px;margin-right:2px}#dashboard_activity .inside{margin:0;padding-bottom:0}#dashboard_activity .no-activity{overflow:hidden;padding:0 0 12px;text-align:center}#dashboard_activity .no-activity p{color:#72777c;font-size:16px}#dashboard_activity .no-activity .smiley{margin-top:0}#dashboard_activity .no-activity .smiley:before{content:"\f328";font:400 120px/1 dashicons;speak:none;display:block;margin:0 5px 0 0;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;text-decoration:none!important}#dashboard_activity .subsubsub{float:none;border-top:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}#dashboard_activity .subsubsub a .count,#dashboard_activity .subsubsub a.current .count{color:#72777c}#future-posts ul,#published-posts ul{clear:both;margin-bottom:0}#future-posts li,#published-posts li{margin-bottom:8px}#future-posts ul span,#published-posts ul span{display:inline-block;margin-right:5px;min-width:150px;color:#72777c}.activity-block{border-bottom:1px solid #eee;margin:0 -12px;padding:8px 12px 4px}.activity-block:last-child{border-bottom:none}.activity-block .subsubsub li{color:#ddd}#activity-widget #the-comment-list div.undo,#activity-widget #the-comment-list tr.undo{background:0 0;padding:6px 0;margin-left:12px}#activity-widget #the-comment-list .comment-item{background:#fafafa;padding:12px;position:relative}#activity-widget #the-comment-list .avatar{position:absolute;top:12px}#activity-widget #the-comment-list .dashboard-comment-wrap{padding-left:63px}#activity-widget #the-comment-list .dashboard-comment-wrap blockquote{margin:1em 0}#activity-widget #the-comment-list .comment-item p.row-actions{margin:4px 0 0}#activity-widget #the-comment-list .comment-item:first-child{border-top:1px solid #eee}#activity-widget #the-comment-list .unapproved{background-color:#fef7f1}#activity-widget #the-comment-list .unapproved:before{content:"";display:block;position:absolute;left:0;top:0;bottom:0;background:#d54e21;width:4px}#activity-widget #the-comment-list .spam-undo-inside .avatar,#activity-widget #the-comment-list .trash-undo-inside .avatar{position:relative;top:0}#dashboard-widgets #dashboard_browser_nag.postbox .inside{margin:10px}.postbox .button-link .edit-box{display:none}.edit-box{opacity:0}.edit-box:focus,.hndle:hover .edit-box{opacity:1}#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:100%}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0}#dashboard-widgets .button-link,#dashboard-widgets a{text-decoration:none}#dashboard-widgets h2 a,#dashboard_browser_nag a{text-decoration:underline}#dashboard-widgets .hndle .postbox-title-action{float:right;line-height:1.2}#dashboard_plugins h5{font-size:14px}#latest-comments #the-comment-list{position:relative;margin:0 -12px}#activity-widget #the-comment-list .comment,#activity-widget #the-comment-list .pingback{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.06);box-shadow:inset 0 1px 0 rgba(0,0,0,.06)}#activity-widget .comments #the-comment-list .alt{background-color:transparent}#activity-widget #latest-comments #the-comment-list .comment-item{min-height:50px;margin:0;padding:12px}#latest-comments #the-comment-list .pingback{padding-left:12px!important}#latest-comments #the-comment-list .comment-item:first-child{border-top:none}#latest-comments #the-comment-list .comment-meta{line-height:1.5em;margin:0;color:#666}#latest-comments #the-comment-list .comment-meta cite{font-style:normal;font-weight:400}#latest-comments #the-comment-list .comment-item blockquote,#latest-comments #the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline}#latest-comments #the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:13px}#description-wrap label,#title-wrap label{cursor:text}#title-wrap #title{padding:2px 6px;font-size:1.3em;outline:0}#title-wrap #title-prompt-text{font-size:1.1em;padding:5px 8px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:13px;font-weight:600;line-height:1.4em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#72777c;font-size:13px;margin-left:3px}.rss-widget cite{display:block;text-align:right;margin:0 0 1em;padding:0}.rss-widget cite:before{content:"\2014"}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:600}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:125px}#dashboard_browser_nag .browser-icon{margin-top:-35px}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag.postbox.browser-insecure h2{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h2{border-bottom-color:#f6e2ac;background:0 0;color:#fff;-webkit-box-shadow:none;box-shadow:none}#dashboard_browser_nag h2.hndle{border:none;font-weight:600;font-size:20px;padding-top:10px}.postbox#dashboard_browser_nag p a.dismiss{font-size:14px}.postbox#dashboard_browser_nag a,.postbox#dashboard_browser_nag p,.postbox#dashboard_browser_nag p.browser-update-nag{font-size:16px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}}@media only screen and (min-width:800px) and (max-width:1499px){#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container,#wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container:after,#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}#wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}.index-php .columns-prefs,.index-php .screen-layout{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media only screen and (min-width:1500px) and (max-width:1800px){#wpbody-content #dashboard-widgets .postbox-container{width:33.5%}#wpbody-content #dashboard-widgets #postbox-container-1{width:33%}#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right}#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}#dashboard-widgets #postbox-container-4 .empty-container:after{display:none}.metabox-holder .postbox-container .empty-container:after{display:block}}@media screen and (max-width:870px){.welcome-panel .welcome-panel-column,.welcome-panel .welcome-panel-column:first-child{display:block;float:none;width:100%}.welcome-panel .welcome-panel-column li{display:inline-block;margin-right:13px}.welcome-panel .welcome-panel-column ul{margin:.4em 0 0}}@media screen and (max-width:782px){#dashboard_recent_comments #the-comment-list .comment-item .avatar{height:30px;width:30px;margin:4px 10px 5px 0}.community-events-toggle-location{height:38px}.community-events-form .regular-text{height:31px}}@media screen and (max-width:600px){.welcome-panel .welcome-panel-close{overflow:hidden;text-indent:40px;white-space:nowrap;width:20px;height:20px;padding:5px;top:5px;right:5px}.welcome-panel .welcome-panel-close:before{font-size:20px;top:5px;left:-35px}}@media screen and (min-width:355px){.community-events .event-info{display:table-row;float:left;max-width:59%}.event-icon,.event-icon[aria-hidden=true],.event-info-inner{display:table-cell}.community-events .event-date-time{float:right;max-width:39%}.community-events .event-date,.community-events .event-time{text-align:right}} \ No newline at end of file diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 3342cad375..029e20e62b 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -296,6 +296,40 @@ function wp_ajax_autocomplete_user() { wp_die( wp_json_encode( $return ) ); } +/** + * Handles AJAX requests for community events + * + * @since 4.8.0 + */ +function wp_ajax_get_community_events() { + require_once( ABSPATH . 'wp-admin/includes/class-wp-community-events.php' ); + + check_ajax_referer( 'community_events' ); + + $search = isset( $_POST['location'] ) ? wp_unslash( $_POST['location'] ) : ''; + $timezone = isset( $_POST['timezone'] ) ? wp_unslash( $_POST['timezone'] ) : ''; + $user_id = get_current_user_id(); + $saved_location = get_user_option( 'community-events-location', $user_id ); + $events_client = new WP_Community_Events( $user_id, $saved_location ); + $events = $events_client->get_events( $search, $timezone ); + + if ( is_wp_error( $events ) ) { + wp_send_json_error( array( + 'error' => $events->get_error_message(), + ) ); + } else { + if ( isset( $events['location'] ) ) { + // Send only the data that the client will use. + $events['location'] = $events['location']['description']; + + // Store the location network-wide, so the user doesn't have to set it on each site. + update_user_option( $user_id, 'community-events-location', $events['location'], true ); + } + + wp_send_json_success( $events ); + } +} + /** * Ajax handler for dashboard widgets. * diff --git a/wp-admin/includes/class-wp-community-events.php b/wp-admin/includes/class-wp-community-events.php new file mode 100644 index 0000000000..2b76bd6bc3 --- /dev/null +++ b/wp-admin/includes/class-wp-community-events.php @@ -0,0 +1,419 @@ +user_id = absint( $user_id ); + $this->user_location = $user_location; + } + + /** + * Gets data about events near a particular location. + * + * Cached events will be immediately returned if the `user_location` property + * is set for the current user, and cached events exist for that location. + * + * Otherwise, this method sends a request to the w.org Events API with location + * data. The API will send back a recognized location based on the data, along + * with nearby events. + * + * @since 4.8.0 + * + * @param string $location_search Optional city name to help determine the location. + * e.g., "Seattle". Default empty string. + * @param string $timezone Optional timezone to help determine the location. + * Default empty string. + * @return array|WP_Error A WP_Error on failure; an array with location and events on + * success. + */ + public function get_events( $location_search = '', $timezone = '' ) { + $cached_events = $this->get_cached_events(); + + if ( ! $location_search && $cached_events ) { + return $cached_events; + } + + $request_url = $this->get_request_url( $location_search, $timezone ); + $response = wp_remote_get( $request_url ); + $response_code = wp_remote_retrieve_response_code( $response ); + $response_body = json_decode( wp_remote_retrieve_body( $response ), true ); + $response_error = null; + $debugging_info = compact( 'request_url', 'response_code', 'response_body' ); + + if ( is_wp_error( $response ) ) { + $response_error = $response; + } elseif ( 200 !== $response_code ) { + $response_error = new WP_Error( + 'api-error', + /* translators: %s is a numeric HTTP status code; e.g., 400, 403, 500, 504, etc. */ + sprintf( __( 'Invalid API response code (%d)' ), $response_code ) + ); + } elseif ( ! isset( $response_body['location'], $response_body['events'] ) ) { + $response_error = new WP_Error( + 'api-invalid-response', + isset( $response_body['error'] ) ? $response_body['error'] : __( 'Unknown API error.' ) + ); + } + + if ( is_wp_error( $response_error ) ) { + $this->maybe_log_events_response( $response_error->get_error_message(), $debugging_info ); + + return $response_error; + } else { + $expiration = false; + + if ( isset( $response_body['ttl'] ) ) { + $expiration = $response_body['ttl']; + unset( $response_body['ttl'] ); + } + + $this->cache_events( $response_body, $expiration ); + + $response_body = $this->trim_events( $response_body ); + $response_body = $this->format_event_data_time( $response_body ); + + // Avoid bloating the log with all the event data, but keep the count. + $debugging_info['response_body']['events'] = count( $debugging_info['response_body']['events'] ) . ' events trimmed.'; + + $this->maybe_log_events_response( 'Valid response received', $debugging_info ); + + return $response_body; + } + } + + /** + * Builds a URL for requests to the w.org Events API. + * + * @access protected + * @since 4.8.0 + * + * @param string $search City search string. Default empty string. + * @param string $timezone Timezone string. Default empty string. + * @return string The request URL. + */ + protected function get_request_url( $search = '', $timezone = '' ) { + $api_url = 'https://api.wordpress.org/events/1.0/'; + $args = array( 'number' => 5 ); // Get more than three in case some get trimmed out. + + /* + * Send the minimal set of necessary arguments, in order to increase the + * chances of a cache-hit on the API side. + */ + if ( empty( $search ) && isset( $this->user_location['latitude'], $this->user_location['longitude'] ) ) { + $args['latitude'] = $this->user_location['latitude']; + $args['longitude'] = $this->user_location['longitude']; + } else { + $args['locale'] = get_user_locale( $this->user_id ); + + if ( $timezone ) { + $args['timezone'] = $timezone; + } + + if ( $search ) { + $args['location'] = $search; + } else { + /* + * Protect the user's privacy by anonymizing their IP before sending + * it to w.org, and only send it when necessary. + * + * The w.org API endpoint only uses the IP address when a location + * query is not provided, so we can safely avoid sending it when + * there is a query. + */ + $args['ip'] = $this->maybe_anonymize_ip_address( $this->get_unsafe_client_ip() ); + } + } + + return add_query_arg( $args, $api_url ); + } + + /** + * Determines the user's actual IP address, if possible. + * + * $_SERVER['REMOTE_ADDR'] cannot be used in all cases, such as when the user + * is making their request through a proxy, or when the web server is behind + * a proxy. In those cases, $_SERVER['REMOTE_ADDR'] is set to the proxy address rather + * than the user's actual address. + * + * Modified from http://stackoverflow.com/a/2031935/450127, MIT license. + * + * SECURITY WARNING: This function is _NOT_ intended to be used in + * circumstances where the authenticity of the IP address matters. This does + * _NOT_ guarantee that the returned address is valid or accurate, and it can + * be easily spoofed. + * + * @access protected + * @since 4.8.0 + * + * @return false|string false on failure, the string address on success. + */ + protected function get_unsafe_client_ip() { + $client_ip = false; + + // In order of preference, with the best ones for this purpose first. + $address_headers = array( + 'HTTP_CLIENT_IP', + 'HTTP_X_FORWARDED_FOR', + 'HTTP_X_FORWARDED', + 'HTTP_X_CLUSTER_CLIENT_IP', + 'HTTP_FORWARDED_FOR', + 'HTTP_FORWARDED', + 'REMOTE_ADDR', + ); + + foreach ( $address_headers as $header ) { + if ( array_key_exists( $header, $_SERVER ) ) { + /* + * HTTP_X_FORWARDED_FOR can contain a chain of comma-separated + * addresses. The first one is the original client. It can't be + * trusted for authenticity, but we don't need to for this purpose. + */ + $address_chain = explode( ',', $_SERVER[ $header ] ); + $client_ip = trim( $address_chain[0] ); + + break; + } + } + + return $client_ip; + } + + /** + * Attempts to partially anonymize an IP address by converting it to a network ID. + * + * Geolocating the network ID usually returns a similar location as the + * actual IP, but provides some privacy for the user. + * + * Modified from https://github.com/geertw/php-ip-anonymizer, MIT license. + * + * @access protected + * @since 4.8.0 + * + * @param string $address The IP address that should be anonymized. + * @return bool|string The anonymized address on success; the given address + * or false on failure. + */ + protected function maybe_anonymize_ip_address( $address ) { + // These functions are not available on Windows until PHP 5.3. + if ( ! function_exists( 'inet_pton' ) || ! function_exists( 'inet_ntop' ) ) { + return $address; + } + + if ( 4 === strlen( inet_pton( $address ) ) ) { + $netmask = '255.255.255.0'; // ipv4. + } else { + $netmask = 'ffff:ffff:ffff:ffff:0000:0000:0000:0000'; // ipv6. + } + + return inet_ntop( inet_pton( $address ) & inet_pton( $netmask ) ); + } + + /** + * Generates a transient key based on user location. + * + * This could be reduced to a one-liner in the calling functions, but it's + * intentionally a separate function because it's called from multiple + * functions, and having it abstracted keeps the logic consistent and DRY, + * which is less prone to errors. + * + * @access protected + * @since 4.8.0 + * + * @param array $location Should contain 'latitude' and 'longitude' indexes. + * @return bool|string false on failure, or a string on success. + */ + protected function get_events_transient_key( $location ) { + $key = false; + + if ( isset( $location['latitude'], $location['longitude'] ) ) { + $key = 'community-events-' . md5( $location['latitude'] . $location['longitude'] ); + } + + return $key; + } + + /** + * Caches an array of events data from the Events API. + * + * @access protected + * @since 4.8.0 + * + * @param array $events Response body from the API request. + * @param int|bool $expiration Optional. Amount of time to cache the events. Defaults to false. + * @return bool true if events were cached; false if not. + */ + protected function cache_events( $events, $expiration = false ) { + $set = false; + $transient_key = $this->get_events_transient_key( $events['location'] ); + $cache_expiration = $expiration ? absint( $expiration ) : HOUR_IN_SECONDS * 12; + + if ( $transient_key ) { + $set = set_site_transient( $transient_key, $events, $cache_expiration ); + } + + return $set; + } + + /** + * Gets cached events. + * + * @since 4.8.0 + * + * @return false|array false on failure; an array containing `location` + * and `events` items on success. + */ + public function get_cached_events() { + $cached_response = get_site_transient( $this->get_events_transient_key( $this->user_location ) ); + $cached_response = $this->trim_events( $cached_response ); + + return $this->format_event_data_time( $cached_response ); + } + + /** + * Adds formatted date and time items for each event in an API response. + * + * This has to be called after the data is pulled from the cache, because + * the cached events are shared by all users. If it was called before storing + * the cache, then all users would see the events in the localized data/time + * of the user who triggered the cache refresh, rather than their own. + * + * @access protected + * @since 4.8.0 + * + * @param array $response_body The response which contains the events. + * @return array The response with dates and times formatted. + */ + protected function format_event_data_time( $response_body ) { + if ( isset( $response_body['events'] ) ) { + foreach ( $response_body['events'] as $key => $event ) { + $timestamp = strtotime( $event['date'] ); + + /* + * The `date_format` option is not used because it's important + * in this context to keep the day of the week in the formatted date, + * so that users can tell at a glance if the event is on a day they + * are available, without having to open the link. + */ + /* translators: Date format for upcoming events on the dashboard. Include the day of the week. See https://secure.php.net/date. */ + $response_body['events'][ $key ]['formatted_date'] = date_i18n( __( 'l, M j, Y' ), $timestamp ); + $response_body['events'][ $key ]['formatted_time'] = date_i18n( get_option( 'time_format' ), $timestamp ); + } + } + + return $response_body; + } + + /** + * Discards expired events, and reduces the remaining list. + * + * @access protected + * @since 4.8.0 + * + * @param array $response_body The response body which contains the events. + * @return array The response body with events trimmed. + */ + protected function trim_events( $response_body ) { + if ( isset( $response_body['events'] ) ) { + $current_timestamp = current_time('timestamp' ); + + foreach ( $response_body['events'] as $key => $event ) { + // Skip WordCamps, because they might be multi-day events. + if ( 'meetup' !== $event['type'] ) { + continue; + } + + $event_timestamp = strtotime( $event['date'] ); + + if ( $current_timestamp > $event_timestamp && ( $current_timestamp - $event_timestamp ) > DAY_IN_SECONDS ) { + unset( $response_body['events'][ $key ] ); + } + } + + $response_body['events'] = array_slice( $response_body['events'], 0, 3 ); + } + + return $response_body; + } + + /** + * Logs responses to Events API requests. + * + * All responses are logged when debugging, even if they're not WP_Errors. + * Debugging info is still needed for "successful" responses, because + * the API might have returned a different location than the one the user + * intended to receive. In those cases, knowing the exact `request_url` is + * critical. + * + * Errors are logged instead of being triggered, to avoid breaking the JSON + * response when called from AJAX handlers and `display_errors` is enabled. + * + * @access protected + * @since 4.8.0 + * + * @param string $message A description of what occurred. + * @param array $debugging_info Details that provide more context for the + * log entry. + */ + protected function maybe_log_events_response( $message, $details ) { + if ( ! WP_DEBUG_LOG ) { + return; + } + + error_log( sprintf( + '%s: %s. Details: %s', + __METHOD__, + trim( $message, '.' ), + wp_json_encode( $details ) + ) ); + } +} diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index be0b201c9f..de0eef3447 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -52,8 +52,8 @@ function wp_dashboard_setup() { wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); } - // WordPress News - wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress News' ), 'wp_dashboard_primary' ); + // WordPress Events and News + wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress Events and News' ), 'wp_dashboard_events_news' ); if ( is_network_admin() ) { @@ -129,6 +129,46 @@ function wp_dashboard_setup() { do_action( 'do_meta_boxes', $screen->id, 'side', '' ); } +/** + * Gets the community events data that needs to be passed to dashboard.js. + * + * @since 4.8.0 + * + * @return array The script data. + */ +function wp_get_community_events_script_data() { + require_once( ABSPATH . 'wp-admin/includes/class-wp-community-events.php' ); + + $user_id = get_current_user_id(); + $user_location = get_user_option( 'community-events-location', $user_id ); + $events_client = new WP_Community_Events( $user_id, $user_location ); + + $script_data = array( + 'nonce' => wp_create_nonce( 'community_events' ), + 'cache' => $events_client->get_cached_events(), + + 'l10n' => array( + 'enter_closest_city' => __( 'Enter your closest city to find nearby events.' ), + 'error_occurred_please_try_again' => __( 'An error occured. Please try again.' ), + + /* + * These specific examples were chosen to highlight the fact that a + * state is not needed, even for cities whose name is not unique. + * It would be too cumbersome to include that in the instructions + * to the user, so it's left as an implication. + */ + /* translators: %s is the name of the city we couldn't locate. Replace the examples with cities in your locale, but test that they match the expected location before including them. Use endonyms (native locale names) whenever possible. */ + 'could_not_locate_city' => __( "We couldn't locate %s. Please try another nearby city. For example: Kansas City; Springfield; Portland." ), + + // This one is only used with wp.a11y.speak(), so it can/should be more brief. + /* translators: %s is the name of a city. */ + 'city_updated' => __( 'City updated. Listing events near %s.' ), + ) + ); + + return $script_data; +} + /** * Adds a new dashboard widget. * @@ -1069,10 +1109,173 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { wp_widget_rss_form( $widget_options[$widget_id], $form_inputs ); } + +/** + * Renders the Events and News dashboard widget. + * + * @since 4.8.0 + */ +function wp_dashboard_events_news() { + wp_print_community_events_markup(); + + ?> + +
+ + + + + + + + + + + + + + + + + + + + + + + apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ), 'items' => 1, - 'show_summary' => 1, + 'show_summary' => 0, 'show_author' => 0, - 'show_date' => 1, + 'show_date' => 0, ), 'planet' => array( @@ -1152,20 +1355,6 @@ function wp_dashboard_primary() { ) ); - if ( ( ! wp_disallow_file_mods( 'dashboard_widget' ) ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { - $feeds['plugins'] = array( - 'link' => '', - 'url' => array( - 'popular' => 'http://wordpress.org/plugins/rss/browse/popular/', - ), - 'title' => '', - 'items' => 1, - 'show_summary' => 0, - 'show_author' => 0, - 'show_date' => 0, - ); - } - wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_primary_output', $feeds ); } @@ -1173,6 +1362,7 @@ function wp_dashboard_primary() { * Display the WordPress news feeds. * * @since 3.8.0 + * @since 4.8.0 Removed popular plugins feed. * * @param string $widget_id Widget ID. * @param array $feeds Array of RSS feeds. @@ -1181,94 +1371,11 @@ function wp_dashboard_primary_output( $widget_id, $feeds ) { foreach ( $feeds as $type => $args ) { $args['type'] = $type; echo ' "; } } -/** - * Display plugins text for the WordPress news widget. - * - * @since 2.5.0 - * - * @param string $rss The RSS feed URL. - * @param array $args Array of arguments for this RSS feed. - */ -function wp_dashboard_plugins_output( $rss, $args = array() ) { - // Plugin feeds plus link to install them - $popular = fetch_feed( $args['url']['popular'] ); - - if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { - $plugin_slugs = array_keys( get_plugins() ); - set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS ); - } - - echo '