Skip to content

Commit 4b29441

Browse files
committed
Merge branch '1.8.x'
2 parents 6a10ba8 + fad5fc8 commit 4b29441

52 files changed

Lines changed: 22000 additions & 33865 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ dist/
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7+
.env
78

89
/vendor/

Gruntfile.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

assets/css/admin-bar-custom.css

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@
8181
display: block;
8282
}
8383

84-
#wpadminbar .quicklinks > ul > li > a {
85-
padding: 0 8px 0 7px;
86-
}
87-
8884
#wpadminbar .menupop .ab-sub-wrapper,
8985
#wpadminbar .shortlink-input {
9086
margin: 0;
@@ -170,7 +166,6 @@
170166
position: relative;
171167
float: left;
172168
speak: none;
173-
padding: 4px 0;
174169
-webkit-font-smoothing: antialiased;
175170
-moz-osx-font-smoothing: grayscale;
176171
background-image: none !important;
@@ -275,14 +270,6 @@
275270
min-width: 198px;
276271
}
277272

278-
#wp-admin-bar-my-account > .ab-item:before {
279-
content: "\f110";
280-
top: 2px;
281-
float: right;
282-
margin-left: 6px;
283-
margin-right: 0;
284-
}
285-
286273
#wp-admin-bar-my-account.with-avatar > .ab-item:before {
287274
display: none;
288275
content: none;
@@ -397,8 +384,7 @@
397384
margin: 6px 8px 0 -2px;
398385
}
399386

400-
#wpadminbar #wp-admin-bar-my-sites > .ab-item:before,
401-
#wpadminbar #wp-admin-bar-site-name > .ab-item:before {
387+
#wpadminbar #wp-admin-bar-my-sites > .ab-item:before {
402388
content: '\f112';
403389
top: 2px;
404390
}
@@ -408,12 +394,6 @@
408394
top: 2px;
409395
}
410396

411-
#wpadminbar #wp-admin-bar-site-name > .ab-item:before {
412-
content: "\f102";
413-
}
414-
415-
416-
417397
/**
418398
* Comments
419399
*/

assets/css/admin.css

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -438,41 +438,41 @@ h4.dashboard-panel-settings-subsection-heading {
438438
}
439439

440440
.cboxo-dashboard-panel-icons-radios {
441-
display: grid;
442-
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
443-
gap: 2rem;
444-
margin-top: 1rem;
445-
max-width: 600px;
441+
display: grid;
442+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
443+
gap: 2rem;
444+
margin-top: 1rem;
445+
max-width: 600px;
446446
}
447447

448448
.form-table td fieldset label.cboxol-dashboard-panel-icon-label {
449-
display: flex;
450-
align-items: center;
451-
gap: 0.25rem;
452-
text-align: center;
453-
cursor: pointer;
449+
display: flex;
450+
align-items: center;
451+
gap: 0.25rem;
452+
text-align: center;
453+
cursor: pointer;
454454
}
455455

456456
.cboxol-dashboard-panel-icon-label input[type="radio"] {
457-
margin: 0;
457+
margin: 0;
458458
}
459459

460460
.cboxol-dashboard-panel-icon-preview {
461-
display: flex;
462-
align-items: center;
463-
justify-content: center;
464-
width: 48px;
465-
height: 48px;
461+
display: flex;
462+
align-items: center;
463+
justify-content: center;
464+
width: 48px;
465+
height: 48px;
466466
}
467467

468468
.cboxol-dashboard-panel-icon-preview svg {
469-
width: 32px;
470-
height: 32px;
471-
fill: currentColor;
469+
width: 32px;
470+
height: 32px;
471+
fill: currentColor;
472472
}
473473

474474
.cboxol-dashboard-panel-icon-name {
475-
font-size: 0.875rem;
476-
color: #333;
477-
text-align: left;
475+
font-size: 0.875rem;
476+
color: #333;
477+
text-align: left;
478478
}

assets/css/dashboard-panel.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
position: relative;
44
}
55

6+
.openlab-news-panel-content ul {
7+
list-style: inherit;
8+
padding-left: 20px;
9+
}
10+
611
.openlab-news-panel-content .panel-header {
712
background: #63e0d2;
813
background-size: auto 160px;
@@ -63,8 +68,8 @@
6368
margin-top: 4px;
6469
}
6570

66-
.openlab-news-panel-content .panel-column-container a {
67-
color: #000;
71+
.openlab-news-panel-content .panel-header-content a {
72+
color: inherit;
6873
}
6974

7075
.openlab-news-panel-content .panel-column-container a:hover {

assets/img/my-openlab-icon.png

1.22 KB
Loading

assets/js/academic-units.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
typeObject = CBOXOLAcademicTypes.typesByMemberType[ memberType ][ i ];
5252
$selector = $( '.cboxol-academic-unit-selector-for-type-' + typeObject.slug );
5353
$selector.show();
54-
55-
if ( 'required' === typeObject.status ) {
56-
$selector.find( '.academic-unit-type-required-label' ).html( CBOXOLAcademicTypes.requiredLabel );
57-
} else {
58-
$selector.find( '.academic-unit-type-required-label' ).html( '' );
59-
}
6054
}
6155
}
6256
}

assets/src/components/post-sharing-options.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,30 @@ function PostSharingChoice( { instanceId, value, label, info, ...props } ) {
109109
);
110110
}
111111

112+
const templateEditorPostTypes = [ 'wp_template', 'wp_template_part' ]
113+
112114
const OpenlabPostVisibilityPlugin = () => {
113-
const isSiteEditor = useSelect( ( select ) => {
114-
const editSite = select( 'core/edit-site' );
115-
return !!editSite;
116-
}, [] );
115+
const isPostEditor = useSelect( ( select ) => {
116+
const editPost = select( 'core/edit-post' )
117+
const editor = select( 'core/editor' )
118+
119+
if ( ! editPost || ! editor || ! editor.getCurrentPostType ) {
120+
return false
121+
}
122+
123+
const postType = editor.getCurrentPostType()
117124

118-
return !isSiteEditor && <PostSharingOptions />;
119-
};
125+
return !! postType && ! templateEditorPostTypes.includes( postType )
126+
}, [] )
127+
128+
return isPostEditor ? <PostSharingOptions /> : null
129+
}
120130

121131
const registerPostVisibility = () => {
122-
registerPlugin( 'post-sharing-options', {
123-
render: OpenlabPostVisibilityPlugin,
124-
icon: 'visibility',
125-
} );
126-
};
132+
registerPlugin( 'post-sharing-options', {
133+
render: OpenlabPostVisibilityPlugin,
134+
icon: 'visibility',
135+
} )
136+
}
127137

128138
wp.domReady( registerPostVisibility );

0 commit comments

Comments
 (0)