Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.21 #2013

Merged
merged 113 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
be9329e
Start adding LifterLMS functionality
zackkatz Jul 6, 2020
8bec533
Prevent breaking things if LifterLMS is not loaded.
zackkatz Nov 4, 2020
54900cf
Adds an `in_trash` error status
zackkatz May 19, 2022
9ea0227
Fix a test
zackkatz Sep 2, 2022
628280d
Fix typo in test and add more helpful test label
zackkatz Sep 2, 2022
b35f1aa
Merge branch 'develop' into issue/1382-views-in-trash
zackkatz Sep 2, 2022
af1bce6
Add workflow multiuser to search as multi select
omarkasem Feb 6, 2023
6a9fc36
formatting
omarkasem Feb 6, 2023
3109440
Merge branch 'develop' into issue/1635-support-search-on-gravity-flow…
omarkasem Jan 21, 2024
bcc7592
add worflow user fields to search
omarkasem Jan 25, 2024
1133f69
formatting
omarkasem Jan 25, 2024
a80f216
lock
omarkasem Jan 25, 2024
84f5727
Merge branch 'develop' into issue/1635-support-search-on-gravity-flow…
omarkasem Jan 25, 2024
fb718e9
Merge branch 'develop' into issue/1635-support-search-on-gravity-flow…
omarkasem Feb 15, 2024
38ccc51
Yoda formatting, return early, & docblocks
zackkatz Feb 20, 2024
90609df
Merge branch 'develop' into issue/1382-views-in-trash
zackkatz Feb 21, 2024
20580b4
Merge branch 'develop' into feature/lifterlms
zackkatz Feb 22, 2024
b2ef737
Add screen reader new window warning
zackkatz Feb 22, 2024
bc21484
Replace array with short tags [] and textdomain
zackkatz Feb 22, 2024
067505a
Add slug setting for customizing endpoint
zackkatz Feb 22, 2024
c028740
Clean up rendering
zackkatz Feb 22, 2024
48f8359
Default Views is empty array
zackkatz Feb 22, 2024
fc45566
Code cleanup
zackkatz Feb 22, 2024
a188f21
Fix CSS not rendering
zackkatz Feb 29, 2024
722f6bf
Fix single entry endpoint not working
zackkatz Feb 29, 2024
4000c50
Standardize fetching the slug
zackkatz Feb 29, 2024
c3edd60
Don't modify output when permalinks are disabled.
zackkatz Feb 29, 2024
02575c4
Merge branch 'develop' into feature/lifterlms
zackkatz Feb 29, 2024
4921cb5
Fix single entry links not working
zackkatz Feb 29, 2024
5287f78
Fix the "Go back" link URL
zackkatz Feb 29, 2024
6ea5f22
Add SVG as an image extension (#2005)
mrcasual Mar 5, 2024
b0126cb
Make Fancybox display SVGs (#2005)
mrcasual Mar 6, 2024
5468078
Update Foundation to v1.2.11
mrcasual Mar 6, 2024
c3cd0dc
remove 8.2 deprecations
doekenorg Mar 6, 2024
df96317
Add CSV download link widget
doekenorg Feb 26, 2024
e4eea1f
no capital Link
doekenorg Feb 26, 2024
535a0ad
Move CSV download to REST endpoint with nonce check.
doekenorg Feb 28, 2024
52f43c1
Fix unit test warnings
doekenorg Mar 4, 2024
8cd307f
Add classes, allow field name headers, strip notice.
doekenorg Mar 4, 2024
93228e7
update image
doekenorg Mar 4, 2024
0871618
Fix styling with new name. Hide export until allowed.
doekenorg Mar 4, 2024
7519a97
Transfer search query params to export link.
doekenorg Mar 4, 2024
6757731
Add notification all entries will be downloaded by widget
doekenorg Mar 7, 2024
8419d72
Add translations
doekenorg Mar 7, 2024
7caa703
Fixed CSS/JS not always printing
zackkatz Mar 11, 2024
472c8f1
Merge branch 'develop' into feature/lifterlms
zackkatz Mar 11, 2024
69778e1
Show my work so far
zackkatz Mar 11, 2024
43a3e8b
remove 8.2 deprecations (#2006)
mrcasual Mar 11, 2024
2b3e474
Update changelog [ci skip]
mrcasual Mar 11, 2024
b7e6ba7
Added changelog item [ci skip]
zackkatz Mar 12, 2024
9061d24
Merge branch 'develop' into issue/1635-support-search-on-gravity-flow…
zackkatz Mar 12, 2024
f2b8c4e
Issue/1635 support search on gravity flow fields (#1974)
zackkatz Mar 12, 2024
4e67815
Use Utils::get() instead of rgar()
zackkatz Mar 13, 2024
31add4b
Fix punctuation
zackkatz Mar 13, 2024
be28c72
Tweak the language a bit
zackkatz Mar 13, 2024
c38d961
Use the same language as other field settings (for now)
zackkatz Mar 13, 2024
f7f07f7
Make some changes for accessibility
zackkatz Mar 13, 2024
8923f32
Fix fatal error when Search Bar has multiselect
zackkatz Mar 13, 2024
ad4cd7e
Update language for the widget
zackkatz Mar 13, 2024
0378ec2
Add container div to improve styling/scripting
zackkatz Mar 13, 2024
4dbbdc6
Fix mime type
zackkatz Mar 13, 2024
2803710
Provide the base URL for JS updating
zackkatz Mar 13, 2024
d638a48
Fix incorrect variable name
zackkatz Mar 13, 2024
10ca055
Merge branch 'develop' into feature/1891-implement-a-csv-widget-to-be…
zackkatz Mar 13, 2024
9f5fcac
Use new DataTables action instead
zackkatz Mar 13, 2024
e82e072
[WIP] LifterLMS DataTables support (#2008)
zackkatz Mar 13, 2024
edb9219
Use Select2 for the View selections
zackkatz Mar 13, 2024
a69edab
Remove unused code
zackkatz Mar 13, 2024
0d1528e
Only run on LifterLMS Dashboard page
zackkatz Mar 13, 2024
37638d1
Merge branch 'develop' into feature/lifterlms
zackkatz Mar 13, 2024
45c2525
Update readme [ci skip]
zackkatz Mar 13, 2024
63f58e6
Add security for embedding views with short codes.
doekenorg Feb 6, 2024
b17467a
Add `secret` to shortcode hint.
doekenorg Feb 6, 2024
0df9acd
Add copy on click for short code hint.
doekenorg Feb 6, 2024
8be08f7
prevent selection, added aria-label
doekenorg Feb 8, 2024
e52a0d0
Add secret to block editor (view).
doekenorg Feb 8, 2024
bb304a6
Add secret to block editor (entryfield).
doekenorg Feb 8, 2024
f5561ff
Update readme
doekenorg Feb 8, 2024
ae96594
Enable secured views by default on new views
doekenorg Feb 8, 2024
c511754
Hide blocks for users without `publish_gravityviews` caps
doekenorg Feb 8, 2024
cb2adb1
Prevent reset of GravityView role capabilities on every request
doekenorg Feb 8, 2024
051e48b
Clean up formatted view for json
doekenorg Feb 8, 2024
6156739
Update readme
doekenorg Feb 8, 2024
343ebe2
Compile assets
doekenorg Feb 12, 2024
4e09736
Prevent leaking secrets in frontend
doekenorg Feb 15, 2024
83ca18f
add short code with copy on list view.
doekenorg Feb 15, 2024
8138fc9
remove trailing comma
doekenorg Feb 15, 2024
e6f33ea
add/remove secret realtime in view
doekenorg Mar 7, 2024
8e62437
compile assets
doekenorg Mar 13, 2024
2b22492
refactor JS + moved copy text to every input
doekenorg Mar 13, 2024
a251beb
Added aria-label + title for click to copy
doekenorg Mar 13, 2024
43ad215
Add screen reader only instructions
doekenorg Mar 14, 2024
2403886
Fix CSS not printing
zackkatz Mar 15, 2024
92fb3bf
Integrate with LifterLMS (#1882)
zackkatz Mar 16, 2024
a4f04bd
Update readme.txt [ci skip]
zackkatz Mar 16, 2024
bc67551
Bump follow-redirects in /future/includes/gutenberg
dependabot[bot] Mar 17, 2024
19bc846
Capitalize View [ci skip]
mrcasual Mar 17, 2024
2f42caa
Show invalid secret notice to admins.
doekenorg Mar 17, 2024
a291d4d
Security fixes (#1983)
mrcasual Mar 18, 2024
b93d9e3
Merge branch 'develop' into feature/1891-implement-a-csv-widget-to-be…
mrcasual Mar 18, 2024
9e134c8
Add Export Link widget (#1997)
mrcasual Mar 18, 2024
74bacf1
Bump follow-redirects from 1.15.5 to 1.15.6 in /future/includes/guten…
mrcasual Mar 18, 2024
30efdd2
Move shortcode security setting under the Permissions tab
mrcasual Mar 18, 2024
39350df
Standardize the capitalization of settings' names
mrcasual Mar 18, 2024
b56d20f
Pop callstack on return.
doekenorg Mar 18, 2024
36759c8
Merge branch 'develop' into issue/1382-views-in-trash
doekenorg Mar 18, 2024
a22284d
Clarify the "enable enhanced security" setting description
mrcasual Mar 18, 2024
f3f48f6
Adds an `in_trash` error status (#1740)
mrcasual Mar 18, 2024
b6de3eb
Bump version to 2.21 and update changelog
mrcasual Mar 18, 2024
9274206
Turn output buffering on when rendering Guternberg blocks
mrcasual Mar 18, 2024
68000ed
Update changelog
mrcasual Mar 18, 2024
caf7410
Fix the "creation of dynamic property X is deprecated" notices
mrcasual Mar 18, 2024
0e8aaf9
Add filter to modify search widget's Clear button parameters (#2010)
mrcasual Mar 19, 2024
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
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ workflows:
- run_php_72_unit_tests
- run_php_80_unit_tests
# - run_acceptance_tests

2 changes: 1 addition & 1 deletion assets/css/admin-global.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/admin-views.css

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions assets/css/scss/admin-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,64 @@
margin: -1px;
}
}


.gv-fields.csv-disabled {
cursor: not-allowed;

.csv-disabled-notice {
display: block;
}
.gv-field-label,
.gv-field-controls button {
color: #d7dade !important;
}

.ui-tooltip-content .gv-items-picker-container.gv-widget-picker-container & {
display: none;
}
}


/** The "Embed Shortcode" section in the Publish metabox */
.gv-shortcode {
.dashicons-editor-code {
color: #888;
left: -1px;
font-size: 20px;
line-height: 1;

html[dir=rtl] & {
left: auto;
right: -1px;
}
}

html[dir=rtl] & .code.widefat {
text-align: right;
}

position: relative;

input.code {
cursor: pointer;
}

span.copied {
display: none;
position: absolute;
top: 30px;
right: 15px;
background-color: #000;
color: #FFF;
padding: 2px 5px;
border-radius: 5px;
}

.wp-list-table & {
span.copied {
top: 3px;
right: 3px;
}
}
}
17 changes: 0 additions & 17 deletions assets/css/scss/admin-views.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1912,23 +1912,6 @@ $dialog-button-padding: 5px;
}
}

/** The "Embed Shortcode" section in the Publish metabox */
.gv-shortcode {
.dashicons-editor-code {
color: #888;
left: -1px;
font-size: 20px;
line-height: 1;
html[dir=rtl] & {
left: auto;
right: -1px;
}
}
html[dir=rtl] & .code.widefat {
text-align: right;
}
}

/** The "Direct Access" section in the Publish metabox */
#gv-direct-access:before {
font: normal 20px/1 Dashicons;
Expand Down
29 changes: 29 additions & 0 deletions assets/js/admin-shortcode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Responsible for copying the short codes from the list and edit page.
* @since 2.21
*/
( function ( $ ) {
$( document ).on( 'ready', function () {
var shortcode_clipboard = new ClipboardJS( '.gv-shortcode input.code', {
text: function ( trigger ) {
return $( trigger ).val();
}
} );

shortcode_clipboard.on('success', function (e) {
var $el = $( e.trigger ).closest( '.gv-shortcode' ).find( '.copied' );
$el.show();
setTimeout( function () {
$el.fadeOut();
}, 1000 );
});

// ClipBoardJS only listens to the `click` event, so we fake that here for `Enter`.
$( '.gv-shortcode input.code' ).on( 'keydown', function ( e ) {
if ( 'Enter' === e.key ) {
e.preventDefault();
$( this ).trigger( 'click' );
}
} );
} );
} )( jQuery );
1 change: 1 addition & 0 deletions assets/js/admin-shortcode.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 34 additions & 3 deletions assets/js/admin-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@
// bind Add Field fields to the addField method
.on( 'click', '.ui-tooltip-content .gv-fields', vcfg.startAddField )

// When user clicks into the shortcode example field, select the example.
.on( 'click', ".gv-shortcode input", vcfg.selectText )

// Show the direct access options and hide the toggle button when opened.
.on( 'click', "#gv-direct-access .edit-direct-access", vcfg.editDirectAccess )

Expand Down Expand Up @@ -2792,6 +2789,23 @@
}
} );

const $embedShortcodeEl = $( '#gv-embed-shortcode' );
$( '#gravityview_se_is_secure' ).on( 'change', function () {
let embedShortcode = $embedShortcodeEl.val();
if ( !embedShortcode ) {
return;
}

if ( $( this ).is( ':checked' ) ) {
embedShortcode = embedShortcode.replace( /]$/, ` secret="${ $embedShortcodeEl.data( 'secret' ) }"]` );

} else {
embedShortcode = embedShortcode.replace( / secret="[^"]+"/, '' );
}

$embedShortcodeEl.val( embedShortcode );
} );

// Expose globally methods to initialize/destroy tooltips and to display dialog window
window.gvAdminActions = {
initTooltips: viewConfiguration.init_tooltips,
Expand All @@ -2802,4 +2816,21 @@
$( document.body ).trigger( 'gravityview/loaded' );
} );

/**
* Handles CSV widget classes.
* @since 2.21
*/
$( function () {
const $csv_enable = $( '#gravityview_se_csv_enable' );
const update_csv_widget_classes = function () {
$( '[data-fieldid="export_link"]' )
.toggleClass( 'csv-disabled', !$csv_enable.is( ':checked' ) )
.attr( 'aria-disabled', $csv_enable.is( ':checked' ) ? 'false' : 'true' )
;
};

$csv_enable.on( 'change', update_csv_widget_classes );
update_csv_widget_classes();
} );

}(jQuery));
2 changes: 1 addition & 1 deletion assets/js/admin-views.min.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions future/includes/class-gv-entry-gravityforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class GF_Entry extends Entry implements \ArrayAccess {
*/
public static $backend = 'gravityforms';

/**
* The entry slug.
*
* @var string
*/
public $slug;

/**
* Initialization.
*/
Expand Down
5 changes: 3 additions & 2 deletions future/includes/class-gv-entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ public function get_permalink( \GV\View $view = null, \GV\Request $request = nul
* Modify the URL to the View "directory" context.
*
* @since 1.19.4
* @param string $link URL to the View's "directory" context (Multiple Entries screen)
* @param int $post_id ID of the post to link to. If the View is embedded, it is the post or page ID
*
* @param string $permalink URL to the View's "directory" context (Multiple Entries screen).
* @param int $post_id ID of the post to link to. If the View is embedded, it is the post or page ID.
*/
$permalink = apply_filters( 'gravityview_directory_link', $permalink, $request->is_view( false ) ? $view_id : ( $post ? $post->ID : null ) );

Expand Down
7 changes: 7 additions & 0 deletions future/includes/class-gv-field-internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ class Internal_Field extends Field {
*/
public $field;

/**
* The field type.
*
* @var string
*/
public $type;

/**
* Create self from a configuration array.
*
Expand Down
6 changes: 5 additions & 1 deletion future/includes/class-gv-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ public function get_label( View $view = null, Source $source = null, Entry $entr

/** A custom label is available. */
if ( ! empty( $this->custom_label ) ) {
return \GravityView_API::replace_variables( $this->custom_label, $source ? $source->form ? : null : null, $entry ? $entry->as_entry() : null );
return \GravityView_API::replace_variables(
$this->custom_label,
$source ? $source->form ?? null : null,
$entry ? $entry->as_entry() : null
);
}

return '';
Expand Down
Loading