• Resolved jibdata

    (@jibdata)


    After updating to 2.0.2 I’m having problems with parameters.

    In one snippet I fetch the following parameters:
    $classname = $_parameters[“class”];
    $extclass = $_parameters[“extclass”];
    $clhandle = ($extclass<>”?’_’:’:’);
    $normheight = $_parameters[“nheight”];
    $zoomheight = $_parameters[“zheight”];
    $transition = $_parameters[“transition”];

    But when I do a
    echo do_shortcode(‘[php snippet=8 param="class=image_upg&extclass=image_upg_ani&nheight=150px&zheight=300px&transition=RotateSlow"]‘);
    it seems that there is no data returned from the parameters.

    https://wordpress.org/plugins/php-code-for-posts/

Viewing 9 replies - 1 through 9 (of 9 total)
  • benhardisty

    (@benhardisty)

    Hi Jamie

    thanks for your excellent work on this plugin – but I too have the parameter issue described above

    in my case I run the WP_Query to fetch posts in a category – passing the category id as a parm

    After upgrading my code has stopped working (I have made no changes) running php 5.5.17

    thanks in advance for looking at this

    kind regards
    Ben

    Plugin Author Jamie Fraser

    (@thejfraser)

    Hi Jibdata, Benhardisty

    Thanks for bringing this to my attention.

    Fix for it coming shortly

    Look for 2.0.4!

    nadhir25

    (@nadhir25)

    The problem is still persisting even after 2.0.4. The parameters are not passing into the php code snippet. The new options and UI on the backend look great though!

    benhardisty

    (@benhardisty)

    Hi Jamie
    I have upgraded to 2.0.4 and this has fixed my issue
    many thanks for your prompt attention – much appreciated
    Ben

    Plugin Author Jamie Fraser

    (@thejfraser)

    Hi Nadhir,

    I have just ran a test, using the following:
    Post
    [php snippet=2 param=class=myparam]

    Snippet

    <?php
    print_r($_parameters);
    ?>

    it outputted Array ( [class] => myparam )

    If you are not getting the right output one of the files may not have downloaded correctly during the plugin update/install.

    nadhir25

    (@nadhir25)

    Ok so I am seeing the parenthesis that were originally surrounding the parameter has been removed. The correct syntax is something like:

    [php snippet=2 param=dj=automatic&host=cris]

    nadhir25

    (@nadhir25)

    I apologize, I just realized I need to extract the array. Thanks for the work!

    Thread Starter jibdata

    (@jibdata)

    Hi Jamie,

    I also confirm that 2.0.4 did the trick
    Thanks a lot

    Plugin Author Jamie Fraser

    (@thejfraser)

    thanks for the update people!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Parameters problem after update’ is closed to new replies.