(2012-11-11, 06:18:19)jason.dixon.email Wrote: The empty paragraph is intentional. Otherwise you end up typing in Header 1 size after deleting everything.
Maybe.
(2012-11-11, 06:18:19)jason.dixon.email Wrote: You can turn off the content not found error currently. ... I'll need to make sure that it doesn't save that default text though.
A saved empty tab is pre-filled with the default text (either the plugin built-in default or the optional parameter) on next edit and, yes, it's saved and rendered.
(2012-11-11, 06:18:19)jason.dixon.email Wrote: I'll check that out. If it outputs nothing (ie no error) though, isn't that enough to get a true/false reading?No output doesn't necessarily give false: I have come unstuck with GS when an empty array was returned, for example. No output, but not nothing returned.
EDIT: You can use return_tab_content("tabname"); to get the content already. I imagine this would also work to check if content exists or not:
Code:<?php if(return_tab_content("mytab")){ echo "Content exists!"; } else { echo "There is no content."; } ?>
In fact, (return_tab_content( ... )) on an empty tab returns the string "There was a problem with your Tab request.", which is, of course, True.
One other snag I found today, is that this code breaks SIT:
PHP Code:
<?php insert_page_content('tabone');
insert_page_content('tabtwo'); ?>
Only the first instance is recognised. This alternative works as expected:
PHP Code:
<?php insert_page_content('tabone'); ?>
<?php insert_page_content('tabtwo'); ?>
Also, SIT does not understand PHP comments, so this will still show a tab:
PHP Code:
<?php //insert_page_content('tabone'); ?>
In a combination of these points, this will show tab tabone, but not tabtwo:
PHP Code:
<?php //insert_page_content('tabone');
insert_page_content('tabtwo'); ?>
That nearly drove me round the bend before I found out !
(2012-11-11, 23:10:01)Timbow Wrote: I am really looking forward to trying this plugin out. Is version 1.x pretty much in it's final form now, tested, approved and recommended?
It's a good idea and it's entirely usable right now. It will improve with a bit of maturity, no doubt.
--
Nick.
Nick.