• Resolved PurpleEdge

    (@purpleedge)


    Hi Markus,

    Can I suggest that you make it possible to set the cookie name, and value name, when calling the l2g shortcode to reveal content?

    I have tried experimenting with the name and id parameters but the cookie is always named according to the page, and the value according to the parameters sent to the page. The parameters are causing me a problem on a form where selecting an option box reloads the page with updated parameters, so the l2g cookie can have various values depending on which option is currently selected.

    I am using the cookie value to selectively display content and believe this modification would make the plugin more flexible?

    For example, I want users to Pay with a Tweet on the Pricing Page, and then give them a link to the Sign Up page, and on the Sign Up page only show them the Pay with a Tweet price option based on the value of the l2g cookie.

    Sorry for the long post!

    https://wordpress.org/plugins/wplike2get/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Markus Drubba

    (@drumba)

    This is a very special usage. At the moment I thinking about a rework of the plugin to improve everything. I think about your suggestion.

    Thread Starter PurpleEdge

    (@purpleedge)

    Thanks, I got it to work quite simply by modifying…

    /*GWB
            if( is_array( get_option('wplike2get_settings') ) )
                $options = array_merge(array('ajaxurl' => admin_url('admin-ajax.php'), 'cookie_suffix' => $_SERVER['REQUEST_URI']), get_option('wplike2get_settings'));
            else
                $options = array( 'ajaxurl' => admin_url('admin-ajax.php'), 'cookie_suffix' => $_SERVER['REQUEST_URI'] );
    */
            if( is_array( get_option('wplike2get_settings') ) )
                $options = array_merge(array('ajaxurl' => admin_url('admin-ajax.php'), 'cookie_suffix' => '_l2g'), get_option('wplike2get_settings'));
            else
                $options = array( 'ajaxurl' => admin_url('admin-ajax.php'), 'cookie_suffix' => '_l2g' );

    Without the URL the cookie is global

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Improvement Suggestion’ is closed to new replies.