@@ 370-372 (lines=3) @@ | ||
367 | ||
368 | protected static function sanitize_item_ids( $item ) { |
|
369 | // lets not delete any options that don't start with jpsq_sync- |
|
370 | if ( ! is_string( $item ) || substr( $item, 0, 5 ) !== 'jpsq_' ) { |
|
371 | return null; |
|
372 | } |
|
373 | //Limit to A-Z,a-z,0-9,_,-,. |
|
374 | return preg_replace( '/[^A-Za-z0-9-_.]/', '', $item ); |
|
375 | } |
@@ 143-145 (lines=3) @@ | ||
140 | */ |
|
141 | private function find_plugin_directory( $file, $directories_to_check ) { |
|
142 | // We're only able to find the absolute path for plugin/theme PHP files. |
|
143 | if ( ! is_string( $file ) || '.php' !== substr( $file, -4 ) ) { |
|
144 | return null; |
|
145 | } |
|
146 | ||
147 | foreach ( $directories_to_check as $check_dir ) { |
|
148 | $check = dirname( trailingslashit( $check_dir ) . $file ); |