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
नक्शा = नया बफर्ड इमेज [चौड़ाई] [ऊंचाई]; के लिए (int i = 0; i & lt; height; i ++) {for (int j = 0; j & lt; चौड़ाई; j ++) {if (charMap [j] [i] == पर्वत। इंडेंटफार्म) {if (j + 1 & lt ; चौड़ाई और amp; amp; j-1 & gt; = 0) {if (charMap [j-1] [i]! = पर्वत। इंडेंटिफ़ायर & amp; amp; & amp; amp; charMap [j + 1] [i]! = पर्वत। इंडेंटफार्म) {नक्शा [जे] [आई] = टाइल ग्रिड [1] [10]; }} और {नक्शा [जे] [आई] = टाइल ग्रिड [8] [10]; }}} यह कोड है जिसे मैं सेल के चारों ओर प्रत्येक टाइल को चेक करके 2 डी सर की जांच करने के लिए उपयोग कर रहा हूं लेकिन मुझे लगता है कि किसी को भी सोच रहा हूँ मदद कर सकता है? मुझे संदेह है कि आपको NullPointerException को charMap [j] से प्राप्त हो रहा है [ I] == पर्वत। इंडेंटिफ़ायर लाइन। सुनिश्चित करें कि आप ज्योफ द्वारा सुझाए गए दोनों मानचित्रों के लिए आंतरिक सरणियों को प्रारंभ करते हैं।
I am currently working on a school project and I think that is to gather some problems with the MPEG file I The scope of my project is: 1) Split the MPEG file into pieces of many fixed sizes. 2) Collecting some of them and leaving some part. Problem 1: When I run the file in the media player, it will play the video until it reaches that segment which I left Give it Example: Chunk = ["yui_1", "yui_2", "yui_3", "yui_5", "yui_6"] Duration of each segment: 1 second * If you think I have left the "yui_4" section. * If I went to collect all the parts except "yui_4", then the video will play the first 2 seconds before being hanged throughout the period. Problem 2: When I gather the first part off the part, it is unable to run the full MPEG file is. Duration of each piece: 1 second Example: wheel = ["yui_2", "yui_3", "yui_4", "yui_5", "yui_6"...
How can I use the namespace manager or XSLT content to parse the aspx page? I am using HtmlAgilityPack I am trying to parse the aspx page to get the button and label control ID. When I try to select a node with the asp: button element, I get the following error Here is the error message: Namespace Manager or XsltContext is required This query contains a prefix, variable, or user-defined function. HtmlAgilityPack.HtmlDocument htmldoc = new HtmlAgilityPack.HtmlDocument (); String filePath = @ "C: \ webform4.aspx"; Htmldoc.load (filepath); Foreach (html.doc.DocumentNode.SelectNodes ("// div") in HtmlNode div) {Response.Write (div.Id); HtmlNode ASP ("asp: button") in foreach (div.SelectNodes) {Response.Write (asp.Id); }} My aspx page looks like: & lt;% @page language = "c #" autoevolutionwireup = "true" codebahind = "Webform 4 Aspx.cs" Inheritance = "WebApplication 1.WebForm4"%> & Lt ;...
Comments
Post a Comment