Comments (4)
@fjarrett Unfortunately there is no way of keeping track of either option name nor the option group labels, those values ( names ) are stored without being associated to labels. So nothing can be done to fix this since the display of those fields is managed separately, and mostly hard-coded. And it kinda messes up the view.
What i'm thinking now is to have a hard-coded list of WP default options, and do a translation of the option name of others ( registered by plugins/themes ) which would probably not work most of the times.
from stream.
@shadyvb OK yeah good idea. For now, let's just hard-code a list of all default values.
from stream.
Yeah, so in the general case, the label would be stored in $wp_settings_fields[$page][$section][]['title']
. It could be linked to an input by looking at $wp_settings_fields[$page][$section][]['args']['label_for']
… but, there's no guarantee that the label_for
is supplied, such as when the field is some radio buttons. Even if it was supplied, some messy HTML parsing would be needed to try to find the underlying input
which has the id
corresponding with the label_for
and then matching up the name
with the incoming POST data to identify the option name. Yeah. Not going to work.
There should be an API to register the stream label for any option saved. Connectors would come with a suite of such API calls.
from stream.
/cc @powelski
from stream.
Related Issues (20)
- Vulnerability in 3.9.2 HOT 4
- "Comment author" field is displayed incorrectly for comment moderation actions
- WP-CLI stream query fatal error: array_key_exists() must be of type array HOT 1
- PHP 8.1: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
- PHP Error accessing user in wp cli triggered update
- PHP Fatal error: Uncaught ValueError w/ Yosat SEO HOT 5
- PHP 8.1 Constant WP_Stream\FILTER_SANITIZE_STRING is deprecated HOT 5
- Gravity Forms - Error Saving form HOT 2
- PHP Warnings/Notices on Gravity Forms note added
- Improve event source IP reporting HOT 1
- Rely on WP.org localization tooling
- 3.10.0 missing from Packagist HOT 3
- Dynamic callback function name cannot include hyphens HOT 6
- CLI: PHP Uncaught TypeError HOT 1
- Export stops at 10,000 items HOT 2
- Item count above table cuts off commas when updated via JS
- All commands return "Error: SITE IS DISCONNECTED"
- Revise the `autoload` value
- ACF Options page updates not being recorded
- Plugin Updates via WP Cron in Custom Plugin Not Logging Plugin Updates in Stream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream.