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

0.5.0 #66

Merged
merged 265 commits into from
Aug 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
265 commits
Select commit Hold shift + click to select a range
1a323c0
Ensure that setting validations are handled in snapshot requests
westonruter Jun 21, 2016
84615cd
Remove dead old__set
westonruter Jun 22, 2016
1be62be
Prevent writing settings to snapshots if unauthorized; send back erro…
westonruter Jun 22, 2016
23808f1
Fix order of operations in ensure_customize_manager to fix PHP notice
westonruter Jun 22, 2016
b3f1715
Prevent theme switch error and including snapshot UUID in admin requests
westonruter Jun 22, 2016
b0e111f
Improve check for active theme
westonruter Jun 22, 2016
f541ab4
Add snapshot-exists state to manage button disabled state
westonruter Jun 22, 2016
8616831
Deprecate customize_snapshot_save in favor of customize_snapshot_save…
westonruter Jun 23, 2016
af42c34
Add versioning for data saved in snapshots, and back-compat for 0.4
westonruter Jun 23, 2016
688a4c5
Remove phpunit config until tests are updated
westonruter Jun 23, 2016
210d74c
Fix snapshotting widget instances by storing unsanitized value
westonruter Jun 23, 2016
8af4845
Fix phpcs error
westonruter Jun 23, 2016
b1ceccf
Ensure Post_Type::get_post_content() is always used to get post_conte…
westonruter Jun 23, 2016
7e30012
Ensure snapshot versions are kept with revisions
westonruter Jun 23, 2016
fdff98b
Revert "Ensure snapshot versions are kept with revisions"
westonruter Jun 24, 2016
fba4237
Restore old data structure for posts, aside from unused sanitized key
westonruter Jun 24, 2016
78b1115
Improve display of previewed snapshot values; add filter to extend
westonruter Jun 24, 2016
9f0b918
Merge branch 'develop' into bugfix/saving-menus-issue_2
valendesigns Jun 28, 2016
4c73e3d
Rework compatiblity with nav menus
valendesigns Jun 29, 2016
390083c
Fix phpcs issues
valendesigns Jun 29, 2016
7d619f1
Fix tests
valendesigns Jun 29, 2016
726e194
Merge branch 'bugfix/saving-menus-issue_2' of https://github.com/xwp/…
valendesigns Jun 29, 2016
8ae0764
Ensure items are added to existing menus
valendesigns Jun 29, 2016
44d8d4a
Add some tests. Not complete.
miina Jun 29, 2016
b7176d3
Add more test coverage. Some still missing.
miina Jun 29, 2016
3488780
Add test coverage. Test for Customize_Snapshot_Nav_Menu_Section missing.
miina Jun 29, 2016
6393ddd
Unit tests for menu changes.
miina Jun 30, 2016
2c3dbbe
Check for unauthorized, unrecognized, and invalid settings prior to s…
westonruter Jul 1, 2016
af66990
Merge pull request #54 from xwp/bugfix/trac-37247
westonruter Jul 2, 2016
924c872
Remove nav menu code in favor of re-using methods in WP_Customize_Nav…
westonruter Jul 5, 2016
19bbcfa
Fix test_create_post_type for 4.6-beta
westonruter Jul 5, 2016
e42ac1a
Rename MENU_ID to NAV_MENU_ITEM_ID
westonruter Jul 5, 2016
2617a10
Remove now unused Customize_Snapshot_Nav_Menu_Section
westonruter Jul 5, 2016
7998383
Let snapshot view link be submenu item under Customize
westonruter Jul 5, 2016
ad74719
Let travis run on all branches
westonruter Jul 5, 2016
69d9a90
Fix test_create_post_type for 4.6-beta
westonruter Jul 5, 2016
f692f04
Update wp-dev-lib 0f3058b...30b4b22: Merge pull request xwp/wp-dev-li…
westonruter Jul 5, 2016
cb45595
Merge pull request #51 from xwp/feature/add-toolbar-link_issue_48
westonruter Jul 5, 2016
310b365
Merge branch 'develop' of https://github.com/xwp/wp-customize-snapsho…
westonruter Jul 5, 2016
22504bd
Merge branch 'bugfix/saving-menus-issue_2' into bugfix/saving-menus-i…
westonruter Jul 5, 2016
1be0847
Merge branch 'develop' of https://github.com/xwp/wp-customize-snapsho…
westonruter Jul 5, 2016
0ccfd16
Use Preview Snapshot to view on frontend, and Inspect Snapshot to vie…
westonruter Jul 5, 2016
f263aea
Merge pull request #52 from xwp/feature/add-frontend-view-link_issue_49
westonruter Jul 5, 2016
bce3453
Preview nav menu settings early so that the sections and controls for…
westonruter Jul 6, 2016
adca567
Remove test setup code that is not used
westonruter Jul 6, 2016
d5e0bbc
Merge pull request #56 from xwp/bugfix/saving-menus-issue_3
westonruter Jul 6, 2016
5dd4ed9
Merge pull request #55 from xwp/bugfix/saving-menus-issue_2
westonruter Jul 6, 2016
c42c9ac
Merge branch 'develop' of https://github.com/xwp/wp-customize-snapsho…
westonruter Jul 7, 2016
5a74134
Add frontend preview link when snapshot is saved
westonruter Jul 8, 2016
ce29035
Trigger snapshots-ready event
westonruter Jul 8, 2016
194c9de
Replace snapshot-previewed with snapshot-exists state following refac…
westonruter Jul 8, 2016
b2c6502
Merge branch 'feature/frontend-preview-link' of https://github.com/xw…
westonruter Jul 8, 2016
04c80c0
Merge pull request #57 from xwp/feature/frontend-preview-link
valendesigns Jul 11, 2016
1662f2e
Merge branch 'develop' into feature/refactor
westonruter Jul 11, 2016
899ac06
Restore phpunit.xml.dist
valendesigns Jul 11, 2016
3010490
Skip showing error dialog if snapshot fails to save due to setting in…
westonruter Jul 11, 2016
a5ce689
Fix tests for the manager
valendesigns Jul 12, 2016
eb9c820
Merge branch 'feature/refactor' of https://github.com/xwp/wp-customiz…
valendesigns Jul 12, 2016
ee73063
Fix unit tests for Test_Ajax_Customize_Snapshot_Manager
westonruter Jul 12, 2016
c2a70f8
Prevent showing customize link if theme was not active
westonruter Jul 12, 2016
4e46d9e
Add setting_id param to customize_snapshot_value_preview
westonruter Jul 12, 2016
25067f7
Use meta_input for setting theme/version; return null from get_conten…
westonruter Jul 12, 2016
f1f462e
Add tests for Post_Type
westonruter Jul 12, 2016
dd675e2
Update Snapshot tests
valendesigns Jul 13, 2016
c4d2695
Merge branch 'feature/refactor' of https://github.com/xwp/wp-customiz…
valendesigns Jul 13, 2016
ed0d06f
Ensure the excerpt filter has access to the post object
valendesigns Jul 13, 2016
49b2121
Remove test_is_wpcom_vip_prod which caused warnings to be trapped and…
westonruter Jul 15, 2016
7553ceb
Attempt to fix PHP 5.3 error re: static method invocation
westonruter Jul 15, 2016
9c408bb
Remove tests from Test_Customize_Snapshot_Manager that have moved to …
westonruter Jul 15, 2016
589f755
Fix PHP Fatal: Cannot access self:: when no class scope is active
westonruter Jul 15, 2016
aeae38b
Fix tests for WP 4.5.x
westonruter Jul 15, 2016
5ea3ccc
Fix test back-compat for WP4.5
westonruter Jul 15, 2016
4e5d263
Fix PHPCS issues for unit tests
westonruter Jul 15, 2016
c15bcc2
Attempt fix of Travis CI build unit tests again
westonruter Jul 15, 2016
9aa06d3
Allow Post_Type::save() to omit data; fix tests
westonruter Jul 15, 2016
38ee794
Add tests for Snapshot saved, set, status, constructor; add coverage …
westonruter Jul 15, 2016
0fb7ca9
Change Customize_Snapshot::set() to take array of setting params not …
westonruter Jul 15, 2016
4d67402
Address todo about merging snapshot with existing state; ensure null …
westonruter Jul 16, 2016
f69b325
Fix tests yet again in 4.5; remove duplicate WP from Travis matrix
westonruter Jul 16, 2016
b21c9ac
Allow snapshot to publish
PatelUtkarsh Jul 20, 2016
6e5debc
Fix unit test
PatelUtkarsh Jul 20, 2016
9d87000
Add expected actions from WP_Customize_Manager::save() when snapshot …
PatelUtkarsh Jul 21, 2016
1899d44
Update code of publish snapshot and add unit test
PatelUtkarsh Jul 21, 2016
516975c
Use snapshot manager method to init
PatelUtkarsh Jul 22, 2016
9d6ff83
Add edit snapshot post link
PatelUtkarsh Jul 22, 2016
2742e57
Fix unit-test
PatelUtkarsh Jul 22, 2016
5224948
Filter customize_snapshot posts permalinks
westonruter Jul 23, 2016
d294ae5
Use get_permalink for post_row_actions as well
westonruter Jul 23, 2016
c934531
Code review changes
PatelUtkarsh Jul 23, 2016
8b82190
Fix typo in customize_snapshot_uuid
westonruter Jul 23, 2016
1bf8217
Add initial read-only REST API endpoints for snapshots
westonruter Jul 23, 2016
4bc8990
Add test for filter_post_type_link
westonruter Jul 23, 2016
4b3cb85
Add custom phpunit config with rest-api as dependency
westonruter Jul 23, 2016
13f8edf
Allow author and date_gmt to be supplied in Post_Type::save()
westonruter Jul 23, 2016
03808cd
Add unit tests for REST API
westonruter Jul 23, 2016
c1b9f1c
Update wp-dev-lib 30b4b22...4aba13a: Merge pull request #194 from sha…
westonruter Jul 23, 2016
30f5dc6
Add save error on publish
PatelUtkarsh Jul 25, 2016
8d2aa9b
Fix unit test
PatelUtkarsh Jul 25, 2016
0ece6a2
Update unit-test
PatelUtkarsh Jul 25, 2016
730d1ad
Fix param issue
PatelUtkarsh Jul 25, 2016
253119d
[WIP] Fix unit-test
PatelUtkarsh Jul 25, 2016
cfb77b7
Fix infinite recursion in publish_snapshot_with_customize_save_after
westonruter Jul 25, 2016
70e5ff2
Use non-raw editLink template var
westonruter Jul 25, 2016
1cdf3ca
Ensure that new_customize_snapshot_uuid is returned by filter
westonruter Jul 25, 2016
1413ccb
Display error on published snapshot is any has setting error
PatelUtkarsh Jul 25, 2016
74faae2
Change static suppress_publish_hook to class member
PatelUtkarsh Jul 25, 2016
fb15ec7
Show localized error messages insetad of codes
westonruter Jul 25, 2016
4c497aa
Rename save_error to publish_error
westonruter Jul 25, 2016
4e3dbf4
Improve display of values that are empty strings
westonruter Jul 25, 2016
bde9eaa
Show admin notice when attempting to publish a snapshot with errored …
westonruter Jul 26, 2016
4b501ed
Skip check_customize_publish_authorization if not customize_save ajax…
westonruter Jul 26, 2016
5ef4f96
[WIP] Add prepare_snapshot_post_content_for_publish
westonruter Jul 26, 2016
795624d
Disable revision revert and publish metabox options for published sna…
westonruter Jul 26, 2016
88ba1fe
Introduce new doing_customize_save_ajax method without DOING_AJAX dep…
westonruter Jul 26, 2016
db98bfb
Add test stubs and improve coverage
westonruter Jul 26, 2016
d5ef5f2
Hide update button if snapshot published
westonruter Jul 27, 2016
e4c3002
Abort previewing already-published snapshots; prevent updates to publ…
westonruter Jul 27, 2016
f3b1436
Add hack to prevent WP_Customize_Widgets::customize_register from pre…
westonruter Jul 27, 2016
b76be7c
Merge pull request #63 from xwp/feature/issue-29-rest-api
westonruter Jul 27, 2016
04cafb7
Merge branch 'feature/refactor' of https://github.com/xwp/wp-customiz…
westonruter Jul 27, 2016
823c658
Remove todo that was done
westonruter Jul 27, 2016
8976556
Add tests for disable_revision_ui_for_published_posts and hide_disabl…
westonruter Jul 27, 2016
5e56db1
Add tests for show_publish_error_admin_notice
westonruter Jul 27, 2016
f0b345c
Add unit test for prepare_snapshot_post_content_for_publish
PatelUtkarsh Jul 27, 2016
c55a906
Add unit test for save_settings_with_publish_snapshot
PatelUtkarsh Jul 27, 2016
b413115
Use test class object for WP_Customize_Manager
PatelUtkarsh Jul 27, 2016
a937a87
Fix unit tests in WP 4.5.x
westonruter Jul 27, 2016
1a7e8c8
Prevent edit_post_link from being double-encoded
westonruter Jul 27, 2016
32c03e9
Merge pull request #62 from xwp/feature/publish-snapshot
westonruter Jul 27, 2016
5b00027
Fix WordPress.NamingConventions.ValidHookName.UseUnderscores
westonruter Jul 27, 2016
db598cb
Fix Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines
westonruter Jul 27, 2016
55df976
Only show edit post link in Customizer if snapshot-saved and snapshot…
westonruter Jul 27, 2016
b2872f9
Fix jshint error for unused var
westonruter Jul 27, 2016
9c56143
Remove trailing whitespace from Gruntfile.js
westonruter Jul 27, 2016
68e8f34
Merge pull request #59 from xwp/feature/refactor
westonruter Jul 27, 2016
30df6bd
[WIP] Schedule UI for snapshot in customizer
PatelUtkarsh Jul 28, 2016
a928d18
Ensure hiding of published UI only applies to snapshot post type
westonruter Jul 29, 2016
b01a91e
Template and css update
PatelUtkarsh Jul 29, 2016
069fbbe
Update template, refactor js for slidedown and add js function for da…
PatelUtkarsh Aug 1, 2016
c744de8
Update publish date from update call and add js update function to up…
PatelUtkarsh Aug 2, 2016
9766502
Working prototype for scheduling UI in customizer
PatelUtkarsh Aug 2, 2016
95e0573
Fix scheduling edit_date issue
PatelUtkarsh Aug 2, 2016
6492b66
Disable update button if snapshot schedule date changed
PatelUtkarsh Aug 3, 2016
7deb456
Schedule request only if schedule date is in future
PatelUtkarsh Aug 3, 2016
136ed7d
rename variable to isSnapshotHasUnsavedChanges
PatelUtkarsh Aug 3, 2016
9e04395
Add populateInputs and refactor populateSetting
PatelUtkarsh Aug 3, 2016
132dc8a
Change button text to schedule if snapshot post status is schedule
PatelUtkarsh Aug 3, 2016
8f20ab7
Add remain time to publish text
PatelUtkarsh Aug 3, 2016
0eba899
Add rest button
PatelUtkarsh Aug 3, 2016
d1fa9d5
Fix text domain
westonruter Aug 4, 2016
26399a1
Install eslint so checks can run
westonruter Aug 4, 2016
94d234b
Bump node.js to 5.x on Travis for sake of ESLint
westonruter Aug 4, 2016
6460b48
Add nvm use 4 to Travis
westonruter Aug 4, 2016
345294a
Do nvm install before nvm use
westonruter Aug 4, 2016
6311e36
Fix eslint issues
PatelUtkarsh Aug 4, 2016
a6c381d
Fix control visbility
valendesigns Aug 4, 2016
7be3a5b
Fix merge conflicts
valendesigns Aug 4, 2016
d8a1edb
Fix error on updateScheduledCountdown when controls are not initialized
PatelUtkarsh Aug 4, 2016
08a2171
On reset update UI settings
PatelUtkarsh Aug 4, 2016
4ef7d54
On snapshot change schedule icon should be visible
PatelUtkarsh Aug 4, 2016
c2281d0
Visibility of schedule toggle icon fix on publish and normalize date …
PatelUtkarsh Aug 4, 2016
9a58741
Fix edit link not visible on snapshot create
PatelUtkarsh Aug 4, 2016
73c1817
Fix unit test
PatelUtkarsh Aug 4, 2016
a8a614c
Code reivew changes
PatelUtkarsh Aug 4, 2016
0d21f51
Fix date issue on snapshot update after scheduling
PatelUtkarsh Aug 4, 2016
1ee150a
Fix eslint complexity
PatelUtkarsh Aug 4, 2016
256f7b6
On snapshot schedule/update call populateSetting to update UI
PatelUtkarsh Aug 4, 2016
96cba79
Refactor
valendesigns Aug 5, 2016
d7848cf
Fix eslint issues
valendesigns Aug 5, 2016
0f5634d
Fix typo
valendesigns Aug 5, 2016
2772725
Reset schedule variables when snapshot publish
PatelUtkarsh Aug 5, 2016
ccf7a86
Add unit-test for schedule snapshot
PatelUtkarsh Aug 5, 2016
ee64c74
Fix unit test for multisite
PatelUtkarsh Aug 5, 2016
5640162
Fix unit test for multisite for real
PatelUtkarsh Aug 5, 2016
976c740
Ensure a scheduled Snapshot is published after the Customizer is saved
valendesigns Aug 6, 2016
7d1a8cc
Fix tests
valendesigns Aug 6, 2016
a5294bd
Format template output
valendesigns Aug 6, 2016
fe54c3c
Ensure customize_snapshot_uuid gets added to frontend links
westonruter Aug 7, 2016
c1ce097
Ignore customize_snapshot_uuid param if in the admin
westonruter Aug 7, 2016
8bf8be2
Add test for enqueue_frontend_scripts
westonruter Aug 7, 2016
1c93cfb
Remember snapshot in session and prompt to restore
westonruter Aug 7, 2016
0d74731
Confirm when leaving snapshot state
westonruter Aug 7, 2016
ae9593d
Improve logic for replacing customize admin bar link; move inspect it…
westonruter Aug 7, 2016
1100a2e
Add link to exit snapshot frontend preview; remove all other external…
westonruter Aug 8, 2016
5742fb5
Bump priority on removal of admin bar links; allow links with snapshots
westonruter Aug 8, 2016
b3707da
Remove confirm to resume snapshot in favor of admin bar link if avail…
westonruter Aug 8, 2016
e08b899
Remove nag when clicking on links without snapshot param
westonruter Aug 8, 2016
dd8e944
Use mutation observers to inject query params into links if available
westonruter Aug 8, 2016
74718b4
Inject customize_snapshot_uuid into frontend requests
westonruter Aug 8, 2016
c6b5bdd
Restore snapshot importing on customize.php
westonruter Aug 8, 2016
32c9c71
Remove obsolete leaveSessionPrompt
westonruter Aug 8, 2016
d57ecac
Add stub for customize-snapshots-preview
westonruter Aug 8, 2016
f0391dd
Fix edit link visiblity issue on dirty snapshot state
PatelUtkarsh Aug 8, 2016
97f3663
Introduce Customize_Snapshot_Manager::is_previewing_settings()
westonruter Aug 8, 2016
e08290a
Fix readme
westonruter Aug 8, 2016
00a674c
Optimize extend in js
PatelUtkarsh Aug 8, 2016
1daff6c
Fix error args not undefine
PatelUtkarsh Aug 8, 2016
50b04d3
Add support for previewing Ajax requests inside of the Customizer pre…
westonruter Aug 8, 2016
1527e86
Ensure that GET requests in Customizer Preview get recognized as GET …
westonruter Aug 9, 2016
2f3fa54
Fix UI issue
PatelUtkarsh Aug 9, 2016
f2e5a17
Break up init method into smaller methods; add tests
westonruter Aug 9, 2016
11b5acd
Remove extra semicolon
PatelUtkarsh Aug 9, 2016
557aa06
Add test for Post_Type::display_post_states()
westonruter Aug 9, 2016
751a80f
Add test for Customize_Snapshot_Manager::doing_customize_save_ajax()
westonruter Aug 9, 2016
672c202
Add test for Customize_Snapshot_Manager::ensure_customize_manager()
westonruter Aug 9, 2016
19a224e
Add test for Customize_Snapshot_Manager::is_theme_active()
westonruter Aug 9, 2016
be2a9cd
Add test for Customize_Snapshot_Manager::should_import_and_preview_sn…
westonruter Aug 9, 2016
6745570
Add support for previewing GET form submissions in Customizer preview
westonruter Aug 10, 2016
005aed4
Add not-allowed cursor to submit buttons for forms with post method
westonruter Aug 10, 2016
e98c6f1
Simplify the z-index issue, only slightly
valendesigns Aug 10, 2016
e2eb16e
Persist current snapshot in form submissions on frontend
westonruter Aug 10, 2016
307c5af
Re-use the previewUrl value's setter to determine if form action is p…
westonruter Aug 10, 2016
51c0439
Use jQuery instead of straight querySelector
westonruter Aug 10, 2016
ae6a176
Clarify jsdoc
westonruter Aug 10, 2016
9d1ad7a
Merge pull request #72 from xwp/feature/previewing-form-submissions
westonruter Aug 10, 2016
b53f954
Merge pull request #70 from xwp/feature/previewing-improvements
valendesigns Aug 10, 2016
244debe
Merge branch 'develop' of https://github.com/xwp/wp-customize-snapsho…
westonruter Aug 10, 2016
096d44c
Add unit-test for get_month_choices and override_post_date_default_data
PatelUtkarsh Aug 10, 2016
add9311
Title and screen reader text add
PatelUtkarsh Aug 10, 2016
00857ba
Check post exists check more readable
PatelUtkarsh Aug 10, 2016
ae7189d
Fix js dateValueOf function
PatelUtkarsh Aug 10, 2016
59a7484
Update unit-test
PatelUtkarsh Aug 10, 2016
f825bea
Add test for Customize_Snapshot_Manager::preview_snapshot_settings();…
westonruter Aug 11, 2016
4ea308b
Add test for Customize_Snapshot_Manager::import_snapshot_data()
westonruter Aug 11, 2016
85e590c
Add target blank on snapshot-edit link
PatelUtkarsh Aug 11, 2016
3e5ce8a
Merge branch 'feature/schedule-ui-customizer' of github.com:xwp/wp-cu…
PatelUtkarsh Aug 11, 2016
14572fe
Add test for setup_preview_ajax_requests in admin-ajax
westonruter Aug 11, 2016
4589448
Test last line of override_request_method
westonruter Aug 11, 2016
e416ced
Add test for Customize_Snapshot_Manager::preview_early_nav_menus_in_c…
westonruter Aug 11, 2016
1ed08b6
Add tests for customize_preview_init and enqueue_preview_scripts
westonruter Aug 11, 2016
535cbd5
Add test for filter_customize_refresh_nonces
westonruter Aug 11, 2016
0763819
Merge pull request #68 from xwp/feature/schedule-ui-customizer
valendesigns Aug 11, 2016
de941ba
Add changelog for 0.5.0
westonruter Aug 12, 2016
5370bd0
Add call to load_plugin_textdomain to potentially fix translate.wordp…
westonruter Aug 12, 2016
a9e0601
Bump version 0.5.0
westonruter Aug 12, 2016
3daeea5
Update wp-dev-lib 4aba13a...4eab31d: Merge pull request #195 from sha…
westonruter Aug 12, 2016
c4fd8c8
Update required version and tested up to version
westonruter Aug 12, 2016
3db4d91
Flesh out more of readme
westonruter Aug 12, 2016
f33d12e
Add missing hover/focus/active color for snapshot-schedule-button
westonruter Aug 12, 2016
8ef0318
Rename schedule.template to schedule.container
westonruter Aug 12, 2016
fb6f6db
Use slideUp/slideDown animation for toggling display of schedule UI
westonruter Aug 12, 2016
11d643a
Use a state to manage the visibility of the schedule container
westonruter Aug 12, 2016
060b372
Add help text to scheduling box description
westonruter Aug 12, 2016
21a28a8
Add aria attributes to snapshot-schedule-button
westonruter Aug 12, 2016
483cc1e
[WIP] Fix date markup, add screen reader text, update css for firefox
PatelUtkarsh Aug 12, 2016
2d74e5c
Fix date inputs breaking in firefox
mohdsayed Aug 12, 2016
fd86857
Auto-collapse schedule container via esc and clicking outside
westonruter Aug 12, 2016
35c2d6d
Move timezone information after the date inputs
westonruter Aug 12, 2016
e17a52b
Merge pull request #73 from xwp/bugfix/schedule-ui
westonruter Aug 12, 2016
e05ac95
Update props for 0.5.0
westonruter Aug 12, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .dev-lib
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PATH_INCLUDES='*.* php js css tests'
WPCS_GIT_TREE=develop
ASSETS_DIR=wp-assets
ASSETS_DIR=wp-assets

function after_wp_install {
echo "Installing REST API..."
svn export -q https://plugins.svn.wordpress.org/rest-api/trunk/ "$WP_CORE_DIR/src/wp-content/plugins/rest-api"
}
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ node_js:
- stable

env:
- WP_VERSION=4.5 WP_MULTISITE=0
- WP_VERSION=trunk WP_MULTISITE=1
- WP_VERSION=trunk WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1

branches:
only:
- master

install:
- nvm install 4 && nvm use 4
- export DEV_LIB_PATH=dev-lib
- if [ ! -e "$DEV_LIB_PATH" ] && [ -L .travis.yml ]; then export DEV_LIB_PATH=$( dirname $( readlink .travis.yml ) ); fi
- source $DEV_LIB_PATH/travis.install.sh
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports = function( grunt ) {
command: 'cd ./dev-lib && ./generate-markdown-readme' // Generate the readme.md
},
phpunit: {
command: 'vagrant ssh -c "cd <%= vvv.plugin %> && phpunit"'
command: 'vagrant ssh -c "cd <%= vvv.plugin %> && phpunit"'
},
phpunit_c: {
command: 'vagrant ssh -c "cd <%= vvv.plugin %> && phpunit --coverage-html <%= vvv.coverage %>"'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xwp/wp-customize-snapshots",
"description": "Allow Customizer states to be drafted, and previewed with a private URL.",
"version": "0.4.0",
"version": "0.5.0",
"type": "wordpress-plugin",
"homepage": "https://github.com/xwp/wp-customize-snapshots",
"license": "GPL-2.0+",
Expand Down
8 changes: 8 additions & 0 deletions css/customize-snapshots-preview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
form[method="post"] button[type="submit"],
form[method="post"] button[type=""],
form[method="post"] input[type="submit"] {
cursor: not-allowed;
}
form[method="post"] button:not([type]) {
cursor: not-allowed;
}
164 changes: 163 additions & 1 deletion css/customize-snapshots.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
#snapshot-preview-link,
#snapshot-schedule-button {
float: right;
margin-top: 13px;
margin-right: 4px;
color: #656a6f;
}

#snapshot-schedule-button {
display: block;
}
#snapshot-schedule-button:hover,
#snapshot-schedule-button:focus,
#snapshot-schedule-button:active {
color: #191e23;
}

#snapshot-preview-link:hover,
#snapshot-preview-link:focus,
#snapshot-preview-link:active {
color: #191e23;
}

#snapshot-save {
float: right;
margin-top: 9px;
margin-right: 9px;
}

#customize-header-actions:not(.button-added) .button#save {
visibility: hidden;
}
Expand Down Expand Up @@ -38,4 +62,142 @@
margin-top: 6px;
margin-right: 6px;
}
}
}

#snapshot-schedule {
background: #fff !important;
border-bottom: 1px solid #ddd;
line-height: 1.5;
left: 0;
top: 46px;
position: absolute;
width: 100%;
box-shadow: 0 5px 0 0 rgba(0,0,0,0.05);
padding:10px;
box-sizing: border-box;
}

#snapshot-schedule .snapshot-schedule-title {
color: #555;
}

#snapshot-schedule .snapshot-schedule-title h3 {
margin: .2em 2em .75em 0;
}

#snapshot-schedule .snapshot-schedule-description {
margin-bottom: 0.5em;
}
#snapshot-schedule .timezone-info {
margin-top: 0.5em;
font-size: smaller;
}

#snapshot-schedule a.snapshot-edit-link {
position: absolute;
top: 4px;
right: 1px;
width: 20px;
height: 20px;
cursor: pointer;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-appearance: none;
background: transparent;
color: #555;
border: none;
padding: 10px;
}

#snapshot-schedule a.snapshot-edit-link:focus,
#snapshot-schedule a.snapshot-edit-link:hover {
color: #0073aa;
}

#snapshot-schedule a.snapshot-edit-link:before {
padding: 4px;
position: absolute;
top: 5px;
left: 6px;
-webkit-border-radius: 100%;
border-radius: 100%;
}

#snapshot-schedule a.snapshot-edit-link:focus:before {
-webkit-box-shadow:
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba(30, 140, 190, .8);
box-shadow:
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba(30, 140, 190, .8);
}

#snapshot-schedule .accordion-section-title {
padding: 10px;
}

#snapshot-schedule .reset-time {
font-weight: normal;
font-size: 80%;
display: none;
}

.snapshot-schedule-control.date-inputs {
display: flex;
display: -ms-flexbox;
align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
justify-content: flex-start;
-webkit-box-pack: start;
-ms-flex-pack: start;
}

.snapshot-schedule-control input.date-input {
-moz-appearance: textfield;
-webkit-appearance: textfield;
padding-left: 5px; /* 10px padding is not ideal for such small inputs */
padding-right: 5px;
}

.snapshot-schedule-control label {
display: inline-block; /* To align items when flex is not supported */
}

.snapshot-schedule-control .year.date-input {
min-width: 4em;
}

.snapshot-schedule-control input[type="number"]{
width:100%;
}

.snapshot-schedule-control .time-special-char {
padding-left:2px;
padding-right:2px;
}

.snapshot-schedule-control select {
height: 28px;
}

@media screen and ( max-width: 782px ) {
.snapshot-schedule-control select {
height: 40px;
}
}

.snapshot-schedule-control input.date-input::-webkit-outer-spin-button,
.snapshot-schedule-control input.date-input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

.wp-full-overlay .wp-full-overlay-sidebar .wp-full-overlay-header {
padding-left: 15px;
z-index: 500101;
}

.select2-container {
z-index: 500100 !important;
}
5 changes: 2 additions & 3 deletions customize-snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* Plugin Name: Customize Snapshots
* Plugin URI: https://github.com/xwp/wp-customize-snapshots
* Description: Allow Customizer states to be drafted, and previewed with a private URL.
* Version: 0.4.0
* Version: 0.5.0
* Author: XWP
* Author URI: https://xwp.co/
* License: GPLv2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: customize-snapshots
* Domain Path: /languages
*
* Copyright (c) 2015 XWP (https://xwp.co/)
*
Expand Down Expand Up @@ -44,7 +43,7 @@
* Admin notice for incompatible versions of PHP.
*/
function customize_snapshots_php_version_error() {
printf( '<div class="error"><p>%s</p></div>', customize_snapshots_php_version_text() );
printf( '<div class="error"><p>%s</p></div>', customize_snapshots_php_version_text() ); // WPCS: XSS OK.
}

/**
Expand Down
28 changes: 28 additions & 0 deletions instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,31 @@ function get_plugin_instance() {
global $customize_snapshots_plugin;
return $customize_snapshots_plugin;
}

/**
* Convenience function for whether settings are being previewed.
*
* @see Customize_Snapshot_Manager::is_previewing_settings()
* @see Customize_Snapshot_Manager::preview_snapshot_settings()
*
* @return bool Whether previewing settings.
*/
function is_previewing_settings() {
return get_plugin_instance()->customize_snapshot_manager->is_previewing_settings();
}

/**
* Convenience function to get the current snapshot UUID.
*
* @see Customize_Snapshot_Manager::$current_snapshot_uuid
*
* @return string|null The current snapshot UUID or null if no snapshot.
*/
function current_snapshot_uuid() {
$customize_snapshot_uuid = get_plugin_instance()->customize_snapshot_manager->current_snapshot_uuid;
if ( empty( $customize_snapshot_uuid ) ) {
return null;
} else {
return $customize_snapshot_uuid;
}
}
Loading