I have the following pattern:
preg_match( "/^(.*?\/wp-content\/)([^\?]+)(.*)$/", $src, $src_bits );
Now I want to set wp-content
to a constant named WP_CONTENT_FOLDERNAME
that holds the folder name. How would I do that?
I have the following pattern:
preg_match( "/^(.*?\/wp-content\/)([^\?]+)(.*)$/", $src, $src_bits );
Now I want to set wp-content
to a constant named WP_CONTENT_FOLDERNAME
that holds the folder name. How would I do that?
Simply by using PHP:
preg_match( "/^(.*?\/" . WP_CONTENT_FOLDERNAME . "\/)([^\?]+)(.*)$/", $src, $src_bits );