paths = $paths ?? new WordPressPathProvider(); } /** * @return list */ public function seeds(): array { $seeds = array(); $stylesheet = get_stylesheet_directory(); $template = get_template_directory(); if ( is_string( $stylesheet ) && '' !== $stylesheet ) { $seeds[] = array( 'scope' => 'active_theme', 'path' => $stylesheet, 'type' => 'directory', ); } if ( is_string( $template ) && '' !== $template && $template !== $stylesheet ) { $seeds[] = array( 'scope' => 'parent_theme', 'path' => $template, 'type' => 'directory', ); } $mu_root = $this->paths->mu_plugins_root(); if ( '' !== $mu_root && is_dir( $mu_root ) ) { $seeds[] = array( 'scope' => 'mu_plugins', 'path' => $mu_root, 'type' => 'directory', ); } foreach ( array( 'advanced-cache.php', 'db.php', 'db-error.php', 'install.php', 'maintenance.php', 'object-cache.php', 'php-error.php', 'sunrise.php' ) as $drop_in ) { $path = $this->paths->content_file( $drop_in ); if ( is_file( $path ) ) { $seeds[] = array( 'scope' => 'drop_ins', 'path' => $path, 'type' => 'file', ); } } return $seeds; } }