What is the Correct way to pass parameters in function
The following is problematic in the OP’s code snippet: Missing shortcode_atts() for default attribute handling. Incorrectly defining the shortcode’s input argument, use instead function create_my_shortcode( $attr = [], $content = null ){ … } Not escaping user input, check e.g. wpdb::prepare(). We want to avoid possible SQL injections. Uses hardcoded table prefix, wp_, instead of … Read more