Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions admin/class-spotmap-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ public function get_maps_config_content($section)
{
static $config = null;
if ($config === null) {
$maps_file = plugin_dir_path(dirname(__FILE__)) . 'config/maps.yaml';
if (! file_exists($maps_file)) {
return null;
}
$config = \Spotmap\Symfony\Component\Yaml\Yaml::parseFile($maps_file);
$config = require plugin_dir_path(dirname(__FILE__)) . 'config/maps.php';
}
return $config[ $section ] ?? null;
}
Expand Down
22 changes: 1 addition & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,14 @@
"description": "Spotmap WordPress plugin",
"version": "1.0.0-rc.5",
"type": "wordpress-plugin",
"require": {
"symfony/yaml": "^7.0",
"brianhenryie/strauss": "^0.27"
},
"require": {},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": "^9.6",
"wp-phpunit/wp-phpunit": "^6.7",
"yoast/phpunit-polyfills": "^4.0"
},
"extra": {
"strauss": {
"target_directory": "vendor-prefixed",
"namespace_prefix": "Spotmap\\",
"classmap_prefix": "Spotmap_",
"create_autoloader": true,
"packages": [
"symfony/yaml"
]
}
},
"scripts": {
"post-install-cmd": [
"vendor/bin/strauss"
],
"post-update-cmd": [
"vendor/bin/strauss"
],
"test": "phpunit",
"test:coverage": "XDEBUG_MODE=coverage phpunit --coverage-text",
"format": "vendor/bin/php-cs-fixer fix",
Expand Down
Loading
Loading