Forum Replies Created
-
AuthorPosts
-
JasonKeymasterAnd, to clarify, when I say “not work” I mean that the validation never fails.
JasonKeymasterDecember 4, 2014 at 8:44 pm in reply to: Anchor button doesn't work for editor inside of group #2963
JasonKeymasterThis reply has been marked as private.December 3, 2014 at 4:45 pm in reply to: Anchor button doesn't work for editor inside of group #2943
JasonKeymasterHi Steve,
Sorry for the mixture of notes. 🙂
After some research, I realized that the wp_editor function relies on the ‘textarea_name’ to save to the settings. So while setting it to something simple fixes the editor issue, it breaks the editor actually saving to the database (a rather bittersweet victory).
I believe the final issue is that I’ve made a habit of using hyphens in database names. Normally this isn’t an issue, but I believe that wp_editor is attempting to build javascript variables based on the id and textarea_name, which is why hyphens cause issues.
As for a fix? I believe that’s really a wp_editor bug, so I’d just put a note in the docs to avoid using hyphens when dealing with the editor field.
December 3, 2014 at 3:32 pm in reply to: Anchor button doesn't work for editor inside of group #2940
JasonKeymasterOk.. so I’ve found that Piklist uses the textarea_name in order to know where to save the field. I’ll let you guys take it from here since I’m not sure how you’re using the textarea_name to save properly.
December 3, 2014 at 3:06 pm in reply to: Anchor button doesn't work for editor inside of group #2939
JasonKeymasterI believe I figured out the issue, and it’s the default ‘textarea_name’ that Piklist derives from the $name and $_attributes variables. I believe it’s an illegal characters issue, as the name would then include hyphens, spaces, and equal signs.
If I include a ‘textarea_name’ in the field options, it fixes the issue.
December 3, 2014 at 2:46 pm in reply to: Anchor button doesn't work for editor inside of group #2938
JasonKeymasterAs far as the ‘textarea_rows’ issue goes, I was looking at the editor.php code and realized you’re using ‘editor_height’. I’m not exactly sure why. If I use that in the field properties instead of textarea_rows, then I’m able to adjust the height properly. I tried omitting ‘editor_height’ from the default options and using ‘textarea_rows’ instead, but for some reason that didn’t work.
December 3, 2014 at 2:05 pm in reply to: Anchor button doesn't work for editor inside of group #2935
JasonKeymasterSo here’s what I did:
wp_editor('', 'test_editor', array( 'media_buttons' => false, 'teeny' => true, 'wpautop' => false, 'quicktags' => false )); piklist('field', array( 'type' => 'editor', 'field' => 'test_field', 'label' => 'Test Editor', 'options' => array( 'media_buttons' => false, 'teeny' => true, 'wpautop' => false, 'quicktags' => false ) ));I also tested using an underscore instead of hyphen in the field name, as I assumed you’re getting the editor id from the field and I read that hyphens can cause problems (which I usually use in field names).
On a side note, I can’t get ‘textarea_rows’ to work with Piklist, either, but it works just fine with the native function.
The conclusion, though, is that there’s an issue with Piklist. I had no anchor issues with the native wp_editor function.
December 3, 2014 at 12:58 pm in reply to: Anchor button doesn't work for editor inside of group #2933
JasonKeymasterGreetings!
I found that if ‘quicktags’ => false then the anchor button stops working again. If true, then no problem. The strong and other buttons continue working fine in either case.
JasonKeymasterHmm.. I’ll have to look around to find what array parameters I can pass to ‘tinymce’.
As a side note, setting ‘tinymce’ => false causes a javscript error:
piklist.js:254 Uncaught ReferenceError: tinymce is not definedDecember 3, 2014 at 12:29 pm in reply to: Anchor button doesn't work for editor inside of group #2930
JasonKeymasterIt did! Perfect!
JasonKeymasterHi igor!
Rather than changing subject in a topic, I suggest making a new topic to help make your question easy for others to find in the future. 🙂
But you can do this easily! I do it all the time! What you’re going to want to do is enqueue the Select2 script into the admin side only. Everything on how to do that can be found here: http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
And you can use a CDN url for Select2 instead of downloading the script and adding it to your theme/plugin.
Hope this helps! 🙂
JasonKeymasterHmm.. I see. Clearly it’s more important that the columns add up to 12 per row than I realized. I assumed it would just cleanly float beyond that point. It usually does, but this isn’t the first time I’ve ran into issues.
It’s not quite what I had in mind, however, but I’m not really sure that’s up to Piklist to solve. I was imagining that each group would indent as it nested. As it is, I could just apply my own styles to provide padding above the group label to help distinguish sections better.
Thanks, Steve!
JasonKeymasterThere’s 3 fields: 10 + (5 + 5)
That would normally just mean the first field is on it’s own row and the last two fields are on a row. If I settle everything down to a single group (remove the nesting) then the columns work just fine.
Thoughts?
November 10, 2014 at 12:56 pm in reply to: Custom Post Type archives and posts giving a 404. Piklist bug? #2731
JasonKeymasterHahah! I’m just sharing my heart. 😉
-
AuthorPosts