Skip to content

Commit

Permalink
Use a consistent RegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
vishaltelangre committed May 3, 2021
1 parent 31c404b commit a9afebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gumroad/includes/scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function gum_post_scanner( $post_object ) {
function scanner( $post_content ) {

// counts to see if we find any gumroad product links.
if (count(preg_grep('/(gumroad.com\/a\/[[:alnum:]]+\/[[:alnum:]].*|gumroad.com\/l\/[[:alnum:]]|gum.co\/[[:alnum:]])/', explode("\n", $post_content))) > 0) {
if (count(preg_grep('/(gumroad.com\/a\/[[:alnum:]]+\/[[:alnum:]]|gumroad.com\/l\/[[:alnum:]]|gum.co\/[[:alnum:]])/', explode("\n", $post_content))) > 0) {
gum_load_js('overlay');
}
if (count(preg_grep('/(class=\"gumroad-product-embed\")/', explode("\n", $post_content))) > 0) {
Expand Down

0 comments on commit a9afebd

Please sign in to comment.