Skip to content

Commit

Permalink
merged options/restrictions into options/containers
Browse files Browse the repository at this point in the history
  • Loading branch information
themefuse committed Mar 7, 2015
1 parent 1d5f8b1 commit 21c625c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
25 changes: 15 additions & 10 deletions options/containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ Accepted parameters:
* ``title`` *(string)* In ``box`` and ``tab`` this is used as title. In ``group`` it's not used
* ``attr`` *(array)* HTML attributes

.. attention::

These are all the parameters that the container options supports.


A better customized container option will look like this:

.. code-block:: php
Expand All @@ -55,11 +50,6 @@ This will generate a box with a title and one option in it.

.. _box-parameters-in-post-options:

.. attention::

The ``attr`` parameter is ignored for first level boxes used in **Post Options**
because the `add_meta_box()`_ function has no possibility to specify custom attributes.

.. important::

Used in **Post Options** on the first array level, the ``box`` container accepts additional parameters:
Expand All @@ -69,5 +59,20 @@ This will generate a box with a title and one option in it.

These parameters are sent to `add_meta_box()`_ function.

Restrictions
------------

Here are some restrictions to keep in mind:

* **Post Options** array on first level can have only ``box`` containers.
* ``attr`` parameter from **Post Options** first level ``box`` containers, is not used.
Because boxes are added with `add_meta_box()`_ which has no parameter for specifying attributes.
* **Taxonomy Options** array on first level cannot have containers.

.. note::

There are no restrictions for what options are contained in the ``options`` parameter.
It's possible to create multi level options: boxes inside boxes, tabs inside boxes, tabs inside tabs, and so on.


.. include:: /links.rst.inc
1 change: 0 additions & 1 deletion options/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Options

introduction
containers
restrictions
option-width
option-types
built-in-option-types
Expand Down
16 changes: 0 additions & 16 deletions options/restrictions.rst

This file was deleted.

0 comments on commit 21c625c

Please sign in to comment.