• Resolved Messaone

    (@messaone)


    Is there any function where i can check in my plugin if your plugin set a cookie?
    Or something i can us in my functions.php?
    Or is there any shortcode where i can wrap content?

    [cookie_set] MY CONTENT [/cookie_set]

    For me its important that i can check before the page load.
    So i can handle google maps request, etc. And don’t get any map. is not a function error 🙂

    Best Regards
    Matthias

Viewing 1 replies (of 1 total)
  • Thread Starter Messaone

    (@messaone)

    Oky i just use my own shortcode. Works fine 😀

    // Add Shortcode
    function cookie_is_set( $atts , $content = null ) {
    	
    	$cookie = $_COOKIE['COOKIE-NAME'];
    	
    	if(!$cookie){
    		
    	}
    	else {
    		echo do_shortcode($content);
    	}
      	
    }
    add_shortcode( 'cookie_is_set', 'cookie_is_set' );
Viewing 1 replies (of 1 total)

The topic ‘Check if cookie set over php’ is closed to new replies.