PluginProbe
Faust.js / 1.0.2
Faust.js v1.0.2
1.8.12 1.8.11 1.4.1 1.8.0 1.8.8 1.8.9 trunk 0.7.0 0.7.1 0.7.10 0.7.11 0.7.3 0.7.4 0.7.5 0.7.6 0.7.7 0.7.8 0.7.9 0.8.0 0.8.1 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 All 40 releases
← All changes | includes/replacement/functions.php +17 -0 0.7.71.0.2 View file →
@@ -93,4 +93,21 @@
93 93 $sitemap_entry['loc'] = equivalent_wp_url( $sitemap_entry['loc'] );
94 94
95 95 return $sitemap_entry;
96 96 }
97 +
98 +/**
99 + * Check if a string has a file extension.
100 + *
101 + * @param string $string The string to check.
102 + * @return boolean
103 + */
104 +function has_file_extension( $string ) {
105 + $file_extension_pattern = '/\.[a-zA-Z0-9]+$/';
106 +
107 + if ( preg_match( $file_extension_pattern, $string ) ) {
108 + return true;
109 + } else {
110 + return false; // String does not have a file extension.
111 + }
112 +}
113 +