Skip to content

Commit

Permalink
Shortcodes fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
moldcraft committed Jan 9, 2015
1 parent 6b24cd3 commit c2056e6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions extension/shortcodes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ For a better understanding let's look at an example:
Imagine that there is a shortcode ``demo`` located in the shortcodes extension (``framework/extensions/shortcodes/shortcodes/demo``).
When the framework loads it's files (``options.php`` for this example) it will follow these simple steps:

1. If a child theme is active it will first look in ``{your-child-theme}/framework-customizations/shortcodes/shortcodes/demo/options.php``
2. If it did not find the file in the child theme it will search in ``{your-parent-theme}/framework-customizations/shortcodes/shortcodes/demo/options.php``
1. If a child theme is active it will first look in ``{your-child-theme}/framework-customizations/extensions/shortcodes/shortcodes/demo/options.php``
2. If it did not find the file in the child theme it will search in ``{your-parent-theme}/framework-customizations/extensions/shortcodes/shortcodes/demo/options.php``
3. If it did not find the file in the parent theme it will search at the shortcode's declared path ``framework/extensions/shortcodes/shortcodes/demo/options.php``

.. _disabling-shortcodes:
Expand Down Expand Up @@ -218,7 +218,7 @@ By default, when WordPress wants to render a shortcode built into the framework,
Static file
^^^^^^^^^^^^

A shortcode can have a ``static.php`` file that is required when the shortcode is rendered.
A shortcode can have a ``static.php`` file that is included when the shortcode is rendered.
It is meant for enqueuing static files. Here is an example of a basic `static.php` file:

.. code-block:: php
Expand All @@ -236,6 +236,9 @@ It is meant for enqueuing static files. Here is an example of a basic `static.ph
$uri . '/static/js/scripts.js'
);
If you want to include custom styles and scripts for a existing shortcode, overwrite the ``static.php`` file
by creating ``framework-customizations/extensions/shortcodes/shortcodes/demo-shortcode/static.php``.

.. attention::

All of the above is valid only in the case that the ``_render`` method from the :ref:`class file <class-file>` was not overwritten.
Expand Down

0 comments on commit c2056e6

Please sign in to comment.