Closed tricki closed 9 years ago
Sorry about that, run composer update
and it should be working.
Hi @jasonagnew i am newbie in wp plugin development...
i try for creating shortcode using Argument Names , eg:
[showMe keyword=foo bar]
but in view, i just get foo, not foo bar.
how i can showing foo bar as string not array ?
This my code :
// shortcodes.php
$shortcode->add(
'showMe',
'myAppApi::showMeVal',
[
'keyword' => 'keyword'
]
);
and my api like this:
// api.php
$api->add('showMeVal', function($keyword) {
return (new ShortcodeController)->showmeact($keyword);
});
Thanks so much for the great framework :)
@David-Kurniawan I guess @arippberger already answered your question in #122.
I created a shortcode tied to a controller method where I return a
Herbert\Framework\Response
object using theview
function but I got an error saying it "could not be converted to string". My solution to the problem was adding a__toString()
method to theResponse
class which returns the body but this is just a temporary.Is this a bug or am I doing something wrong? Should I open a pull request for the
__toString()
method.