Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Improve WP Admin UI #38

Merged
merged 36 commits into from
Jun 10, 2016
Merged

Improve WP Admin UI #38

merged 36 commits into from
Jun 10, 2016

Conversation

westonruter
Copy link
Contributor

No description provided.

@@ -284,7 +289,7 @@ public function create_post_type() {
*/
function setup_metaboxes() {
$id = self::POST_TYPE;
$title = __( 'Data', 'customize-snapshots' );
$title = __( 'Data', 'customize-snapshot' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text domain is customize-snapshots

if ( ! empty( $allcaps['edit_theme_options'] ) ) {
$allcaps['customize_publish'] = true;
}

// Grant all customize snapshot caps which weren't explicitly disallowed to users who can customize.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing test failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restored the initial cap check in ab6ca42. Tests are passing now.

'<p><a href="%s" class="button button-secondary">%s</a></p>',
esc_url( $customize_url ),
esc_html__( 'Open in Customizer', 'customize-snapshots' )
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit makes me happy 😄

@valendesigns
Copy link
Contributor

@westonruter When you publish the snapshot all the settings disappear from the metabox

@valendesigns
Copy link
Contributor

Oh they are hidden after published. So we need to remove the checkbox toggle and hidden attribute for published snapshots so all the settings display

@westonruter
Copy link
Contributor Author

@valendesigns I think the problem is that all of the settings get sent with dirty: false at the moment of Publish. We should preserve the original dirty state.

@westonruter
Copy link
Contributor Author

@valendesigns ok, ready for you to review.

@valendesigns
Copy link
Contributor

@westonruter I think we should hide the "Save Draft" button or change the customize button to "Edit" so it fits in the space. Thoughts?

@valendesigns
Copy link
Contributor

We also need to handle the publish button so the Snapshot updates the front-end. Otherwise scheduling will not work.

@valendesigns
Copy link
Contributor

@westonruter An issue with the updated state replacement JS is that the ? is being left behind when there are no params in the url. It should check that there are params and remove the question mark if there aren't any.

@westonruter
Copy link
Contributor Author

@valendesigns

I think we should hide the "Save Draft" button or change the customize button to "Edit" so it fits in the space. Thoughts? We also need to handle the publish button so the Snapshot updates the front-end. Otherwise scheduling will not work.

Actually, perhaps we should just hide the publish box entirely. This would be what #15 would implement, and at that time, the publish button could be restored.

@westonruter
Copy link
Contributor Author

I think I know what to do. We can just remove the publish_posts cap for now and it will just work 😄

@westonruter
Copy link
Contributor Author

@valendesigns oh, and you know what? Now with b3ea60a it would be sweet if when a user lacks customize_publish capability, in addition to a Save button there could be a “Submit” button that serves the same purpose as the “Submit for Review” button when a user wants to submit a post as pending status:

image

@valendesigns
Copy link
Contributor

So it makes the publish button say submit for review?

@westonruter
Copy link
Contributor Author

@westonruter
Copy link
Contributor Author

@valendesigns I merged feature/submit-for-review into this branch. I'm feeling really good about it now. I think I addressed all of your concerns.

@valendesigns valendesigns merged commit 181317a into release/0.4.0 Jun 10, 2016
@valendesigns valendesigns deleted the feature/wp-admin branch June 11, 2016 00:05
@westonruter westonruter modified the milestone: 0.4.0 Jun 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants