Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
loco-translate
/
src
/
gettext
/
File Content:
SearchPaths-20260622063747.php
<?php /** * A file finder built from search path references in a PO/POT file */ class Loco_gettext_SearchPaths extends Loco_fs_FileFinder { /** * Look up a relative file reference against search paths * @param string relative file path reference * @return Loco_fs_File */ public function match( $ref ){ $excluded = new Loco_fs_Locations( $this->getExcluded() ); /* @var Loco_fs_Directory */ foreach( $this->getRootDirectories() as $base ){ $file = new Loco_fs_File($ref); $path = $file->normalize( (string) $base ); if( $file->exists() && ! $excluded->check($path) ){ return $file; } } } /** * Build search paths from a given PO/POT file that references other files * @return Loco_gettext_SearchPaths */ public function init( Loco_fs_File $pofile, LocoHeaders $head = null ){ if( is_null($head) ){ loco_require_lib('compiled/gettext.php'); $head = LocoPoHeaders::fromSource( $pofile->getContents() ); } $ninc = 0; foreach( array('Poedit') as $vendor ){ $key = 'X-'.$vendor.'-Basepath'; if( ! $head->has($key) ){ continue; } $dir = new Loco_fs_Directory( $head[$key] ); $base = $dir->normalize( $pofile->dirname() ); // base should be absolute, with the following search paths relative to it $i = 0; while( true ){ $key = sprintf('X-%s-SearchPath-%u', $vendor, $i++); if( ! $head->has($key) ){ break; } // map search path to given base $include = new Loco_fs_File( $head[$key] ); $include->normalize( $base ); if( $include->exists() ){ if( $include->isDirectory() ){ $this->addRoot( (string) $include ); $ninc++; } /*else { TODO force specific file in Loco_fs_FileFinder }*/ } } // exclude from search paths $i = 0; while( true ){ $key = sprintf('X-%s-SearchPathExcluded-%u', $vendor, $i++); if( ! $head->has($key) ){ break; } // map excluded path to given base $exclude = new Loco_fs_File( $head[$key] ); $exclude->normalize($base); if( $exclude->exists() ){ $this->exclude( (string) $exclude ); } // TODO implement wildcard exclusion } } // Add po file location if no proprietary headers used if( ! $ninc ){ $this->addRoot( $pofile->dirname() ); } return $this; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
AjaxRouter.php
6839 bytes
0644
Data.php
13150 bytes
0644
DownloadConfController.php
945 bytes
0644
Extraction-20260622064208.php
6492 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
Matcher.php
9218 bytes
0644
SearchPaths-20260622063747.php
3016 bytes
0644
SyncOptions-20260622141726.php
2310 bytes
0644
SyncOptions.php
2310 bytes
0644
WordCount.php
2907 bytes
0644
class-sitemaps-admin-20260705091211.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
ctrl.package.php
17073 bytes
0644
deactivation-20260705060759.php
21118 bytes
0644
deactivation.php
21118 bytes
0644
duplicator-20260704004435.php
1781 bytes
0644
duplicator.php
1781 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260624192801.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
inc.validator.php
5401 bytes
0644
loco.php
5626 bytes
0644
manager.php
14659 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
request-methods-header.php
1127 bytes
0644
setup.php
2699 bytes
0644
uninstall.php
4401 bytes
0644
N4ST4R_ID | Naxtarrr