You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document Library Pro now uses the new DataViews table and grid, and its settings pages were restructured in core 2.0.0. Please bring both into Document Library Lite.
If you're unsure how to structure anything, especially how Lite should consume dataviews-engine without bundling Pro code, check with @alessandrotesoro before you build it.
What should be free and what stays Pro-only
Free in Lite (fully working)
Everything Lite has today, including the grid, image size and content length from 1.3.0
The DataViews table and grid, replacing Simple_Document_Library and Simple_Document_Grid
Infinite scroll, with the container height setting
Multi-column sorting
Unique URLs
Sticky header and hide header
The faster indexed search and loading
The legacy frontend switch, so existing sites with custom CSS can go back to the old table
Pro-only
All filters: filter dropdowns, multi-select filters, active filters, filter counts and filters in column headers
Select all (it depends on multi-download, which is Pro)
All Design tab options, including the new search, dropdown and checkbox colors
Grid link options (grid_links, grid_document_title_link, grid_filename_link) and other link control
Everything that is already Pro: folders, preview, multi-download, caching, extra columns, single document pages, search results page and so on
How Pro-only features appear in Lite
Features people would realistically upgrade for (filters, folders, preview, multi-download, caching, design) stay visible but greyed out, with an upgrade link, as Lite does today.
Small sub-options and minor tweaks are left out completely. Showing lots of disabled minor settings makes Lite look weak.
Make sure Pro-only features can't be switched on through the shortcode either.
Implementation spec
The spec below maps every field in the new Pro settings pages and setup wizard to Free, Pro greyed or Omit. It also covers the engine architecture, shortcode args, settings migration and a QA checklist. It's meant as a starting point for your AI, not a final design. Anything marked as an open question needs Alessandro's input.
Two things to flag early:
Lite doesn't currently detect Essentials or Advanced (it checks for an old Document_Library_Pro function), so both can run on one site. With the engine that would mean duplicate REST routes and index tables.
In the DataViews frontend, filters are on unless two args are forced off, so Lite has to force them.
Full specification
Spec: DataViews frontend and new settings structure in Document Library Lite
Audience: an AI coding agent working in barn2plugins/document-library-lite. Read this whole file before writing code. Where this spec says "open question", stop and ask Alessandro (alessandrotesoro) instead of guessing.
1. Goal and sources of truth
Goal. Replace Lite's jQuery DataTables table and its separate grid with the DataViews frontend from barn2/dataviews-engine. Restructure Lite's settings pages and setup wizard so they match Document Library Pro tab by tab, section by section and field id by field id. Keep only the free feature set listed below. Keep Lite's old table behind a "legacy frontend" switch.
Settings tabs: document-library-core/src/Admin/Settings_Tab/{Display,Search,Design,Single_Document,Advanced}.php plus document-library-essentials/src/Admin/Settings_Tab/General.php.
Tab order and save sanitizing: document-library-essentials/src/Admin/Settings_Controller.php (General, Display, Search, Design, Single Document, Advanced).
Wizard: document-library-essentials/src/Admin/Wizard/Setup_Wizard.php and Steps/*.
.scoper.inc.php: php-scoper 0.18.0 prefixes everything into Barn2\Plugin\Document_Library_Essentials\Dependencies. A finder copies vendor/barn2/{document-library-core,dataviews-engine,databasepress,databasepress-orm} (*.php, *.js, *.css, *.json, *.png, *.svg, *.woff, *.woff2) and vendor/barn2/settings-api into dependencies/. Patchers:
strip the doubled Barn2 segment ({prefix}\Barn2\Data_Views becomes {prefix}\Data_Views);
rewrite engine hook names barn2_dataviews_* and posts_table_* to document_library_pro_*;
exclude Action Scheduler functions and classes from scoping.
document-library-pro.php requires vendor/autoload.php and then vendor/woocommerce/action-scheduler/action-scheduler.php before services register.
src/Plugin.php registers Document_Library_Core\Engine_Service (hooks init priority 5 and calls Engine::register( new Data_Source() )). On plugins_loaded priority 20 it calls DVE_Installer::install( 'dlp' ), which creates the index tables and queues the first index through Action Scheduler.
Data_Source config: plugin_prefixdlp, hook_prefixdocument_library_pro, rest_namespacedocument-library-pro/v1, indexed_post_typesdlp_document, searchable columns title, content, excerpt and the four document taxonomies.
Frontend JS: core builds assets/js/dataviews.js from assets/js/src/dataviews/index.js using npm @barn2plugins/dataviews (repo barn2plugins/dataviews, GPL-3.0). Handles: dlp-dataviews and dlp-dataviews-style.
Grid cards are server-rendered: Document_View::generate_card_html() uses Grid\Grid_Card.
2.2 How the legacy switch works in core (mirror this)
View_Args::parse_args() and validate_dlp_args() force legacy_frontend = false when layout = grid. Grid is DataViews only.
Query
Document_View::create_query() returns Query\Legacy_Query if legacy, else View\View_Query (indexed).
Config
Document_View::create_config_builder() returns Config_Builder (DataTables) if legacy, else Dataviews_Config_Builder.
Assets
Frontend_Scripts::load_table_scripts() enqueues dlp-dataviews or the legacy DataTables handles.
Settings UI
Fields carry legacy_frontend conditions. DataViews only: multisort, select_all, filters_display, multiselect_filters, active_filters, filter_counts, unique_urls, infinite_scroll, infinite_height. Legacy only: filters, lazy_load, accent_neutralise, diacritics_sort. Pagination fields show when legacy is on OR infinite scroll is off.
Post limit
Engine: in DataViews mode (or lazy load) a post_limit equal to the site default means unlimited.
Upgrades
Essentials update_2_0_0_enable_legacy_frontend_for_upgrades and Advanced update_4_0_0_enable_legacy_frontend_for_upgrades set legacy_frontend = '1' for existing installs. Fresh installs get DataViews.
Wizard
Table step shows lazy_load only when legacy. Filters step shows filters (legacy) or filters_display (DataViews).
2.3 Recommended shape for Lite
Do not bundle document-library-core. Consume barn2/dataviews-engine (plus databasepress, databasepress-orm, settings-api, Action Scheduler) and port only the free classes from core into Lite's own namespace. Reason: core ships every Pro feature. WordPress.org guideline 5 bans locked trialware code in a free plugin, so switching Pro code off with arg forcing is not safe. Open question 1 confirms this with Alessandro.
Scoping. Add finders for vendor/barn2/{dataviews-engine,databasepress,databasepress-orm,settings-api} to Lite's .scoper.inc.php (prefix Barn2\Plugin\Document_Library\Dependencies). Copy Essentials' "double Barn2 namespace" patcher and its Action Scheduler excludes. The hook-prefix patcher needs a decision (open question 4).
Action Scheduler. Add woocommerce/action-scheduler and load it before services, as Essentials does.
Classes to port from core into Lite (trimmed to free features):
Core class
Lite version
Trim
Engine_Service
same
drop Legacy_Column_Config unless needed for Lite's old column syntax; keep WPML only if Lite supports it today
Data_Source
Data_Source
supported_columns = Lite columns (see 3.2); taxonomies and searchable_columns = only taxonomies Lite registers (doc_categories, file_type)
View\View_Args
View\View_Args
keep link and grid props needed for free features; apply the arg policy in section 4 inside parse_args()
View\Document_View
same
legacy branch returns Lite's Simple_Document_Library path (see 2.4)
Keep Lite's. Lite's post type is not public (public => false, rewrite => false) and Lite registers only doc_categories, file_type, document_download.
2.4 Legacy switch in Lite
Add the legacy_frontend setting (Advanced tab) and shortcode arg with core's label and help text.
Legacy on + table: render Lite's existing Simple_Document_Library markup, so existing custom CSS keeps working.
Legacy on + grid: DataViews grid, same as core.
Open question 2: should Lite's legacy be Lite's own Simple_Document_Library (recommended, protects custom CSS) or core's DataTables Config_Builder?
Open question 3: should existing Lite installs start with legacy_frontend = 1 like Pro upgrades, or start on DataViews? The product owner's wording ("so existing Lite sites with custom CSS can go back") suggests DataViews by default. Pro does the opposite. Lite has no db_version option today, so detecting "existing install" needs a new marker. Check for dlp_shortcode_defaults.
2.5 Other open architecture points
Pro detection is broken.src/Plugin.php::maybe_load_plugin() checks \Barn2\Plugin\Document_Library_Pro\document_library_pro. Essentials defines Barn2\Plugin\Document_Library_Essentials\document_library_pro and Advanced defines Barn2\Plugin\Document_Library_Advanced\document_library_pro. Nothing defines the old function, including inc/aliases.php. So Lite and a paid plan can load together today. With the engine that means two dlp_document data sources and possibly the same REST namespace. Fix before release (open question 5).
Index tables and REST namespace. Reusing plugin_prefix = dlp lets an upgrade to Pro reuse the index. A separate prefix avoids clashes if both ever load (open question 6). Add the tables and options to Lite's uninstall.
Text domains. Engine strings use dataviews-engine (99) and posts-table-pro (2). Scoped copies must be re-domained to document-library-lite for wordpress.org translations.
wordpress.org source rule.@barn2plugins/dataviews lives in barn2plugins/dataviews. The built bundle needs public source or a link to it (open question 7).
REST inputs.Rest/Routes/View_Data accepts filters, sorting, search, displayMode, includeFilterCounts, pagination.pageSize. In Lite, drop includeFilterCounts. Accept filters only for search-on-click columns. Clamp pageSize to the view's rows_per_page.
3. Settings pages
3.1 Conventions
Option name: see open question 8. Recommended: the unified document-library-pro_settings (core Options::SETTINGS_KEY), written with Settings_Manager( $plugin, 'document-library-pro_settings' ), so an upgrade to Pro needs no import.
Menu: keep Lite's document_library page slug.
Free: same class, id, label, default and condition as core.
Pro greyed: field is visible and cannot be changed. settings-api has no disabled or "pro" flag. The React panel spreads attributes onto Checkbox, Checkboxes, Color, Color_Size and Button inputs, so pass [ 'disabled' => 'disabled' ] there. Labels are plain text (decodeEntities). Descriptions and section descriptions run through html-react-parser, so put the "Pro version only" link in the description. Use Lite's existing URL: wordpress-plugins/document-library-pro/?utm_source=settings&utm_medium=settings&utm_campaign=settingsinline&utm_content=dlw-settings. Never save greyed values (strip in the barn2_settings_api_{slug}_save_settings filter).
Omit: do not register the field. The runtime value is forced (section 4).
"New" = field id not present at tag 1.1.7.
Tab order: General, Display, Search, Design, Single Document, Advanced.
3.2 General tab (from Essentials Settings_Tab/General.php, not core)
#
Section
field id
label
Lite
New
Note
1
general
document_page
Document library page
Free
Lite has it today
2
general
license
License key
Omit
no license in Lite
3
document_data
document_fields
Document fields
Pro greyed
greyed in Lite today
4
document_data
document_slug
Document slug
Pro greyed
greyed today; single pages are Pro
5
version_control
version_control, version_control_mode
Enable / Replacing files
Pro greyed (section description only)
Lite shows section upsell today; Essentials does not add this section to its tab
6
frontend_submission
fronted_email_admin, fronted_moderation
Enable admin email / Enable moderation
Pro greyed (section description only)
upsell section today
7
lead_capture
lead_capture_*
(Advanced plan only)
Pro greyed (section description only)
upsell section today
3.3 Display tab (core Display.php)
#
Section (title)
field id
label
Lite
New
Note
1
display (no title)
layout
Default layout
Free
table, grid
2
table (Table)
columns
Columns
Free
Columns_Editor. Offer only Lite columns: id, title, content, image, date, doc_categories, link. Put Pro columns (excerpt, filename, file_size, file_type, doc_tags, doc_author, cf, download_count, status, date_modified, tax:*) in the description as a Pro link. The editor cannot grey single options (open question 9).
3
grid (Grid)
grid_content
Grid content
Free
changed
Core registers it twice with document_fields conditions (with and without excerpt). Lite options: image, title, excerpt (label "Excerpt/content"), doc_categories, link. Omit filename, file_type, file_size, download_count, doc_author, custom_fields (per-option disabling is not possible). Core requires at least one option (Settings_Controller validation).
4
grid
grid_links
Clickable fields
Omit
link control is Pro; minor option
5
grid
grid_columns
Number of columns
Free
autosize, 1 to 4
6
grid
grid_document_title_link
Document title
Omit
link control; Lite has no single pages
7
grid
grid_filename_link
Link destination
Omit
link control; filename field is Pro
8
sort_by (Sorting)
sort_by
Sort by
Free
Core adds name (Post slug), comment_count (Number of comments), custom (Other). Lite's legacy query allows only title, id, date, modified, menu_order, author, rand: see open question 10.
9
sort_by
sort_by_custom
Sort column
Free
shows when sort_by = custom
10
sort_by
sort_order
Sort direction
Free
11
sort_by
multisort
Multi-column sorting
Free
yes
DataViews only
12
download_button (Download button)
link_destination
Button behavior
Pro greyed
greyed today; ties to single document pages
13
download_button
link_style
Style
Free
values now button, file_icon, link
14
download_button
link_text
Button/link text
Free
hidden when file_icon
15
download_button
link_icon
Icon
Free
hidden when file_icon
16
download_button
link_target
New tab
Omit
minor link toggle
17
preview_button (Preview button)
preview
Enable preview?
Pro greyed
upgrade driver
18
preview_button
preview_style
Style
Omit
sub-option; the greyed toggle sells it
19
preview_button
preview_text
Button/link text
Omit
sub-option
20
preview_button
preview_icon
Icon
Omit
sub-option
21
multi_downloads (Multi-downloads)
multi_downloads
Allow multiple downloads?
Pro greyed
upgrade driver
22
multi_downloads
multi_download_text
Button text
Omit
sub-option
23
multi_downloads
multi_download_button
Button position
Omit
sub-option
24
multi_downloads
select_all
Select all
Omit
yes
depends on multi-download; minor
25
folders (Folders)
folders
Enable folders
Pro greyed
upgrade driver
26
folders
folders_order_by
Sort folders by
Omit
sub-option
27
folders
folder_status
Folder display
Omit
sub-option
28
folders
folder_status_custom
Custom
Omit
sub-option
3.4 Search tab (core Search.php, one section search)
Field order changed since 1.1.7. search_box moved from third to first.
#
field id
label
Lite
New
Note
1
search_box
Search box
Free
moved
Lite greys search_box today ($readonly_settings). The product owner made it free.
2
filters
Search filters
Pro greyed
legacy only condition
3
filters_display
Filter locations
Pro greyed
yes
DataViews only; options "Display filter dropdowns above the table", "Show filters in column headers"
4
filters_above
(Hidden)
Omit
yes
force false
5
filters_column
(Hidden)
Omit
yes
force false
6
filters_custom
(Filters_Editor, no label)
Omit
shows only when filters are on
7
multiselect_filters
Multi-select filters
Pro greyed
yes
distinct new capability worth showing
8
active_filters
Active filters
Omit
yes
minor display tweak of filters
9
filter_counts
Filter counts
Omit
yes
minor display tweak of filters
10
search_page
Search results
Pro greyed
greyed today; global search is a real feature
3.5 Design tab (core Design.php)
All fields are Pro. Recommended rendering: one Pro greyed panel per section (like Lite's current promo image, refreshed to show the new search, dropdown and checkbox colors) instead of about 60 disabled inputs. Do not register the fields. If Alessandro prefers disabled inputs, use the ids below in this order.
Labels written "Group: Item" are a group label on the first field and a sub-label (description slot) on the rest.
3.6 Single Document tab (core Single_Document.php, section single_document)
field id
label
Lite
Note
single_document_layout
Default layout
Pro greyed (tab promo panel)
Lite's post type is not public, so nothing here works in Lite. Keep the current promo.
single_document_layout_edit
(Button "Edit Layout")
Omit
single_document_fields
Display
Omit
registered twice in core (legacy vs block layouts)
3.7 Advanced tab (core Advanced.php)
#
Section (title)
field id
label
Lite
New
Note
1
advanced (no title)
content_length
Content length
Free
2
advanced
shortcodes
Shortcodes and media
Pro greyed
greyed today; embeds media in libraries
3
advanced
new_tab_links
Text links
Omit
Lite id was text_links_new_tab; minor link toggle
4
advanced
lightbox
Image lightbox
Free
5
advanced
unique_urls
Unique URLs
Free
yes
DataViews only
6
advanced
legacy_frontend
Frontend library
Free
yes
help: "Enable the legacy jQuery DataTables frontend"
7
table_options (Table options)
image_size
Image size
Free
8
table_options
lazy_load
Lazy load
Free
changed
now legacy only
9
table_options
accent_neutralise
Accent-insensitive search
Omit
changed
Lite id accent_insensitive; niche, legacy only
10
table_options
diacritics_sort
Diacritics sorting
Omit
changed
niche, legacy only
11
table_options
cache
Caching
Pro greyed
upgrade driver for big libraries
12
table_options
cache_expiry
Cache expires after
Omit
sub-option
13
table_options
clear_cache
Clear cache (Button)
Omit
sub-option
14
table_options
post_limit
Document limit
Omit
minor; DataViews treats the default as unlimited
15
table_options
responsive_display
Responsive display
Omit
minor; Lite offered one option only
16
pagination (Pagination)
rows_per_page
Documents per page
Free
changed
now hidden when infinite scroll is on (DataViews)
17
pagination
totals
Document total
Omit
minor position option
18
pagination
paging_type
Pagination style
Omit
minor style option
19
pagination
pagination
Pagination position
Omit
minor position option
20
pagination
page_length
Page length
Omit
minor position option
21
pagination
infinite_scroll
Infinite scroll
Free
yes
DataViews only
22
pagination
infinite_height
Container height
Free
yes
shows when infinite scroll is on
Not in any settings tab (shortcode only, all free): sticky_header, hide_header, wrap, scroll_offset, search_on_click (also stored per column by the columns editor).
3.8 Setup wizard
Pro step list (Essentials Setup_Wizard.php): License_Verification, Layout, Table (hidden), Grid (hidden), Filters (hidden), Upsell, Completed. Hidden steps are revealed by assets/js/admin/dlp-wizard-custom.js. Lite today: Welcome, Layout, Links, Behavior, Upsell, Completed. Lite already uses the setup-wizard premium => true field flag for greyed fields.
Step
field id
label
Lite
New
Note
License_Verification
Omit
keep Lite Welcome
Layout
layout
Default layout
Free
Layout
folders
Folders
Pro greyed (premium)
same as Lite today
Layout
preview
Document preview
Pro greyed (premium)
Lite has it in Links today
Table
columns
Columns
Free
changed
type document_columns replaces Lite's text field; Lite columns only
Table
multi_downloads
Multi-downloads
Pro greyed (premium)
Table
lazy_load
Lazy load
Free
changed
only when legacy
Grid
image, title, excerpt, doc_categories, link
Library content: Image, Title, Excerpt/content, Categories, Document link
Image lightbox / Documents per page / Sort by / Sort direction / Lazy load
Free
keep; move lazy_load to Table
Upsell, Completed
Free
keep Lite's
Fix while there: Lite Behavior::rows_per_page description reads "The text displayed on the button or link." (copy bug).
4. Shortcode and View_Args policy
Implement one Lite policy class, applied in Lite View_Args::parse_args() before parent::parse_args(), in Options::get_shortcode_options() and in the REST path. Stored values from a former Pro install must not switch anything on.
4.1 Accept (free)
Arg
Allowed values / note
layout
table, grid
columns (alias content)
Lite columns only; strip others
grid_content (alias content when grid)
image, title, excerpt (content maps to excerpt), doc_categories, link
grid_columns
autosize, 1 to 4; map 5 and 6 to 4
image_size, content_length, lightbox
search_box
checkbox, or top, bottom, both, false (engine accepts both)
search_on_click
bool or column list limited to doc_categories (and file_type if Lite adds the column)
link_style: button, file_icon, link. Normalize old Lite values (icon, text, button_icon, button_icon_text, icon_only) with core Options::normalize_user_arguments() logic.
doc_category, status, date_format
Lite supports these today
4.2 Force (ignore user input)
Arg
Forced value
filters
false
filters_above, filters_column
false. Required: the engine defaults filters_above = true, and View_Args::resolve_non_legacy_filters() turns filters on in DataViews mode when either is true.
Saves merge get_existing_shortcode_options() defaults, so most keys are present: link_text, lightbox, link_style, link_icon, layout, grid_columns, grid_content, image_size, rows_per_page, sort_by, sort_order, columns, content_length, lazy_load. Readonly fields are disabled, so they are never submitted.
Keep these as Lite's fresh-install defaults where they differ from core (lightbox, link_icon, rows_per_page, columns, grid_columns, date_format). Open question 13.
5.2 Mapping (Lite key to new key)
Core already does most of this. Settings_Migration::convert_legacy_shortcode_settings() reads dlp_shortcode_defaults (commit edffe07, "Fix Lite settings conversion", first in core 2.0.9). Reuse its logic; do not rewrite it.
Lite key
New key
Conversion (core helper)
layout
layout
unchanged
columns (CSV, col:Heading allowed)
columns (columns editor array)
Options::migrate_columns( $columns, $links = '', $link_destination = 'direct', $options ). Title gets link_destination = download_file; linkable columns get links = false; doc_categories gets search_on_click = true from Lite's default.
grid_content (CSV, uses content)
grid_content (selected list)
Options::normalize_grid_content() maps content to excerpt and drops unknown fields
grid_columns 1 to 6
grid_columnsautosize or 1 to 4
convert_legacy_shortcode_settings() and repair_settings() map 5 and 6 to 4
link_stylebutton, icon, text (wizard also button_icon_text, button_icon, icon_only)
link_style + link_icon + link_text
Options::migrate_link_style_settings(). If link_icon is already saved, the converter keeps the saved value.
Options::migrate_multicheckbox_settings() in update_2_0_0_migrate_settings()
dlp_document_page
document_page
update_2_0_0_migrate_settings()
dlp_misc_settings
merged into settings
update_2_0_0_migrate_settings()
5.3 Flow
On init (after post type and taxonomy registration; Advanced uses priority 17), if the unified option has no user keys and dlp_shortcode_defaults is not empty (Settings_Migration::should_import_legacy_settings()), run the conversion once.
Always run Settings_Migration::repair_settings() afterwards (grid content normalization, 5 and 6 columns to 4).
Strip Pro-only keys before saving to Lite's option.
Leave dlp_shortcode_defaults in place for rollback and for the paid plugins' own import (open question 8).
Set legacy_frontend per open question 3.
Note: handle_fresh_v2_install() in update_2_0_0_migrate_settings() recreates empty legacy options. Check that this does not trip Lite's own "existing install" check.
6. Check with Alessandro
Bundle core with Pro features switched off, or port the free classes onto the engine only (recommended, because of wordpress.org guideline 5)?
Legacy frontend in Lite: Lite's Simple_Document_Library (recommended) or core's DataTables Config_Builder?
Existing Lite installs: default legacy_frontend on (as Pro upgrades) or off?
Scoper hook patcher: rename engine hooks to document_library_pro_* (shared with Pro snippets), to Lite's document_library_*, or leave as barn2_dataviews_*?
Fix Lite's Pro detection so it recognizes Essentials and Advanced (Barn2\Plugin\Document_Library_Essentials\document_library_pro, Barn2\Plugin\Document_Library_Advanced\document_library_pro). Should the paid plans also deactivate Lite?
Reuse plugin_prefix = dlp and document-library-pro/v1 in Lite, or give Lite its own?
How will the @barn2plugins/dataviews source be made available for wordpress.org review?
Store Lite settings in document-library-pro_settings (recommended) or keep dlp_shortcode_defaults? Advanced 4.1.1 imports from dlp_shortcode_defaults only when the unified option is empty.
DocumentColumnsEditor (@barn2plugins/components) has no props to hide or disable columns or per-column settings (widths, priorities, breakpoints, column type, links, link destination). Can it take a Lite mode, or should Lite filter options server-side and ignore those settings at runtime?
sort_by values name, comment_count and custom: free in Lite, or should Lite keep its current seven?
With links and grid_links empty, do the image lightbox and search-on-click still work in DataViews? Search-on-click renders a click-to-filter link (ClickableFilterCell). Does it work while the filtering feature is disabled, and how does a user clear that filter without active_filters?
Which pagination look Lite gets with paging_type, totals, pagination and page_length omitted.
Keep Lite's own defaults on fresh installs, or adopt core's?
Design tab: promo panel per section (recommended) or about 60 disabled inputs?
Action Scheduler and the index tables in a free plugin: any objections for hosts where WP-Cron is off, and should the index notice (Admin\Index_Status_Notice) show in Lite?
7. QA acceptance checklist
Upgrade from Lite 1.3.0
A site with custom columns (including col:Heading), link_style = icon, rows_per_page = 10, lightbox = on keeps the same columns, headings, button look, page size and lightbox after upgrade.
A grid set to 5 or 6 columns shows 4 columns, and settings show "4 columns".
A grid with grid_content = image,title,content,link shows image, title, excerpt/content and link on DataViews cards.
legacy_frontend has the value agreed in open question 3; switching it on brings back the old table markup, so existing custom CSS still applies.
Layout grid with legacy on still renders the DataViews grid.
dlp_shortcode_defaults still exists after migration.
Documents are indexed (Action Scheduler job completes) and the library loads with search.
Free features (DataViews)
Table and grid, grid columns autosize and 1 to 4.
Search box on and off; search-on-click on categories filters the library and can be cleared.
Single and multi-column sorting (multisort).
Pagination with Documents per page; infinite scroll with container height (for example 500px, 70vh, calc(100vh - 200px)); an invalid height falls back to 70vh.
Unique URLs: search, sort and page are in the URL, and reloading restores them.
sticky_header, hide_header, wrap, scroll_offset work from the shortcode.
[doc_library columns="title,file_size,doc_tags,cf:foo"] shows only title.
[doc_library layout="grid" grid_content="title,filename,doc_author" grid_links="title" grid_document_title_link="single_document"] shows the title only, not linked.
A REST view-data request with includeFilterCounts or a filter on a non search-on-click column returns no counts and ignores the filter.
A settings option copied from a Pro site (filters, folders, design colors on) renders with all Pro features off and default design.
Coexistence and cleanup
Lite with Essentials or Advanced active: Lite does not load, and there are no duplicate post type, REST route or index errors.
Upgrade Lite to Essentials: Essentials shows Lite's migrated settings.
Uninstall removes Lite's index tables, scheduled actions and options (per Lite's delete-data policy).
No PHP notices with WP_DEBUG; no JS console errors on the settings page, wizard or frontend.
All new strings use the document-library-lite text domain, including scoped engine strings.
Document Library Pro now uses the new DataViews table and grid, and its settings pages were restructured in core 2.0.0. Please bring both into Document Library Lite.
If you're unsure how to structure anything, especially how Lite should consume
dataviews-enginewithout bundling Pro code, check with @alessandrotesoro before you build it.What should be free and what stays Pro-only
Free in Lite (fully working)
Simple_Document_LibraryandSimple_Document_GridPro-only
grid_links,grid_document_title_link,grid_filename_link) and other link controlHow Pro-only features appear in Lite
Implementation spec
The spec below maps every field in the new Pro settings pages and setup wizard to Free, Pro greyed or Omit. It also covers the engine architecture, shortcode args, settings migration and a QA checklist. It's meant as a starting point for your AI, not a final design. Anything marked as an open question needs Alessandro's input.
Two things to flag early:
Document_Library_Profunction), so both can run on one site. With the engine that would mean duplicate REST routes and index tables.Full specification
Spec: DataViews frontend and new settings structure in Document Library Lite
Audience: an AI coding agent working in
barn2plugins/document-library-lite. Read this whole file before writing code. Where this spec says "open question", stop and ask Alessandro (alessandrotesoro) instead of guessing.1. Goal and sources of truth
Goal. Replace Lite's jQuery DataTables table and its separate grid with the DataViews frontend from
barn2/dataviews-engine. Restructure Lite's settings pages and setup wizard so they match Document Library Pro tab by tab, section by section and field id by field id. Keep only the free feature set listed below. Keep Lite's old table behind a "legacy frontend" switch.Refs read for this spec (2026-09-17):
document-library-coreorigin/main6029236View_Args,Options,Settings_Migration,Data_Source,Document_View,Frontend_Scriptsdocument-library-core1.1.7git diff 1.1.7 origin/main -- src/Admin)dataviews-engineorigin/main45a47e1src/View/View_Args.phpdefaults and validation,src/Config/Dataviews_Config_Builder.php,Engine,DVE_Installer, REST routesdocument-library-essentialsorigin/main4608086.scoper.inc.php), service registration (src/Plugin.php),Settings_Controller, wizard steps,Update_Functionsdocument-library-advancedorigin/release/4.1.138166d2Plugin::handle_2_0_0_migrate_settings()callingshould_import_legacy_settings()andrepair_settings()settings-apiorigin/maine9290f6document-library-litemain3325b4fCopy structure from:
document-library-core/src/Admin/Settings_Tab/{Display,Search,Design,Single_Document,Advanced}.phpplusdocument-library-essentials/src/Admin/Settings_Tab/General.php.document-library-essentials/src/Admin/Settings_Controller.php(General, Display, Search, Design, Single Document, Advanced).document-library-essentials/src/Admin/Wizard/Setup_Wizard.phpandSteps/*.document-library-core/src/Engine_Service.php,src/Data_Source.php,src/View/*.2. Architecture
2.1 How the plan plugins consume the engine today
composer.json(require-dev):barn2/dataviews-engine ^1.0.10,barn2/document-library-core ^2.0.0,barn2/databasepress,barn2/databasepress-orm,barn2/settings-api ^0.5.0,barn2/setup-wizard ^1.3.0,barn2/barn2-lib ^2.4.3. Runtimerequire:woocommerce/action-scheduler ^3.9..scoper.inc.php: php-scoper 0.18.0 prefixes everything intoBarn2\Plugin\Document_Library_Essentials\Dependencies. A finder copiesvendor/barn2/{document-library-core,dataviews-engine,databasepress,databasepress-orm}(*.php, *.js, *.css, *.json, *.png, *.svg, *.woff, *.woff2) andvendor/barn2/settings-apiintodependencies/. Patchers:Barn2segment ({prefix}\Barn2\Data_Viewsbecomes{prefix}\Data_Views);barn2_dataviews_*andposts_table_*todocument_library_pro_*;document-library-pro.phprequiresvendor/autoload.phpand thenvendor/woocommerce/action-scheduler/action-scheduler.phpbefore services register.src/Plugin.phpregistersDocument_Library_Core\Engine_Service(hooksinitpriority 5 and callsEngine::register( new Data_Source() )). Onplugins_loadedpriority 20 it callsDVE_Installer::install( 'dlp' ), which creates the index tables and queues the first index through Action Scheduler.Data_Sourceconfig:plugin_prefixdlp,hook_prefixdocument_library_pro,rest_namespacedocument-library-pro/v1,indexed_post_typesdlp_document, searchable columns title, content, excerpt and the four document taxonomies.assets/js/dataviews.jsfromassets/js/src/dataviews/index.jsusing npm@barn2plugins/dataviews(repobarn2plugins/dataviews, GPL-3.0). Handles:dlp-dataviewsanddlp-dataviews-style.Document_View::generate_card_html()usesGrid\Grid_Card.2.2 How the legacy switch works in core (mirror this)
legacy_frontendcheckbox, Advanced tab, Advanced section. Engine defaultfalse.legacy_frontendis a normal view arg (boolean).View_Args::parse_args()andvalidate_dlp_args()forcelegacy_frontend = falsewhenlayout = grid. Grid is DataViews only.Document_View::create_query()returnsQuery\Legacy_Queryif legacy, elseView\View_Query(indexed).Document_View::create_config_builder()returnsConfig_Builder(DataTables) if legacy, elseDataviews_Config_Builder.Frontend_Scripts::load_table_scripts()enqueuesdlp-dataviewsor the legacy DataTables handles.legacy_frontendconditions. DataViews only:multisort,select_all,filters_display,multiselect_filters,active_filters,filter_counts,unique_urls,infinite_scroll,infinite_height. Legacy only:filters,lazy_load,accent_neutralise,diacritics_sort. Pagination fields show when legacy is on OR infinite scroll is off.post_limitequal to the site default means unlimited.update_2_0_0_enable_legacy_frontend_for_upgradesand Advancedupdate_4_0_0_enable_legacy_frontend_for_upgradessetlegacy_frontend = '1'for existing installs. Fresh installs get DataViews.lazy_loadonly when legacy. Filters step showsfilters(legacy) orfilters_display(DataViews).2.3 Recommended shape for Lite
document-library-core. Consumebarn2/dataviews-engine(plusdatabasepress,databasepress-orm,settings-api, Action Scheduler) and port only the free classes from core into Lite's own namespace. Reason: core ships every Pro feature. WordPress.org guideline 5 bans locked trialware code in a free plugin, so switching Pro code off with arg forcing is not safe. Open question 1 confirms this with Alessandro.vendor/barn2/{dataviews-engine,databasepress,databasepress-orm,settings-api}to Lite's.scoper.inc.php(prefixBarn2\Plugin\Document_Library\Dependencies). Copy Essentials' "double Barn2 namespace" patcher and its Action Scheduler excludes. The hook-prefix patcher needs a decision (open question 4).woocommerce/action-schedulerand load it before services, as Essentials does.Engine_ServiceLegacy_Column_Configunless needed for Lite's old column syntax; keep WPML only if Lite supports it todayData_SourceData_Sourcesupported_columns= Lite columns (see 3.2);taxonomiesandsearchable_columns= only taxonomies Lite registers (doc_categories,file_type)View\View_ArgsView\View_Argsparse_args()View\Document_ViewSimple_Document_Librarypath (see 2.4)View\Dataviews_Config_BuilderView\View_Query,View_Columns,View_Hooks,View_FactoryData\Data_Factory+Table_Data/*Grid\Grid_CardUtil\Options(parts)Util\Optionsget_settings,update_settings,get_shortcode_options,sanitize_grid_content,normalize_grid_content,migrate_columns,migrate_link_style_settings,migrate_multicheckbox_settings,parse_*_from_v2_columnsSettings_Migration::convert_legacy_shortcode_settings(),repair_settings()Settings_MigrationFrontend_Scripts(DataViews half)Frontend_Scriptsdataviews.jsanddataviews.cssbuilt in Lite from@barn2plugins/dataviewsassets/js/src/dataviews/index.js,assets/scss/dataviews.scsssrc/Simple_Document_Grid.php,assets/js/document-library-grid.js,assets/css/document-library-grid.css,wp_ajax_dll_load_gridinTable/Ajax_Handler.phpsrc/Simple_Document_Library.php,Table/Config_Builder.php,wp_ajax_dll_load_posts, DataTables assetssrc/Document_Library_Shortcode.phpDocument_ViewviaView_Factory::create(). Route toSimple_Document_Libraryonly whenlegacy_frontendis true andlayout = table.src/Admin/Settings.php,src/Admin/Page/Settings.php,src/Admin/Settings_Tab/*(Settings_API_Helper)Settings_Controllerbuilt onbarn2/settings-apiSettings_Manager, like Essentials.src/Admin/Wizard/Steps/*src/Util/Options.php$readonly_settings,mark_readonly_settings()src/Post_Type.php,src/Taxonomies.phppublic => false,rewrite => false) and Lite registers onlydoc_categories,file_type,document_download.2.4 Legacy switch in Lite
legacy_frontendsetting (Advanced tab) and shortcode arg with core's label and help text.Simple_Document_Librarymarkup, so existing custom CSS keeps working.Simple_Document_Library(recommended, protects custom CSS) or core's DataTablesConfig_Builder?legacy_frontend = 1like Pro upgrades, or start on DataViews? The product owner's wording ("so existing Lite sites with custom CSS can go back") suggests DataViews by default. Pro does the opposite. Lite has nodb_versionoption today, so detecting "existing install" needs a new marker. Check fordlp_shortcode_defaults.2.5 Other open architecture points
src/Plugin.php::maybe_load_plugin()checks\Barn2\Plugin\Document_Library_Pro\document_library_pro. Essentials definesBarn2\Plugin\Document_Library_Essentials\document_library_proand Advanced definesBarn2\Plugin\Document_Library_Advanced\document_library_pro. Nothing defines the old function, includinginc/aliases.php. So Lite and a paid plan can load together today. With the engine that means twodlp_documentdata sources and possibly the same REST namespace. Fix before release (open question 5).plugin_prefix = dlplets an upgrade to Pro reuse the index. A separate prefix avoids clashes if both ever load (open question 6). Add the tables and options to Lite's uninstall.dataviews-engine(99) andposts-table-pro(2). Scoped copies must be re-domained todocument-library-litefor wordpress.org translations.@barn2plugins/dataviewslives inbarn2plugins/dataviews. The built bundle needs public source or a link to it (open question 7).Rest/Routes/View_Dataacceptsfilters,sorting,search,displayMode,includeFilterCounts,pagination.pageSize. In Lite, dropincludeFilterCounts. Acceptfiltersonly for search-on-click columns. ClamppageSizeto the view'srows_per_page.3. Settings pages
3.1 Conventions
document-library-pro_settings(coreOptions::SETTINGS_KEY), written withSettings_Manager( $plugin, 'document-library-pro_settings' ), so an upgrade to Pro needs no import.document_librarypage slug.attributesonto Checkbox, Checkboxes, Color, Color_Size and Button inputs, so pass[ 'disabled' => 'disabled' ]there. Labels are plain text (decodeEntities). Descriptions and section descriptions run throughhtml-react-parser, so put the "Pro version only" link in the description. Use Lite's existing URL:wordpress-plugins/document-library-pro/?utm_source=settings&utm_medium=settings&utm_campaign=settingsinline&utm_content=dlw-settings. Never save greyed values (strip in thebarn2_settings_api_{slug}_save_settingsfilter).3.2 General tab (from Essentials
Settings_Tab/General.php, not core)generaldocument_pagegenerallicensedocument_datadocument_fieldsdocument_datadocument_slugversion_controlversion_control,version_control_modefrontend_submissionfronted_email_admin,fronted_moderationlead_capturelead_capture_*3.3 Display tab (core
Display.php)display(no title)layouttable(Table)columnsColumns_Editor. Offer only Lite columns:id,title,content,image,date,doc_categories,link. Put Pro columns (excerpt,filename,file_size,file_type,doc_tags,doc_author,cf,download_count,status,date_modified,tax:*) in the description as a Pro link. The editor cannot grey single options (open question 9).grid(Grid)grid_contentdocument_fieldsconditions (with and withoutexcerpt). Lite options:image,title,excerpt(label "Excerpt/content"),doc_categories,link. Omitfilename,file_type,file_size,download_count,doc_author,custom_fields(per-option disabling is not possible). Core requires at least one option (Settings_Controllervalidation).gridgrid_linksgridgrid_columnsautosize,1to4gridgrid_document_title_linkgridgrid_filename_linksort_by(Sorting)sort_byname(Post slug),comment_count(Number of comments),custom(Other). Lite's legacy query allows onlytitle, id, date, modified, menu_order, author, rand: see open question 10.sort_bysort_by_customsort_by = customsort_bysort_ordersort_bymultisortdownload_button(Download button)link_destinationdownload_buttonlink_stylebutton,file_icon,linkdownload_buttonlink_textfile_icondownload_buttonlink_iconfile_icondownload_buttonlink_targetpreview_button(Preview button)previewpreview_buttonpreview_stylepreview_buttonpreview_textpreview_buttonpreview_iconmulti_downloads(Multi-downloads)multi_downloadsmulti_downloadsmulti_download_textmulti_downloadsmulti_download_buttonmulti_downloadsselect_allfolders(Folders)foldersfoldersfolders_order_byfoldersfolder_statusfoldersfolder_status_custom3.4 Search tab (core
Search.php, one sectionsearch)Field order changed since 1.1.7.
search_boxmoved from third to first.search_boxsearch_boxtoday ($readonly_settings). The product owner made it free.filtersfilters_displayfilters_abovefalsefilters_columnfalsefilters_custommultiselect_filtersactive_filtersfilter_countssearch_page3.5 Design tab (core
Design.php)All fields are Pro. Recommended rendering: one Pro greyed panel per section (like Lite's current promo image, refreshed to show the new search, dropdown and checkbox colors) instead of about 60 disabled inputs. Do not register the fields. If Alessandro prefers disabled inputs, use the ids below in this order.
design(no title)table_design(Table)table_design(Design),default_table_template(Default table template),external_border(Borders: External),header_border(Header),border_horizontal_cell(Horizontal),border_vertical_cell(Vertical),border_bottom(Bottom),header_bg(Background colors: Header),body_bg(Main),body_bg_alt(Alternative),button_bg(Button),button_disabled_bg(Disabled button),button_bg_hover(Button hover),header_text(Fonts: Header),body_text(Main text),button_font(Button),disabled_button_font(Disabled button),hyperlink_font(Hyperlink),cell_backgrounds(Cell backgrounds),table_corner_style(Corner style),text_background(Search: Background),text_font(Font),text_border(Border),dropdown_background(Dropdown: Background),dropdown_font(Font),dropdown_border(Border),checkboxes_border(Checkboxes: Border),table_spacing(Spacing),reset_table_settings(Reset to the default)text_background,text_font,text_border,checkboxes_bordergrid_design(Grid)grid_design(Design),default_grid_template(Default grid template),grid_image_bg(Background colors: Document image),grid_button_background(Button),grid_button_background_hover(Button hover),grid_card_background(Grid card),grid_category_bg(Category badge),grid_body_text(Fonts: Main text),grid_hyperlink_font(Hyperlink),grid_button_font(Button),grid_card_border(Borders: Grid card),grid_button_border(Button),grid_search_bg(Search: Background),grid_search_color(Font),grid_search_border(Border),grid_dropdown_bg(Dropdown: Background),grid_dropdown_color(Font),grid_dropdown_border(Border),grid_checkboxes_border(Checkboxes: Border),grid_corner_style(Corner style),reset_grid_settings(Reset to the default)grid_search_bg,grid_search_color,grid_search_border,grid_dropdown_bg,grid_dropdown_color,grid_checkboxes_borderfolder_design(Folders)folder_design(Design),folder_icon_color(Top-level Folder color),folder_icon_subcolor(Sub-level folder color),folder_icon_svg_closed(Closed folder icon),folder_icon_svg_open(Open folder icon)Labels written "Group: Item" are a group label on the first field and a sub-label (description slot) on the rest.
3.6 Single Document tab (core
Single_Document.php, sectionsingle_document)single_document_layoutsingle_document_layout_editsingle_document_fields3.7 Advanced tab (core
Advanced.php)advanced(no title)content_lengthadvancedshortcodesadvancednew_tab_linkstext_links_new_tab; minor link toggleadvancedlightboxadvancedunique_urlsadvancedlegacy_frontendtable_options(Table options)image_sizetable_optionslazy_loadtable_optionsaccent_neutraliseaccent_insensitive; niche, legacy onlytable_optionsdiacritics_sorttable_optionscachetable_optionscache_expirytable_optionsclear_cachetable_optionspost_limittable_optionsresponsive_displaypagination(Pagination)rows_per_pagepaginationtotalspaginationpaging_typepaginationpaginationpaginationpage_lengthpaginationinfinite_scrollpaginationinfinite_heightNot in any settings tab (shortcode only, all free):
sticky_header,hide_header,wrap,scroll_offset,search_on_click(also stored per column by the columns editor).3.8 Setup wizard
Pro step list (Essentials
Setup_Wizard.php):License_Verification,Layout,Table(hidden),Grid(hidden),Filters(hidden),Upsell,Completed. Hidden steps are revealed byassets/js/admin/dlp-wizard-custom.js. Lite today:Welcome,Layout,Links,Behavior,Upsell,Completed. Lite already uses the setup-wizardpremium => truefield flag for greyed fields.Welcomelayoutfolderspremium)previewpremium)Linkstodaycolumnsdocument_columnsreplaces Lite's text field; Lite columns onlymulti_downloadspremium)lazy_loadimage,title,excerpt,doc_categories,linkgrid_contenttext fieldfilename,file_type,file_size,download_count,doc_author,custom_fieldsgrid_linksgrid_columnsfilters/filters_displaypremium)filters_customlink_text,link_stylelink_styleoptions tobutton,file_icon,linkpluslink_iconlightbox,rows_per_page,sort_by,sort_order,lazy_loadlazy_loadto TableFix while there: Lite
Behavior::rows_per_pagedescription reads "The text displayed on the button or link." (copy bug).4. Shortcode and View_Args policy
Implement one Lite policy class, applied in Lite
View_Args::parse_args()beforeparent::parse_args(), inOptions::get_shortcode_options()and in the REST path. Stored values from a former Pro install must not switch anything on.4.1 Accept (free)
layouttable,gridcolumns(aliascontent)grid_content(aliascontentwhen grid)image,title,excerpt(contentmaps toexcerpt),doc_categories,linkgrid_columnsautosize,1to4; map5and6to4image_size,content_length,lightboxsearch_boxtop,bottom,both,false(engine accepts both)search_on_clickdoc_categories(andfile_typeif Lite adds the column)sort_by,sort_order,multisortrows_per_page(aliasdocs_per_page),post_limit(aliasdoc_limit)post_limitstays shortcode-onlyinfinite_scroll,infinite_heightwrap,scroll_offset,sticky_header,hide_headerunique_urls,legacy_frontendlazy_loadlink_style,link_text,link_iconlink_style:button,file_icon,link. Normalize old Lite values (icon,text,button_icon,button_icon_text,icon_only) with coreOptions::normalize_user_arguments()logic.doc_category,status,date_format4.2 Force (ignore user input)
filtersfalsefilters_above,filters_columnfalse. Required: the engine defaultsfilters_above = true, andView_Args::resolve_non_legacy_filters()turns filters on in DataViews mode when either is true.filters_custom''multiselect_filters,active_filters,filter_countsfalsefoldersfalse(and allfolder_*)previewfalse(andpreview_style,preview_text,preview_icon)multi_downloads,select_allfalsecachefalseshortcodesfalselink_destinationdownload_filelink_target,new_tab_linksfalsedocument_linktruelinks,grid_links''(open question 11: confirm the image lightbox and search-on-click still work with no link columns)grid_document_title_link,grid_filename_link,table_document_title_link,table_filename_linknoneaccent_neutralise,diacritics_sortfalseresponsive_displaychild_rowpaging_type,totals,pagination,page_lengthnumbers,bottom,bottom,bottom), open question 12widths,priorities,column_breakpoints,column_type,auto_width,responsive_control,date_columns,show_footer,reset_button,button_text,no_posts_message,no_posts_filtered_message,excerpt_length,show_hidden_columns,numeric_termscategory,exclude_category,tag,term,exclude_term,cf,year,month,day,author,exclude,include,search_term,doc_tag,doc_author,exclude_doc_categorydoc_tagsanddoc_authortaxonomies are not registered in Lite)post_typedlp_document(as coreData_Source::get_default_args())5. Settings migration
5.1 What Lite stores today
dlp_shortcode_defaultsget_existing_shortcode_options()defaults, so most keys are present:link_text,lightbox,link_style,link_icon,layout,grid_columns,grid_content,image_size,rows_per_page,sort_by,sort_order,columns,content_length,lazy_load. Readonly fields are disabled, so they are never submitted.dlp_document_fieldseditor,excerpt,thumbnail,commentsmapdlp_document_pagedlp_misc_settingscache_expiry, disabled)Lite defaults (
Options::get_default_settings()):link_textDownload,lightboxfalse,link_stylebutton,link_iconfalse,layouttable,grid_columns4,grid_contentimage,title,content,link,image_size70x70,rows_per_page20,sort_bydate,sort_order'',columnsid,title,content,image,date,doc_categories,link,doc_category'',content_length15,statuspublish,date_formatY/m/d,search_on_clicktrue,wraptrue,scroll_offset15,post_limit500,offset0,lazy_loadfalse.Keep these as Lite's fresh-install defaults where they differ from core (
lightbox,link_icon,rows_per_page,columns,grid_columns,date_format). Open question 13.5.2 Mapping (Lite key to new key)
Core already does most of this.
Settings_Migration::convert_legacy_shortcode_settings()readsdlp_shortcode_defaults(commit edffe07, "Fix Lite settings conversion", first in core 2.0.9). Reuse its logic; do not rewrite it.layoutlayoutcolumns(CSV,col:Headingallowed)columns(columns editor array)Options::migrate_columns( $columns, $links = '', $link_destination = 'direct', $options ). Title getslink_destination = download_file; linkable columns getlinks = false;doc_categoriesgetssearch_on_click = truefrom Lite's default.grid_content(CSV, usescontent)grid_content(selected list)Options::normalize_grid_content()mapscontenttoexcerptand drops unknown fieldsgrid_columns1 to 6grid_columnsautosizeor 1 to 4convert_legacy_shortcode_settings()andrepair_settings()map5and6to4link_stylebutton,icon,text(wizard alsobutton_icon_text,button_icon,icon_only)link_style+link_icon+link_textOptions::migrate_link_style_settings(). Iflink_iconis already saved, the converter keeps the saved value.link_text,link_iconlinkskey in Lite)grid_links = '',grid_document_title_link = none,grid_filename_link = nonelinksis emptylink_destination)link_destination = download_filedirectlightbox,image_size,content_length,rows_per_page,sort_by,sort_order,lazy_load'1'/'0'(update_2_0_0_migrate_settings()loop)search_on_click,wrap,scroll_offset,post_limit,date_format,status,doc_category,offsetoffsettext_links_new_tab,accent_insensitive,custom_filters,search_results_pagedlp_document_fieldsmapdocument_fieldslistOptions::migrate_multicheckbox_settings()inupdate_2_0_0_migrate_settings()dlp_document_pagedocument_pageupdate_2_0_0_migrate_settings()dlp_misc_settingsupdate_2_0_0_migrate_settings()5.3 Flow
init(after post type and taxonomy registration; Advanced uses priority 17), if the unified option has no user keys anddlp_shortcode_defaultsis not empty (Settings_Migration::should_import_legacy_settings()), run the conversion once.Settings_Migration::repair_settings()afterwards (grid content normalization, 5 and 6 columns to 4).dlp_shortcode_defaultsin place for rollback and for the paid plugins' own import (open question 8).legacy_frontendper open question 3.handle_fresh_v2_install()inupdate_2_0_0_migrate_settings()recreates empty legacy options. Check that this does not trip Lite's own "existing install" check.6. Check with Alessandro
Simple_Document_Library(recommended) or core's DataTablesConfig_Builder?legacy_frontendon (as Pro upgrades) or off?document_library_pro_*(shared with Pro snippets), to Lite'sdocument_library_*, or leave asbarn2_dataviews_*?Barn2\Plugin\Document_Library_Essentials\document_library_pro,Barn2\Plugin\Document_Library_Advanced\document_library_pro). Should the paid plans also deactivate Lite?plugin_prefix = dlpanddocument-library-pro/v1in Lite, or give Lite its own?@barn2plugins/dataviewssource be made available for wordpress.org review?document-library-pro_settings(recommended) or keepdlp_shortcode_defaults? Advanced 4.1.1 imports fromdlp_shortcode_defaultsonly when the unified option is empty.DocumentColumnsEditor(@barn2plugins/components) has no props to hide or disable columns or per-column settings (widths, priorities, breakpoints, column type, links, link destination). Can it take a Lite mode, or should Lite filter options server-side and ignore those settings at runtime?sort_byvaluesname,comment_countandcustom: free in Lite, or should Lite keep its current seven?linksandgrid_linksempty, do the image lightbox and search-on-click still work in DataViews? Search-on-click renders a click-to-filter link (ClickableFilterCell). Does it work while the filtering feature is disabled, and how does a user clear that filter withoutactive_filters?paging_type,totals,paginationandpage_lengthomitted.Admin\Index_Status_Notice) show in Lite?7. QA acceptance checklist
Upgrade from Lite 1.3.0
col:Heading),link_style = icon,rows_per_page = 10,lightbox = onkeeps the same columns, headings, button look, page size and lightbox after upgrade.grid_content = image,title,content,linkshows image, title, excerpt/content and link on DataViews cards.legacy_frontendhas the value agreed in open question 3; switching it on brings back the old table markup, so existing custom CSS still applies.dlp_shortcode_defaultsstill exists after migration.Fresh install
Free features (DataViews)
multisort).500px,70vh,calc(100vh - 200px)); an invalid height falls back to70vh.sticky_header,hide_header,wrap,scroll_offsetwork from the shortcode.Pro features stay off
[doc_library filters="true" filters_above="true" filters_column="true" multiselect_filters="true" active_filters="true" filter_counts="true"]shows no filters.[doc_library folders="true" preview="true" multi_downloads="true" select_all="true" cache="true" shortcodes="true"]shows none of these.[doc_library columns="title,file_size,doc_tags,cf:foo"]shows only title.[doc_library layout="grid" grid_content="title,filename,doc_author" grid_links="title" grid_document_title_link="single_document"]shows the title only, not linked.view-datarequest withincludeFilterCountsor a filter on a non search-on-click column returns no counts and ignores the filter.Coexistence and cleanup
WP_DEBUG; no JS console errors on the settings page, wizard or frontend.document-library-litetext domain, including scoped engine strings.