Timeline for Unable to process php via shortcode
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Jul 28, 2016 at 21:17 | history | suggested | Jean-philippe Emond | CC BY-SA 3.0 |
correction "inlclude" to "include"
|
Jul 28, 2016 at 21:12 | review | Suggested edits | |||
S Jul 28, 2016 at 21:17 | |||||
Dec 12, 2011 at 21:20 | comment | added | Gareth Watson | Cool, I'm open to exploring my options. Basically all the file contains is html and php. In fact it was the php file I used to hardcode this functionality into a previous website. This is my first time developing a WordPress plugin and boy has it been a learning experience! So as I say the file is a standard php file containing mostly html interspersed with php echo commands. To make my main plug in file clean I want to keep the content of the file I want to include separate from the main plug in file. | |
Dec 12, 2011 at 16:31 | comment | added | t31os | Better yet, don't echo anything in that file, and just do a simple include, then echo out or pass data to an applicable function inside the shortcode callback, then you'll avoid any need for output buffering. My point being, i've never personally found myself in a situation where i had to use output buffering, and it's usually a quick fix and not an ideal solution(there's usually a better way). Perhaps you can tell us more about what's in the file you're including? | |
Dec 12, 2011 at 14:47 | vote | accept | Gareth Watson | ||
Dec 12, 2011 at 14:17 | comment | added | Gareth Watson | Hi Bainternet. That worked perfectly. I was unfamiliar with the object buffer technique so have spent a little time getting versed in its application. I see a world of possibilities in which I can use this now. Out of curiousity why have you passed arguments via the cup_bc_shotcode function? I didn't include these in my code and it still seemed to work fine. | |
Dec 12, 2011 at 11:47 | history | answered | Bainternet | CC BY-SA 3.0 |