Wordpress Shortcode Extraction — Totseans

Wordpress Shortcode Extraction

Consider this, I have a shortcode that generates a random number and it shows it to the user one time. It's the password btw.

I want to extract that passwords which is clearly displayed on the page along with e-mail and username. And store it into an array,

then that array will send that information to another script or a script inside the page which will pass those values into something else. I want to know if there is a way to do this. The language of choice is PHP.

Pretty sure this is simple enough, Here are the resources I have dug up so far.

http://www.oomphinc.com/notes/2013/04/finding-shortcodes-in-wordpress-post-content-using-regular-expressions/
https://wordpress.stackexchange.com/questions/35834/extract-shortcodes-from-string
https://codex.wordpress.org/Function_Reference/get_shortcode_regex
http://bavotasan.com/2011/run-a-shortcode-anywhere-in-wordpress/
https://wordpress.org/support/topic/extract-shortcode-out-of-the_content

Comments

Sign In or Register to comment.