I know that if they use do_shortcode wrapper, then it is possible to nest the shortcodes, however, codex says :
"Although the parser will fail if the shortcode macro is used to do another macro of the same name:"
Is there a way around this?
For example, if I have a shortcode to create a div:
some content in [div] div [/ div] I want to be able to use:
[div] [div] a nested div [/ div] [/ div]
But this standard will fail with the do_shortcode wrapper.
I have a duplicate of the shortcode attached to _parent attached to my temporary outline name, but I have not created div_parent1, div_parent2 etc. only from the Nest 1 level depth ...
If you are writing a shortcut then there is a simple solution that you can write several shortcodes that call the same function. I have shortcodes to create HTML blocks such as divs, and many such names such as div, block1, block2 add_shortcode ('div', 'devondev_block'); Add_shortcode ('block', 'devondev_block'); Add_shortcode ('block2', 'devondev_block'); They all call the same function. They can be nested until you remember to use different short codes.
WordPress short code support is only suffixed with trying to parsing with regex, it is possible to do this type of parsing with a mixture of reggaeks, a finite state machine, and a stack. This approach can control nesting and can be very fast, especially when there are very few shortcodes every time I encounter it, I have to try.
Popular posts from this blog
I tried to create a new database in my project, but when I run the script, I get this error, I have another project, this type of definition worked before, but now it gets a single error. I am using Python 2.7.8 and the version of SQLAlchemy module is 0.9.8. By the way, using a project flask- SQLAlchemy, it works well, I'm confused. Traceback information is as follows: Traceback (most recent call final): File "D: / Projects / IOM / db_create.py", line 4, & lt; Module & gt; From the models the base file "D: \ Projects \ OO-IM \ models.py", in line 15, in the & lt; Module & gt; Column ( 'followed_id', int (), ForeignKey ( 'user.id')) file "C: \ Python27 \ lib \ site-packages \ SQLAlchemy \ SQL \ schema.py", line 369, __new__ schema = metadata. Schema file "C: \ Python27 \ lib \ site-packages \ SQLAlchemy \ SQL \ elements.py", line 662, AttributeError in __getattr__ key): Neither 'column' object nor ...
I use Eners to be hibernate to audit my institutions. I have an audit entity, Foo , which includes a list & lt; Bars & gt; However, I do not want to audit the bar institutions, in the form of properties, I have written that: @inti @edicated public class Foo {@JoinTable (name = "T_FOO_BAR", joinColumns = @JoinColumn (name = "FOO_ID"), inverseJoinColumns = @JoinColumn (Name = "BAR_ID")) @ManyToMany (Cascade = Persist) @ Indited (targetAuditMode = RelationTargetAuditMode.NOT_AUDITED ) Public listing & lt; Bars & gt; GetBars () {Return bars; }} Now, I want to retrieve an amendment of foo : AuditReader reader = AuditReaderFactory.get (GetEntityManager ()); FU modification = (FU) reader.CreativeTeA () .entensEtrevision (Foo Class, 42) .getSingleResult (); Unfortunately, when I want to retrieve all the data (i.e. when it loads lazy times ), error me ORA-00942: table or view is not present , because Tried to query this: Sel...
While pagging my user model in kppp, I can sort with some values, but not others. For example, I can order results from created or email , for example, but username or reputation seems to come back order by arbitrary command for example with a list of users: $ this-> paginate = array ('condition' => array ( 'User.is_active' = & gt; true), 'border' => 24, 'order' => array ('User.created' => DESC)); Works as expected, but $ this - & gt; Paged = array ('conditions' = & gt; array (' user.isIactive '= & gt; true),' border '= & gt; 24,' command '= & gt; array (' user repeats' = ' & Gt; DESC ')); No, no. I first thought that this could be a database issue, but when I search the database directly, sorted as expected. Note: I am using Mangodebi with the Mongo DB plugin of Ichikawa for the KPPHP; Pagnetizing users are used to work properl...
Comments
Post a Comment