-
Notifications
You must be signed in to change notification settings - Fork 41
Get all form actions for usage tracking #3197
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
Merged
+33
−14
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Strategy11/formidable-forms
Length of output: 10749
🏁 Script executed:
Repository: Strategy11/formidable-forms
Length of output: 29146
🌐 Web query:
WordPress get_posts default post_status when omitted public non-public post types💡 Result:
When using the WordPress
get_posts()function, if thepost_statusargument is omitted from the input array, the function automatically assigns a default value based on the specifiedpost_type[1][2][3]. The logic applied withinget_posts()is as follows: - Ifpost_typeis set toattachment, the defaultpost_statusisinherit[1][2][4]. - For all other post types (including the defaultpost_typeofpostor any other registered custom post type), the defaultpost_statusispublish[1][5][4]. This behavior is explicitly defined in the function's source code:php if ( empty( $parsed_args['post_status'] ) ) { $parsed_args['post_status'] = ( 'attachment' === $parsed_args['post_type'] ) ? 'inherit' : 'publish'; }It is important to note thatget_posts()ultimately passes these arguments toWP_Query[1][6]. Whileget_posts()itself defaults topublish(orinherit),WP_Querymay internally handle additional statuses—such asprivate—if the current user has the appropriate capabilities to view them [7][4]. However, theget_posts()function intentionally sets these initial defaults to ensure standard public-facing behavior by default [1][4].Citations:
🏁 Script executed:
Repository: Strategy11/formidable-forms
Length of output: 11172
Include non-published actions in the snapshot.
get_posts()defaults to published posts here, so draft/private actions are skipped and the usage payload misses part of the action set. Pass an explicitpost_statusfilter that matches the inventory you want.🤖 Prompt for AI Agents