insert_page_content() actually accepts three arguments. The Tab name, then a custom blurb and finally a toggle to turn off plugins input. Placed in the brackets as such:
<?php insert_page_content( TAB, BLURB, TOGGLE); ?>
The blurb is a custom message (written in quotes) that will be displayed as default every time the tab is opened with no content, and when clicking the magnifying glass.
The toggle will stop allowing other plugins to modify that tabs content. It is on unless specifically turned off with
false. If you want it on, then do nothing.
The arguments made must be in order. So if you need to access the second or third argument without placing anything in the earlier slots just put some empty quotes
Some example usages are below.
<?php insert_page_content("logo","This space holds your logo, insert the image here.",false); ?>
<?php insert_page_content("","Place your main content in here."); ?>
<?php insert_page_content("","",false); ?>
insert_page_content() prints out the content to the page, you can also return the content back into your templates code for further processing. If no content can be found, there is a problem finding the content, or the content is empty, the following function will instead return
false. To return data use the code:
<?php return_tab_content(); ?>
There are a bunch of other tags made available to you purely for cosmetic reasons. I find them more concise and easier to remember. Just remember when distributing a template to include this plugin. Simply replace your current tags with the corresponding ones below:
<?php insert_page_header(); ?>
<?php insert_page_footer(); ?>
<?php insert_page_navigation(); ?>
Here's a nifty trick. If you want to get content from a DIFFERENT page you can! Use a
Slug->Tab syntax within quotes for your Tab name. For example:
<?php insert_page_content("gallery->sidebar"); ?>
If you omit the Tab part (eg:
"gallery->") the plugin will attempt to find the main tab of that page.
If you leave the Slug name blank and just point to the tab (eg:
"->sidebar") the plugin will look for the Tab on the current page.
This syntax also works when using
The tab names are only allowed to contain characters, numbers, underscores, spaces and dashes. If you make a tab that includes something else, it will not show up for editing.
If you double up on Tab names you will get a warning, but will still be able to use them. Useful if you really need identical data on two sections of the web page.
||][|| in your website (should be easy to do... I hope...) as that barcode-looking character combination is reserved by this plugin.
This plugin is non destructive. If you choose to remove the plugin all your saved information in all tabs will remain compressed into the default single edit box with titles defining each tab.
If you venture into the plugins code (open with a text editor) you will see a few options at the top of the page. Here you can set some default configurations if you choose, before distribution.
This plugin comes with i18n language functionality out of the box with built in languages. If you would like to add your own language, then upload the additional included files and edit the language file present.
In the provided folder is a file named
functions.php. This file is a helper for theme distributions that use this plugin. It will automatically move the plugin files to the correct location if they are placed within the Theme folder. So you can bundle all the files into one theme folder and install them all at once. To use it simply move
functions.php out of its current location and place it in the same spot as
simple_input_tabs.php. If you are distributing a theme with an existing
functions.php file, then simply rename it to
temp.functions.php and it will rename back automatically. Useful!