Comments (5)
- Yep, that is correct.
- To add fields to a conditional or repeater blocks you use the same methods as you normally would but you add one parameter set to true ex:
to add a text field you use
$options_panel->addText('text_field_id',array('name'=> 'My Text ', 'std'=> 'std TEXT'));
and if you want to use it in a conditional or repeater blocks you just add true as the last parameter
$fields[] = $options_panel->addText('text_field_id',array('name'=> 'My Text ', 'std'=> 'std TEXT'));
the only difference is that the later returns the $new_field
array and the first one don't.
-
its not documented but you can pass
preview_height
andpreview_width
to the addImage method
ex:
$options_panel->addImage('image_field_id',array('name'=> 'My Image ','preview_height' => '120px', 'preview_width' => '440px'));
And if the height is an issue you can set it toauto
:)
Its the same issue i'm currently facing in the same "issue" in my other class
whats your take on that?
from admin-page-class.
You forgot to put the true
in your example above ;)
So, to be clear, both Repeater and Conditional have true
as last param?
ah, the auto height, cool!
I agree with @manfer.
The real delete result was a bit surprising for me. Especially because I did the first tests without uploading an image and grabbed them from the Library tab. Then it was like "ups, where are my images?".
Maybe this could be solved by an extra option in $config
, i.e., 'force_delete' => true // default false
- a new one
As I'm dealing with many options, I wanted the page to reload in the last edited tab -not in the first one.
Am using hashes to achieve that. What do you think?
from admin-page-class.
OMG, I wrote an extended answer an the "Comment" button evaporated with it!
---gee, I'll wait a little bit to see if it re-incarnates... will write a summary in the notepad meanwhile
from admin-page-class.
- yes.
- i actually already updated the other class with a remove meta only and a delete image by filter hook options.
- in my local development branch i have a solution based on cookies and i'll merge it later on :)
update:
4) done!
5) done!
:)
from admin-page-class.
From 1 to 5, five stars, olé!
The spam filter got my previous messages, support says I'm cleared of being a spammy suspect
from admin-page-class.
Related Issues (20)
- Doesn't work in 3.6 HOT 3
- Warnings when using the Conditional fields. HOT 1
- when field has std value its not being overridden by user's empty input HOT 5
- Editor field not working properly in Repeater Blocks HOT 2
- Create options row inside wp_options database upon activation HOT 2
- addCheckboxList iPhone style does not work HOT 1
- Does not add menu HOT 2
- feature request for use inside a theme HOT 1
- post_type argument not work on addPosts() method HOT 1
- import export not working HOT 1
- Code Editor field doesn't work on wordpress-3.8.2 fresh install
- Help Tab issue
- Google Fonts not being called HOT 1
- Don't work with php 5.2 :-(
- A LOT of issues when put on a live server.
- Add composer support
- Move to Settings API HOT 1
- Small change needed for Top menus.
- Support for wp_editor() settings in addWysiwyg() method
- Warning: count(): Parameter must be an array or an object that implements Countable HOT 1
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 admin-page-class.