Changeset 3274550
- Timestamp:
- 04/16/2025 10:50:23 AM (8 months ago)
- Location:
- interactive-globes/tags/1.4.8
- Files:
-
- 5 deleted
- 83 edited
-
languages/interactive-globes.pot (modified) (57 diffs)
-
src/models/01-globe-dotlabel.php (modified) (4 diffs)
-
src/models/02-globe-point.php (modified) (5 diffs)
-
vendor-prefixed/autoload.php (modified) (1 diff)
-
vendor-prefixed/composer/autoload_classmap.php (modified) (1 diff)
-
vendor-prefixed/composer/autoload_real.php (modified) (2 diffs)
-
vendor-prefixed/composer/autoload_static.php (modified) (3 diffs)
-
vendor-prefixed/composer/installed.json (modified) (2 diffs)
-
vendor-prefixed/hassankhan/config/src/Config.php (modified) (19 diffs)
-
vendor-prefixed/saltus/framework/src/Core.php (modified) (2 diffs)
-
vendor-prefixed/saltus/framework/src/Features/AdminCols/AdminCols.php (modified) (2 diffs)
-
vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php (modified) (27 diffs)
-
vendor-prefixed/saltus/framework/src/Features/AdminFilters/AdminFilters.php (modified) (2 diffs)
-
vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php (modified) (21 diffs)
-
vendor-prefixed/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php (modified) (4 diffs)
-
vendor-prefixed/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php (modified) (4 diffs)
-
vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php (modified) (2 diffs)
-
vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php (modified) (8 diffs)
-
vendor-prefixed/saltus/framework/src/Features/FeatureA (deleted)
-
vendor-prefixed/saltus/framework/src/Features/Meta/CMB2Meta.php (deleted)
-
vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php (modified) (10 diffs)
-
vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php (modified) (2 diffs)
-
vendor-prefixed/saltus/framework/src/Features/RememberTabs/RememberTabs.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php (modified) (4 diffs)
-
vendor-prefixed/saltus/framework/src/Features/Settings/CodestarSettings.php (modified) (5 diffs)
-
vendor-prefixed/saltus/framework/src/Features/Settings/Settings.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php (modified) (9 diffs)
-
vendor-prefixed/saltus/framework/src/Features/SingleExport/SingleExport.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/CanRegister.php (modified) (1 diff)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php (modified) (1 diff)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php (modified) (7 diffs)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/GenericContainer.php (modified) (12 diffs)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/Invalid.php (modified) (3 diffs)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Container/ServiceContainer.php (modified) (7 diffs)
-
vendor-prefixed/saltus/framework/src/Infrastructure/Service/Actionable.php (modified) (1 diff)
-
vendor-prefixed/saltus/framework/src/Modeler.php (modified) (4 diffs)
-
vendor-prefixed/saltus/framework/src/Models/BaseModel.php (modified) (13 diffs)
-
vendor-prefixed/saltus/framework/src/Models/Model.php (modified) (1 diff)
-
vendor-prefixed/saltus/framework/src/Models/ModelFactory.php (modified) (7 diffs)
-
vendor-prefixed/saltus/framework/src/Models/PostType.php (modified) (8 diffs)
-
vendor-prefixed/saltus/framework/src/Models/Taxonomy.php (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_classmap.php (modified) (3 diffs)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (5 diffs)
-
vendor/composer/installed.json (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (3 diffs)
-
vendor/saltus/framework/CHANGELOG.md (modified) (3 diffs)
-
vendor/saltus/framework/README.md (modified) (1 diff)
-
vendor/saltus/framework/assets/Feature/DragAndDrop/order.js (modified) (1 diff)
-
vendor/saltus/framework/composer.json (modified) (1 diff)
-
vendor/saltus/framework/phpcs.xml (deleted)
-
vendor/saltus/framework/src/Core.php (modified) (2 diffs)
-
vendor/saltus/framework/src/Features/AdminCols/AdminCols.php (modified) (2 diffs)
-
vendor/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php (modified) (27 diffs)
-
vendor/saltus/framework/src/Features/AdminFilters/AdminFilters.php (modified) (2 diffs)
-
vendor/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php (modified) (21 diffs)
-
vendor/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php (modified) (4 diffs)
-
vendor/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php (modified) (4 diffs)
-
vendor/saltus/framework/src/Features/Duplicate/Duplicate.php (modified) (2 diffs)
-
vendor/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php (modified) (8 diffs)
-
vendor/saltus/framework/src/Features/FeatureA (deleted)
-
vendor/saltus/framework/src/Features/Meta/CMB2Meta.php (deleted)
-
vendor/saltus/framework/src/Features/Meta/CodestarMeta.php (modified) (10 diffs)
-
vendor/saltus/framework/src/Features/Meta/Meta.php (modified) (2 diffs)
-
vendor/saltus/framework/src/Features/RememberTabs/RememberTabs.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php (modified) (4 diffs)
-
vendor/saltus/framework/src/Features/Settings/CodestarSettings.php (modified) (5 diffs)
-
vendor/saltus/framework/src/Features/Settings/Settings.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php (modified) (9 diffs)
-
vendor/saltus/framework/src/Features/SingleExport/SingleExport.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Infrastructure/Container/CanRegister.php (modified) (1 diff)
-
vendor/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php (modified) (1 diff)
-
vendor/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php (modified) (7 diffs)
-
vendor/saltus/framework/src/Infrastructure/Container/GenericContainer.php (modified) (12 diffs)
-
vendor/saltus/framework/src/Infrastructure/Container/Invalid.php (modified) (3 diffs)
-
vendor/saltus/framework/src/Infrastructure/Container/ServiceContainer.php (modified) (7 diffs)
-
vendor/saltus/framework/src/Infrastructure/Service/Actionable.php (modified) (1 diff)
-
vendor/saltus/framework/src/Modeler.php (modified) (4 diffs)
-
vendor/saltus/framework/src/Models/BaseModel.php (modified) (13 diffs)
-
vendor/saltus/framework/src/Models/Model.php (modified) (1 diff)
-
vendor/saltus/framework/src/Models/ModelFactory.php (modified) (7 diffs)
-
vendor/saltus/framework/src/Models/PostType.php (modified) (8 diffs)
-
vendor/saltus/framework/src/Models/Taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
interactive-globes/tags/1.4.8/languages/interactive-globes.pot
r3269027 r3274550 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Interactive Globes 1.4. 5\n"5 "Project-Id-Version: Interactive Globes 1.4.8\n" 6 6 "Report-Msgid-Bugs-To: https://saltus.dev/\n" 7 "POT-Creation-Date: 2025-0 2-27 12:59:08+00:00\n"7 "POT-Creation-Date: 2025-04-16 08:53:01+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" … … 80 80 msgstr "" 81 81 82 #: src/Features/CptManager/CptManagerCore.php: 8282 #: src/Features/CptManager/CptManagerCore.php:104 83 83 msgid "Add title" 84 84 msgstr "" … … 86 86 #: src/Features/DotLabel/DotLabelProMeta.php:22 87 87 #: src/Features/Point/PointProMeta.php:22 src/models/04-globe-region.php:27 88 #: src/models/06-globe-html.php: 1088 #: src/models/06-globe-html.php:21 89 89 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:119 90 90 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:132 … … 99 99 100 100 #: src/Features/DotLabel/DotLabelProMeta.php:29 101 #: src/models/01-globe-dotlabel.php:1 38 src/models/02-globe-point.php:133102 #: src/models/03-globe-line.php:1 50 src/models/04-globe-region.php:212103 #: src/models/06-globe-html.php:1 34101 #: src/models/01-globe-dotlabel.php:156 src/models/02-globe-point.php:146 102 #: src/models/03-globe-line.php:161 src/models/04-globe-region.php:223 103 #: src/models/06-globe-html.php:145 104 104 msgid "Details" 105 105 msgstr "" 106 106 107 107 #: src/Features/DotLabel/DotLabelProMeta.php:33 108 #: src/Features/Point/PointProMeta.php:33 src/models/03-globe-line.php:2 58109 #: src/models/04-globe-region.php:2 42 src/models/06-globe-html.php:187108 #: src/Features/Point/PointProMeta.php:33 src/models/03-globe-line.php:269 109 #: src/models/04-globe-region.php:253 src/models/06-globe-html.php:198 110 110 msgid "Customize" 111 111 msgstr "" 112 112 113 113 #: src/Features/DotLabel/DotLabelProMeta.php:39 114 #: src/Features/Point/PointProMeta.php:37 src/models/03-globe-line.php:2 63115 #: src/models/04-globe-region.php:2 47 src/models/06-globe-html.php:192114 #: src/Features/Point/PointProMeta.php:37 src/models/03-globe-line.php:274 115 #: src/models/04-globe-region.php:258 src/models/06-globe-html.php:203 116 116 msgid "Use Custom Options" 117 117 msgstr "" 118 118 119 119 #: src/Features/DotLabel/DotLabelProMeta.php:40 120 #: src/Features/Point/PointProMeta.php:38 src/models/03-globe-line.php:2 64121 #: src/models/04-globe-region.php:2 48120 #: src/Features/Point/PointProMeta.php:38 src/models/03-globe-line.php:275 121 #: src/models/04-globe-region.php:259 122 122 msgid "Define custom colors and actions." 123 123 msgstr "" … … 129 129 #: src/Services/Model/Pro/MetaHTML.php:50 130 130 #: src/Services/Model/Pro/MetaRegions.php:71 src/models/00-globe-pro.php:186 131 #: src/models/00-globe-pro.php:232 src/models/04-globe-region.php:2 53132 #: src/models/06-globe-html.php: 198131 #: src/models/00-globe-pro.php:232 src/models/04-globe-region.php:264 132 #: src/models/06-globe-html.php:209 133 133 msgid "Click Action" 134 134 msgstr "" … … 139 139 #: src/Services/Model/Base/MetaPoint.php:125 140 140 #: src/Services/Model/Pro/MetaLines.php:76 src/models/00-globe-pro.php:203 141 #: src/models/00-globe-pro.php:242 src/models/03-globe-line.php:3 15141 #: src/models/00-globe-pro.php:242 src/models/03-globe-line.php:326 142 142 msgid "Altitude" 143 143 msgstr "" … … 153 153 #: src/Services/Model/Base/MetaPoint.php:129 154 154 #: src/Services/Model/Pro/MetaRegions.php:78 src/models/00-globe-pro.php:208 155 #: src/models/00-globe-pro.php:254 src/models/04-globe-region.php:2 61155 #: src/models/00-globe-pro.php:254 src/models/04-globe-region.php:272 156 156 msgid "Fill Color" 157 157 msgstr "" … … 163 163 #: src/Services/Model/Pro/MetaRegions.php:83 src/models/00-globe-pro.php:133 164 164 #: src/models/00-globe-pro.php:214 src/models/00-globe-pro.php:260 165 #: src/models/04-globe-region.php:2 67165 #: src/models/04-globe-region.php:278 166 166 msgid "Hover Color" 167 167 msgstr "" … … 209 209 msgstr "" 210 210 211 #: src/Features/Meta/MetaCore.php:169 211 #: src/Features/Meta/MetaCore.php:140 212 msgid "Copy to clipboard" 213 msgstr "" 214 215 #: src/Features/Meta/MetaCore.php:184 212 216 msgid "Add new" 213 217 msgstr "" 214 218 215 #: src/Features/Meta/MetaCore.php:3 36219 #: src/Features/Meta/MetaCore.php:351 216 220 #: src/Services/Model/Base/MetaDotLabel.php:44 217 221 #: src/Services/Model/Base/MetaPoint.php:44 … … 219 223 msgstr "" 220 224 221 #: src/Features/Meta/MetaCore.php:3 37225 #: src/Features/Meta/MetaCore.php:352 222 226 msgid "Actions" 223 227 msgstr "" 224 228 225 #: src/Features/Meta/MetaCore.php:3 47229 #: src/Features/Meta/MetaCore.php:362 226 230 msgid "(no title)" 227 231 msgstr "" … … 230 234 #: src/Services/Model/Pro/MetaLayers.php:53 231 235 #: src/Services/Model/Pro/MetaPoint.php:16 232 #: src/Services/Model/Pro/MetaRegions.php:30 src/models/03-globe-line.php:1 56236 #: src/Services/Model/Pro/MetaRegions.php:30 src/models/03-globe-line.php:167 233 237 msgid "Type" 234 238 msgstr "" … … 245 249 246 250 #: src/Features/Point/PointProMeta.php:55 247 #: src/Services/Model/Pro/MetaPoint.php:21 src/models/02-globe-point.php: 55248 #: src/models/02-globe-point.php: 57251 #: src/Services/Model/Pro/MetaPoint.php:21 src/models/02-globe-point.php:68 252 #: src/models/02-globe-point.php:70 249 253 msgid "Marker" 250 254 msgstr "" … … 301 305 msgstr "" 302 306 303 #: src/Features/Sales/UpsellPage.php:4 8 src/Features/Sales/UpsellPage.php:49307 #: src/Features/Sales/UpsellPage.php:41 src/Features/Sales/UpsellPage.php:42 304 308 msgid "Try Pro Version" 305 309 msgstr "" 306 310 307 #: src/Plugin/Assets.php:1 81311 #: src/Plugin/Assets.php:175 308 312 msgid "New center saved" 309 313 msgstr "" 310 314 311 #: src/Plugin/Assets.php:1 82315 #: src/Plugin/Assets.php:176 312 316 msgid "Set initial center" 313 317 msgstr "" … … 363 367 msgstr "" 364 368 365 #: src/Services/Model/Base/Labels.php:21 src/models/01-globe-dotlabel.php: 64366 #: src/models/02-globe-point.php: 58 src/models/03-globe-line.php:73367 #: src/models/04-globe-region.php:1 38 src/models/06-globe-html.php:59369 #: src/Services/Model/Base/Labels.php:21 src/models/01-globe-dotlabel.php:82 370 #: src/models/02-globe-point.php:71 src/models/03-globe-line.php:84 371 #: src/models/04-globe-region.php:149 src/models/06-globe-html.php:70 368 372 msgid "Create New" 369 373 msgstr "" … … 461 465 msgstr "" 462 466 463 #: src/Services/Model/Base/Labels.php:48 src/models/01-globe-dotlabel.php: 91464 #: src/models/02-globe-point.php: 85 src/models/03-globe-line.php:100465 #: src/models/04-globe-region.php:1 65 src/models/06-globe-html.php:86467 #: src/Services/Model/Base/Labels.php:48 src/models/01-globe-dotlabel.php:109 468 #: src/models/02-globe-point.php:98 src/models/03-globe-line.php:111 469 #: src/models/04-globe-region.php:176 src/models/06-globe-html.php:97 466 470 msgid "Custom field updated" 467 471 msgstr "" 468 472 469 #: src/Services/Model/Base/Labels.php:49 src/models/01-globe-dotlabel.php: 92470 #: src/models/02-globe-point.php: 86 src/models/03-globe-line.php:101471 #: src/models/04-globe-region.php:1 66 src/models/06-globe-html.php:87473 #: src/Services/Model/Base/Labels.php:49 src/models/01-globe-dotlabel.php:110 474 #: src/models/02-globe-point.php:99 src/models/03-globe-line.php:112 475 #: src/models/04-globe-region.php:177 src/models/06-globe-html.php:98 472 476 msgid "Custom field deleted" 473 477 msgstr "" … … 593 597 msgstr "" 594 598 595 #: src/Services/Model/Base/Meta.php:144 599 #: src/Services/Model/Base/Meta.php:142 600 msgid "Altitude/Scale Settings" 601 msgstr "" 602 603 #: src/Services/Model/Base/Meta.php:143 604 msgid "" 605 "Controls the default zoom position and the min/max zoom levels (but the " 606 "other way around). Think of it as the \"camara\" altitude. The smaller the " 607 "value, the closer to the globe surface. Check the \"Altitude\" value in the " 608 "\"Center Coordinates\" in the preview." 609 msgstr "" 610 611 #: src/Services/Model/Base/Meta.php:149 596 612 msgid "Controls the initial globe scale" 597 613 msgstr "" 598 614 599 #: src/Services/Model/Base/Meta.php:145 600 msgid "Initial altitude/scale" 601 msgstr "" 602 603 #: src/Services/Model/Base/Meta.php:149 615 #: src/Services/Model/Base/Meta.php:150 616 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:175 617 msgid "Initial" 618 msgstr "" 619 620 #: src/Services/Model/Base/Meta.php:156 621 msgid "" 622 "Controls the minimum altitude/scale. Use this option to prevent users to " 623 "zoom in too much into the globe. The smaller the value, the closer to the " 624 "globe surface. Leave empty to disable." 625 msgstr "" 626 627 #: src/Services/Model/Base/Meta.php:157 628 msgid "Minimum" 629 msgstr "" 630 631 #: src/Services/Model/Base/Meta.php:163 632 msgid "" 633 "Controls the maximum altitude/scale. Use this option to prevent users to " 634 "zoom out too much from the globe. The larger the value, the further away " 635 "from the globe. Leave empty to disable." 636 msgstr "" 637 638 #: src/Services/Model/Base/Meta.php:164 639 msgid "Maximum" 640 msgstr "" 641 642 #: src/Services/Model/Base/Meta.php:170 604 643 msgid "Center coordinates" 605 644 msgstr "" 606 645 607 #: src/Services/Model/Base/Meta.php:1 50646 #: src/Services/Model/Base/Meta.php:171 608 647 msgid "Center of the globe when initially loaded." 609 648 msgstr "" 610 649 611 #: src/Services/Model/Base/Meta.php:1 52650 #: src/Services/Model/Base/Meta.php:173 612 651 #: src/Services/Model/Base/MetaDotLabel.php:30 613 652 #: src/Services/Model/Base/MetaPoint.php:30 … … 618 657 msgstr "" 619 658 620 #: src/Services/Model/Base/Meta.php:1 54659 #: src/Services/Model/Base/Meta.php:175 621 660 #: src/Services/Model/Base/MetaDotLabel.php:32 622 661 #: src/Services/Model/Base/MetaPoint.php:32 … … 626 665 msgstr "" 627 666 628 #: src/Services/Model/Base/Meta.php:1 58667 #: src/Services/Model/Base/Meta.php:179 629 668 #: src/Services/Model/Base/MetaDotLabel.php:55 630 669 #: src/Services/Model/Base/MetaPoint.php:55 … … 632 671 msgstr "" 633 672 634 #: src/Services/Model/Base/Meta.php:1 66673 #: src/Services/Model/Base/Meta.php:187 635 674 #: src/Services/Model/Base/MetaDotLabel.php:63 636 675 #: src/Services/Model/Base/MetaPoint.php:63 637 #: src/models/01-globe-dotlabel.php:1 64 src/models/02-globe-point.php:159638 #: src/models/03-globe-line.php:2 11 src/models/06-globe-html.php:160676 #: src/models/01-globe-dotlabel.php:182 src/models/02-globe-point.php:172 677 #: src/models/03-globe-line.php:222 src/models/06-globe-html.php:171 639 678 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/map/map.php:24 640 679 msgid "Latitude" 641 680 msgstr "" 642 681 643 #: src/Services/Model/Base/Meta.php:1 73682 #: src/Services/Model/Base/Meta.php:194 644 683 #: src/Services/Model/Base/MetaDotLabel.php:69 645 684 #: src/Services/Model/Base/MetaPoint.php:69 646 #: src/models/01-globe-dotlabel.php:1 71 src/models/02-globe-point.php:166647 #: src/models/03-globe-line.php:2 16 src/models/06-globe-html.php:167685 #: src/models/01-globe-dotlabel.php:189 src/models/02-globe-point.php:179 686 #: src/models/03-globe-line.php:227 src/models/06-globe-html.php:178 648 687 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/map/map.php:25 649 688 msgid "Longitude" 650 689 msgstr "" 651 690 652 #: src/Services/Model/Base/Meta.php: 183691 #: src/Services/Model/Base/Meta.php:204 653 692 #. translators: legend refers to a caption or visual element explaining colours 654 693 #. on map … … 656 695 msgstr "" 657 696 658 #: src/Services/Model/Base/Meta.php: 184697 #: src/Services/Model/Base/Meta.php:205 659 698 msgid "Allow interactions with globe, like zoom and pan." 660 699 msgstr "" 661 700 662 #: src/Services/Model/Base/Meta.php: 189701 #: src/Services/Model/Base/Meta.php:210 663 702 msgid "Zoom" 664 703 msgstr "" 665 704 666 #: src/Services/Model/Base/Meta.php: 194705 #: src/Services/Model/Base/Meta.php:215 667 706 msgid "Pan & Rotate" 668 707 msgstr "" 669 708 670 #: src/Services/Model/Base/Meta.php:2 01709 #: src/Services/Model/Base/Meta.php:222 671 710 #. translators: legend refers to a caption or visual element explaining colours 672 711 #. on map … … 674 713 msgstr "" 675 714 676 #: src/Services/Model/Base/Meta.php:2 02715 #: src/Services/Model/Base/Meta.php:223 677 716 msgid "Animate globe on load" 678 717 msgstr "" 679 718 680 #: src/Services/Model/Base/Meta.php:2 08719 #: src/Services/Model/Base/Meta.php:229 681 720 msgid "Container" 682 721 msgstr "" 683 722 684 #: src/Services/Model/Base/Meta.php:2 14723 #: src/Services/Model/Base/Meta.php:235 685 724 msgid "Background Color" 686 725 msgstr "" 687 726 688 #: src/Services/Model/Base/Meta.php:2 19727 #: src/Services/Model/Base/Meta.php:240 689 728 msgid "Container Height" 690 729 msgstr "" 691 730 692 #: src/Services/Model/Base/Meta.php:2 25731 #: src/Services/Model/Base/Meta.php:246 693 732 msgid "" 694 733 "The default 56% corresponds to a 16:9 aspect ratio. 100% would be a square. " … … 697 736 msgstr "" 698 737 699 #: src/Services/Model/Base/Meta.php:2 29738 #: src/Services/Model/Base/Meta.php:250 700 739 msgid "Container Height on Mobile" 701 740 msgstr "" 702 741 703 #: src/Services/Model/Base/Meta.php:2 35742 #: src/Services/Model/Base/Meta.php:256 704 743 msgid "" 705 744 "Leave blank to use the same value above. On mobile there might be the need " … … 708 747 msgstr "" 709 748 710 #: src/Services/Model/Base/Meta.php:2 39749 #: src/Services/Model/Base/Meta.php:260 711 750 msgid "Container Max-Width" 712 751 msgstr "" 713 752 714 #: src/Services/Model/Base/Meta.php:2 40753 #: src/Services/Model/Base/Meta.php:261 715 754 msgid "" 716 755 "Leave empty if you always want your globe to take 100% of the available " … … 719 758 720 759 #: src/Services/Model/Base/MetaDotLabel.php:21 721 #: src/models/01-globe-dotlabel.php: 60 src/models/01-globe-dotlabel.php:62722 #: src/models/01-globe-dotlabel.php: 63 src/models/01-globe-dotlabel.php:74760 #: src/models/01-globe-dotlabel.php:78 src/models/01-globe-dotlabel.php:80 761 #: src/models/01-globe-dotlabel.php:81 src/models/01-globe-dotlabel.php:92 723 762 msgid "Dot Labels" 724 763 msgstr "" … … 737 776 #: src/Services/Model/Base/MetaDotLabel.php:51 738 777 #: src/Services/Model/Base/MetaPoint.php:51 739 #: src/models/01-globe-dotlabel.php:1 42 src/models/02-globe-point.php:137740 #: src/models/06-globe-html.php:1 38778 #: src/models/01-globe-dotlabel.php:160 src/models/02-globe-point.php:150 779 #: src/models/06-globe-html.php:149 741 780 msgid "Coordinates" 742 781 msgstr "" … … 744 783 #: src/Services/Model/Base/MetaDotLabel.php:78 745 784 #: src/Services/Model/Base/MetaPoint.php:78 746 #: src/models/01-globe-dotlabel.php: 185 src/models/02-globe-point.php:180747 #: src/models/04-globe-region.php:2 32785 #: src/models/01-globe-dotlabel.php:203 src/models/02-globe-point.php:193 786 #: src/models/04-globe-region.php:243 748 787 msgid "Tooltip Content" 749 788 msgstr "" … … 751 790 #: src/Services/Model/Base/MetaDotLabel.php:82 752 791 #: src/Services/Model/Base/MetaPoint.php:82 753 #: src/models/01-globe-dotlabel.php: 189 src/models/02-globe-point.php:184754 #: src/models/04-globe-region.php:2 36 src/models/06-globe-html.php:180792 #: src/models/01-globe-dotlabel.php:207 src/models/02-globe-point.php:197 793 #: src/models/04-globe-region.php:247 src/models/06-globe-html.php:191 755 794 msgid "Action Content" 756 795 msgstr "" … … 758 797 #: src/Services/Model/Base/MetaDotLabel.php:83 759 798 #: src/Services/Model/Base/MetaPoint.php:83 760 #: src/models/01-globe-dotlabel.php: 190 src/models/02-globe-point.php:185761 #: src/models/04-globe-region.php:2 37 src/models/06-globe-html.php:181799 #: src/models/01-globe-dotlabel.php:208 src/models/02-globe-point.php:198 800 #: src/models/04-globe-region.php:248 src/models/06-globe-html.php:192 762 801 msgid "URL or content to trigger when marker is clicked." 763 802 msgstr "" 764 803 765 804 #: src/Services/Model/Base/MetaDotLabel.php:83 766 #: src/Services/Model/Base/MetaPoint.php:83 src/models/04-globe-region.php:2 37805 #: src/Services/Model/Base/MetaPoint.php:83 src/models/04-globe-region.php:248 767 806 msgid "Don't forget to select a click action below." 768 807 msgstr "" … … 787 826 msgstr "" 788 827 789 #: src/Services/Model/Base/MetaPoint.php:21 src/models/02-globe-point.php: 54828 #: src/Services/Model/Base/MetaPoint.php:21 src/models/02-globe-point.php:67 790 829 msgid "3D Markers" 791 830 msgstr "" … … 852 891 msgstr "" 853 892 854 #: src/Services/Model/Pro/MetaHTML.php:18 src/models/06-globe-html.php: 55855 #: src/models/06-globe-html.php: 69893 #: src/Services/Model/Pro/MetaHTML.php:18 src/models/06-globe-html.php:66 894 #: src/models/06-globe-html.php:80 856 895 msgid "HTML Markers" 857 896 msgstr "" … … 865 904 msgstr "" 866 905 867 #: src/Services/Model/Pro/MetaHTML.php:43 src/models/06-globe-html.php:2 06906 #: src/Services/Model/Pro/MetaHTML.php:43 src/models/06-globe-html.php:217 868 907 msgid "HTML Marker Template" 869 908 msgstr "" 870 909 871 #: src/Services/Model/Pro/MetaHTML.php:44 src/models/06-globe-html.php:2 07910 #: src/Services/Model/Pro/MetaHTML.php:44 src/models/06-globe-html.php:218 872 911 msgid "" 873 912 "Template for the HTML content. You can use HTML code and if necessary use " … … 988 1027 msgstr "" 989 1028 990 #: src/Services/Model/Pro/MetaLines.php:46 src/models/03-globe-line.php:2 821029 #: src/Services/Model/Pro/MetaLines.php:46 src/models/03-globe-line.php:293 991 1030 msgid "Line Dash" 992 1031 msgstr "" 993 1032 994 #: src/Services/Model/Pro/MetaLines.php:47 src/models/03-globe-line.php:2 831033 #: src/Services/Model/Pro/MetaLines.php:47 src/models/03-globe-line.php:294 995 1034 msgid "" 996 1035 "The length of the dashed segments in the arc, in terms of relative line " … … 998 1037 msgstr "" 999 1038 1000 #: src/Services/Model/Pro/MetaLines.php:58 src/models/03-globe-line.php: 2951039 #: src/Services/Model/Pro/MetaLines.php:58 src/models/03-globe-line.php:306 1001 1040 msgid "Line Dash Gap" 1002 1041 msgstr "" 1003 1042 1004 #: src/Services/Model/Pro/MetaLines.php:59 src/models/03-globe-line.php: 2961043 #: src/Services/Model/Pro/MetaLines.php:59 src/models/03-globe-line.php:307 1005 1044 msgid "" 1006 1045 "The length of the gap between dash segments, in terms of relative line " … … 1008 1047 msgstr "" 1009 1048 1010 #: src/Services/Model/Pro/MetaLines.php:64 src/models/03-globe-line.php:3 021049 #: src/Services/Model/Pro/MetaLines.php:64 src/models/03-globe-line.php:313 1011 1050 msgid "Line Width" 1012 1051 msgstr "" 1013 1052 1014 #: src/Services/Model/Pro/MetaLines.php:65 src/models/03-globe-line.php:3 031053 #: src/Services/Model/Pro/MetaLines.php:65 src/models/03-globe-line.php:314 1015 1054 msgid "The line’s diameter, in angular degrees" 1016 1055 msgstr "" 1017 1056 1018 #: src/Services/Model/Pro/MetaLines.php:77 src/models/03-globe-line.php:3 161057 #: src/Services/Model/Pro/MetaLines.php:77 src/models/03-globe-line.php:327 1019 1058 msgid "" 1020 1059 "The arc’s maximum altitude, ocurring at the half-way distance between the " 1021 "two points. ( 0 = 0 altitude (ground line), 100 = globe radius)"1022 msgstr "" 1023 1024 #: src/Services/Model/Pro/MetaLines.php:82 src/models/03-globe-line.php:3 281060 "two points. ( 0 = ground line, 100 = globe radius )" 1061 msgstr "" 1062 1063 #: src/Services/Model/Pro/MetaLines.php:82 src/models/03-globe-line.php:339 1025 1064 msgid "" 1026 1065 "Time duration (in seconds) to animate the motion of dash positions from the " … … 1030 1069 msgstr "" 1031 1070 1032 #: src/Services/Model/Pro/MetaLines.php:88 src/models/03-globe-line.php:3 271071 #: src/Services/Model/Pro/MetaLines.php:88 src/models/03-globe-line.php:338 1033 1072 msgid "Animation speed" 1034 1073 msgstr "" … … 1539 1578 msgstr "" 1540 1579 1541 #: src/models/01-globe-dotlabel.php:19 1580 #: src/models/01-globe-dotlabel.php:21 src/models/01-globe-dotlabel.php:224 1581 #: src/models/01-globe-dotlabel.php:231 src/models/02-globe-point.php:215 1582 #: src/models/02-globe-point.php:222 src/models/03-globe-line.php:356 1583 #: src/models/03-globe-line.php:363 src/models/04-globe-region.php:303 1584 #: src/models/04-globe-region.php:310 src/models/06-globe-html.php:236 1585 #: src/models/06-globe-html.php:238 src/models/06-globe-html.php:253 1586 msgid "Associated Globe" 1587 msgstr "" 1588 1589 #: src/models/01-globe-dotlabel.php:25 1542 1590 msgid "Clone Dot Label" 1543 1591 msgstr "" 1544 1592 1545 #: src/models/01-globe-dotlabel.php:2 01593 #: src/models/01-globe-dotlabel.php:26 1546 1594 msgid "Create a copy of this dot label" 1547 1595 msgstr "" 1548 1596 1549 #: src/models/01-globe-dotlabel.php:2 31597 #: src/models/01-globe-dotlabel.php:29 1550 1598 msgid "Download Dot Labels Export File" 1551 1599 msgstr "" 1552 1600 1553 #: src/models/01-globe-dotlabel.php: 32 src/models/02-globe-point.php:281554 #: src/models/03-globe-line.php:4 1 src/models/04-globe-region.php:1061555 #: src/models/06-globe-html.php: 291601 #: src/models/01-globe-dotlabel.php:47 src/models/02-globe-point.php:38 1602 #: src/models/03-globe-line.php:49 src/models/04-globe-region.php:114 1603 #: src/models/06-globe-html.php:40 1556 1604 msgid "Parent Globe" 1557 1605 msgstr "" 1558 1606 1559 #: src/models/01-globe-dotlabel.php: 611607 #: src/models/01-globe-dotlabel.php:79 1560 1608 msgid "Dot Label" 1561 1609 msgstr "" 1562 1610 1563 #: src/models/01-globe-dotlabel.php: 651611 #: src/models/01-globe-dotlabel.php:83 1564 1612 msgid "Create New Dot Label" 1565 1613 msgstr "" 1566 1614 1567 #: src/models/01-globe-dotlabel.php: 66 src/models/02-globe-point.php:601568 #: src/models/03-globe-line.php: 75 src/models/04-globe-region.php:1401569 #: src/models/06-globe-html.php: 611615 #: src/models/01-globe-dotlabel.php:84 src/models/02-globe-point.php:73 1616 #: src/models/03-globe-line.php:86 src/models/04-globe-region.php:151 1617 #: src/models/06-globe-html.php:72 1570 1618 msgid "Edit" 1571 1619 msgstr "" 1572 1620 1573 #: src/models/01-globe-dotlabel.php: 671621 #: src/models/01-globe-dotlabel.php:85 1574 1622 msgid "New Dot Label" 1575 1623 msgstr "" 1576 1624 1577 #: src/models/01-globe-dotlabel.php: 681625 #: src/models/01-globe-dotlabel.php:86 1578 1626 msgid "View Dot Label" 1579 1627 msgstr "" 1580 1628 1581 #: src/models/01-globe-dotlabel.php: 691629 #: src/models/01-globe-dotlabel.php:87 1582 1630 msgid "View Dot Labels" 1583 1631 msgstr "" 1584 1632 1585 #: src/models/01-globe-dotlabel.php: 701633 #: src/models/01-globe-dotlabel.php:88 1586 1634 msgid "Search Dot Labels" 1587 1635 msgstr "" 1588 1636 1589 #: src/models/01-globe-dotlabel.php: 711637 #: src/models/01-globe-dotlabel.php:89 1590 1638 msgid "No Dot Labels found." 1591 1639 msgstr "" 1592 1640 1593 #: src/models/01-globe-dotlabel.php: 721641 #: src/models/01-globe-dotlabel.php:90 1594 1642 msgid "No Dot Labels found in Trash." 1595 1643 msgstr "" 1596 1644 1597 #: src/models/01-globe-dotlabel.php: 73 src/models/02-globe-point.php:671598 #: src/models/03-globe-line.php: 82 src/models/04-globe-region.php:1471599 #: src/models/06-globe-html.php: 681645 #: src/models/01-globe-dotlabel.php:91 src/models/02-globe-point.php:80 1646 #: src/models/03-globe-line.php:93 src/models/04-globe-region.php:158 1647 #: src/models/06-globe-html.php:79 1600 1648 msgid "Parent Globe:" 1601 1649 msgstr "" 1602 1650 1603 #: src/models/01-globe-dotlabel.php: 751651 #: src/models/01-globe-dotlabel.php:93 1604 1652 msgid "Dot Label Archives" 1605 1653 msgstr "" 1606 1654 1607 #: src/models/01-globe-dotlabel.php: 761655 #: src/models/01-globe-dotlabel.php:94 1608 1656 msgid "Dot Label Attributes" 1609 1657 msgstr "" 1610 1658 1611 #: src/models/01-globe-dotlabel.php: 771659 #: src/models/01-globe-dotlabel.php:95 1612 1660 msgid "Insert into Dot Label" 1613 1661 msgstr "" 1614 1662 1615 #: src/models/01-globe-dotlabel.php: 781663 #: src/models/01-globe-dotlabel.php:96 1616 1664 msgid "Uploaded to this Dot Label" 1617 1665 msgstr "" 1618 1666 1619 #: src/models/01-globe-dotlabel.php: 791667 #: src/models/01-globe-dotlabel.php:97 1620 1668 msgid "Filter Dot Label list" 1621 1669 msgstr "" 1622 1670 1623 #: src/models/01-globe-dotlabel.php: 801671 #: src/models/01-globe-dotlabel.php:98 1624 1672 msgid "Dot Label list navigation" 1625 1673 msgstr "" 1626 1674 1627 #: src/models/01-globe-dotlabel.php: 811675 #: src/models/01-globe-dotlabel.php:99 1628 1676 msgid "Dot Label list" 1629 1677 msgstr "" 1630 1678 1631 #: src/models/01-globe-dotlabel.php: 821679 #: src/models/01-globe-dotlabel.php:100 1632 1680 msgid "Dot Label Cover Image" 1633 1681 msgstr "" 1634 1682 1635 #: src/models/01-globe-dotlabel.php: 831683 #: src/models/01-globe-dotlabel.php:101 1636 1684 msgid "Set Dot Label Cover Image" 1637 1685 msgstr "" 1638 1686 1639 #: src/models/01-globe-dotlabel.php: 841687 #: src/models/01-globe-dotlabel.php:102 1640 1688 msgid "Remove Dot Label Cover" 1641 1689 msgstr "" 1642 1690 1643 #: src/models/01-globe-dotlabel.php: 851691 #: src/models/01-globe-dotlabel.php:103 1644 1692 msgid "Use as Dot Label Cover" 1645 1693 msgstr "" 1646 1694 1647 #: src/models/01-globe-dotlabel.php: 891695 #: src/models/01-globe-dotlabel.php:107 1648 1696 msgid "" 1649 1697 "Dot Label information updated. <a href=\"{permalink}\" " … … 1651 1699 msgstr "" 1652 1700 1653 #: src/models/01-globe-dotlabel.php: 901701 #: src/models/01-globe-dotlabel.php:108 1654 1702 msgid "Dot Label info updated" 1655 1703 msgstr "" 1656 1704 1657 #: src/models/01-globe-dotlabel.php: 931705 #: src/models/01-globe-dotlabel.php:111 1658 1706 msgid "Dot Label content restored from revision" 1659 1707 msgstr "" 1660 1708 1661 #: src/models/01-globe-dotlabel.php: 941709 #: src/models/01-globe-dotlabel.php:112 1662 1710 msgid "Dot Label Published" 1663 1711 msgstr "" 1664 1712 1665 #: src/models/01-globe-dotlabel.php: 951713 #: src/models/01-globe-dotlabel.php:113 1666 1714 msgid "Dot Label information saved." 1667 1715 msgstr "" 1668 1716 1669 #: src/models/01-globe-dotlabel.php: 961717 #: src/models/01-globe-dotlabel.php:114 1670 1718 msgid "Dot Label submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 1671 1719 msgstr "" 1672 1720 1673 #: src/models/01-globe-dotlabel.php: 971721 #: src/models/01-globe-dotlabel.php:115 1674 1722 msgid "" 1675 1723 "Dot Label scheduled for {date}. <a href=\"{preview_url}\" " … … 1677 1725 msgstr "" 1678 1726 1679 #: src/models/01-globe-dotlabel.php: 981727 #: src/models/01-globe-dotlabel.php:116 1680 1728 msgid "" 1681 1729 "Dot Label draft updated. <a href=\"{preview_url}\" " … … 1683 1731 msgstr "" 1684 1732 1685 #: src/models/01-globe-dotlabel.php:1 011733 #: src/models/01-globe-dotlabel.php:119 1686 1734 msgid "Dot Label updated. Yay!" 1687 1735 msgstr "" 1688 1736 1689 #: src/models/01-globe-dotlabel.php:1 021737 #: src/models/01-globe-dotlabel.php:120 1690 1738 msgid "%s Dot Label updated. Yay!" 1691 1739 msgstr "" 1692 1740 1693 #: src/models/01-globe-dotlabel.php:1 031741 #: src/models/01-globe-dotlabel.php:121 1694 1742 msgid "Dot Label not updated, somebody is editing it" 1695 1743 msgstr "" 1696 1744 1697 #: src/models/01-globe-dotlabel.php:1 041745 #: src/models/01-globe-dotlabel.php:122 1698 1746 msgid "%s Dot Label not updated, somebody is editing them" 1699 1747 msgstr "" 1700 1748 1701 #: src/models/01-globe-dotlabel.php:1 051749 #: src/models/01-globe-dotlabel.php:123 1702 1750 msgid "Dot Label permanetly deleted. Fahrenheit 451 team was here?" 1703 1751 msgstr "" 1704 1752 1705 #: src/models/01-globe-dotlabel.php:1 061753 #: src/models/01-globe-dotlabel.php:124 1706 1754 msgid "%s Dot Label permanently deleted. Why? :(" 1707 1755 msgstr "" 1708 1756 1709 #: src/models/01-globe-dotlabel.php:1 071757 #: src/models/01-globe-dotlabel.php:125 1710 1758 msgid "Dot Label moved to the trash. I'm sad :(" 1711 1759 msgstr "" 1712 1760 1713 #: src/models/01-globe-dotlabel.php:1 081761 #: src/models/01-globe-dotlabel.php:126 1714 1762 msgid "%s Dot Label moved to the trash. Why? :(" 1715 1763 msgstr "" 1716 1764 1717 #: src/models/01-globe-dotlabel.php:1 091765 #: src/models/01-globe-dotlabel.php:127 1718 1766 msgid "Dot Label recovered from trash. Well done!" 1719 1767 msgstr "" 1720 1768 1721 #: src/models/01-globe-dotlabel.php:1 101769 #: src/models/01-globe-dotlabel.php:128 1722 1770 msgid "%s Dot Label saved from the enemies!" 1723 1771 msgstr "" 1724 1772 1725 #: src/models/01-globe-dotlabel.php:1 141773 #: src/models/01-globe-dotlabel.php:132 1726 1774 msgid "Enter Dot Label name here" 1727 1775 msgstr "" 1728 1776 1729 #: src/models/01-globe-dotlabel.php:1 34 src/models/02-globe-point.php:1281730 #: src/models/03-globe-line.php:1 41 src/models/04-globe-region.php:2061731 #: src/models/06-globe-html.php:1 291777 #: src/models/01-globe-dotlabel.php:152 src/models/02-globe-point.php:141 1778 #: src/models/03-globe-line.php:152 src/models/04-globe-region.php:217 1779 #: src/models/06-globe-html.php:140 1732 1780 msgid "Information" 1733 1781 msgstr "" 1734 1782 1735 #: src/models/01-globe-dotlabel.php:1 47 src/models/02-globe-point.php:1421736 #: src/models/03-globe-line.php: 194 src/models/06-globe-html.php:1431783 #: src/models/01-globe-dotlabel.php:165 src/models/02-globe-point.php:155 1784 #: src/models/03-globe-line.php:205 src/models/06-globe-html.php:154 1737 1785 msgid "zoom" 1738 1786 msgstr "" 1739 1787 1740 #: src/models/01-globe-dotlabel.php:1 56 src/models/02-globe-point.php:1511741 #: src/models/03-globe-line.php:2 03 src/models/06-globe-html.php:1521788 #: src/models/01-globe-dotlabel.php:174 src/models/02-globe-point.php:164 1789 #: src/models/03-globe-line.php:214 src/models/06-globe-html.php:163 1742 1790 msgid "address" 1743 1791 msgstr "" 1744 1792 1745 #: src/models/01-globe-dotlabel.php: 1981793 #: src/models/01-globe-dotlabel.php:216 1746 1794 msgid "Globe - Dot Label relationship" 1747 1795 msgstr "" 1748 1796 1749 #: src/models/01-globe-dotlabel.php:206 src/models/01-globe-dotlabel.php:208 1750 #: src/models/01-globe-dotlabel.php:223 src/models/02-globe-point.php:202 1751 #: src/models/02-globe-point.php:204 src/models/02-globe-point.php:219 1752 #: src/models/03-globe-line.php:345 src/models/03-globe-line.php:347 1753 #: src/models/03-globe-line.php:362 src/models/04-globe-region.php:292 1754 #: src/models/04-globe-region.php:308 src/models/06-globe-html.php:225 1755 #: src/models/06-globe-html.php:227 src/models/06-globe-html.php:242 1756 msgid "Associated Globe" 1757 msgstr "" 1758 1759 #: src/models/01-globe-dotlabel.php:213 src/models/02-globe-point.php:209 1760 #: src/models/03-globe-line.php:352 src/models/04-globe-region.php:298 1761 #: src/models/06-globe-html.php:232 1797 #: src/models/01-globe-dotlabel.php:232 src/models/02-globe-point.php:223 1798 #: src/models/03-globe-line.php:364 src/models/04-globe-region.php:311 1799 #: src/models/06-globe-html.php:243 1762 1800 msgid "Select a Parent Globe" 1763 1801 msgstr "" 1764 1802 1765 #: src/models/02-globe-point.php: 181803 #: src/models/02-globe-point.php:20 1766 1804 msgid "Clone Point" 1767 1805 msgstr "" 1768 1806 1769 #: src/models/02-globe-point.php: 191807 #: src/models/02-globe-point.php:21 1770 1808 msgid "Create a copy of this point" 1771 1809 msgstr "" 1772 1810 1773 #: src/models/02-globe-point.php: 56 src/models/02-globe-point.php:681774 #: src/models/03-globe-line.php:2 25 src/models/06-globe-html.php:571775 #: src/models/06-globe-html.php: 581811 #: src/models/02-globe-point.php:69 src/models/02-globe-point.php:81 1812 #: src/models/03-globe-line.php:236 src/models/06-globe-html.php:68 1813 #: src/models/06-globe-html.php:69 1776 1814 msgid "Markers" 1777 1815 msgstr "" 1778 1816 1779 #: src/models/02-globe-point.php: 591817 #: src/models/02-globe-point.php:72 1780 1818 msgid "Create New Marker" 1781 1819 msgstr "" 1782 1820 1783 #: src/models/02-globe-point.php: 611821 #: src/models/02-globe-point.php:74 1784 1822 msgid "New Marker" 1785 1823 msgstr "" 1786 1824 1787 #: src/models/02-globe-point.php: 621825 #: src/models/02-globe-point.php:75 1788 1826 msgid "View Marker" 1789 1827 msgstr "" 1790 1828 1791 #: src/models/02-globe-point.php: 631829 #: src/models/02-globe-point.php:76 1792 1830 msgid "View Markers" 1793 1831 msgstr "" 1794 1832 1795 #: src/models/02-globe-point.php: 641833 #: src/models/02-globe-point.php:77 1796 1834 msgid "Search Markers" 1797 1835 msgstr "" 1798 1836 1799 #: src/models/02-globe-point.php: 651837 #: src/models/02-globe-point.php:78 1800 1838 msgid "No Markers found." 1801 1839 msgstr "" 1802 1840 1803 #: src/models/02-globe-point.php: 661841 #: src/models/02-globe-point.php:79 1804 1842 msgid "No Markers found in Trash." 1805 1843 msgstr "" 1806 1844 1807 #: src/models/02-globe-point.php: 691845 #: src/models/02-globe-point.php:82 1808 1846 msgid "Marker Archives" 1809 1847 msgstr "" 1810 1848 1811 #: src/models/02-globe-point.php: 701849 #: src/models/02-globe-point.php:83 1812 1850 msgid "Marker Attributes" 1813 1851 msgstr "" 1814 1852 1815 #: src/models/02-globe-point.php: 711853 #: src/models/02-globe-point.php:84 1816 1854 msgid "Insert into Marker" 1817 1855 msgstr "" 1818 1856 1819 #: src/models/02-globe-point.php: 721857 #: src/models/02-globe-point.php:85 1820 1858 msgid "Uploaded to this Marker" 1821 1859 msgstr "" 1822 1860 1823 #: src/models/02-globe-point.php: 731861 #: src/models/02-globe-point.php:86 1824 1862 msgid "Filter Marker list" 1825 1863 msgstr "" 1826 1864 1827 #: src/models/02-globe-point.php: 741865 #: src/models/02-globe-point.php:87 1828 1866 msgid "Marker list navigation" 1829 1867 msgstr "" 1830 1868 1831 #: src/models/02-globe-point.php: 751869 #: src/models/02-globe-point.php:88 1832 1870 msgid "Marker list" 1833 1871 msgstr "" 1834 1872 1835 #: src/models/02-globe-point.php: 761873 #: src/models/02-globe-point.php:89 1836 1874 msgid "Marker Cover Image" 1837 1875 msgstr "" 1838 1876 1839 #: src/models/02-globe-point.php: 771877 #: src/models/02-globe-point.php:90 1840 1878 msgid "Set Marker Cover Image" 1841 1879 msgstr "" 1842 1880 1843 #: src/models/02-globe-point.php: 781881 #: src/models/02-globe-point.php:91 1844 1882 msgid "Remove Marker Cover" 1845 1883 msgstr "" 1846 1884 1847 #: src/models/02-globe-point.php: 791885 #: src/models/02-globe-point.php:92 1848 1886 msgid "Use as Marker Cover" 1849 1887 msgstr "" 1850 1888 1851 #: src/models/02-globe-point.php: 831889 #: src/models/02-globe-point.php:96 1852 1890 msgid "" 1853 1891 "Marker information updated. <a href=\"{permalink}\" target=\"_blank\">View " … … 1855 1893 msgstr "" 1856 1894 1857 #: src/models/02-globe-point.php: 841895 #: src/models/02-globe-point.php:97 1858 1896 msgid "Marker info updated" 1859 1897 msgstr "" 1860 1898 1861 #: src/models/02-globe-point.php: 871899 #: src/models/02-globe-point.php:100 1862 1900 msgid "Marker content restored from revision" 1863 1901 msgstr "" 1864 1902 1865 #: src/models/02-globe-point.php: 881903 #: src/models/02-globe-point.php:101 1866 1904 msgid "Marker Published" 1867 1905 msgstr "" 1868 1906 1869 #: src/models/02-globe-point.php: 891907 #: src/models/02-globe-point.php:102 1870 1908 msgid "Marker information saved." 1871 1909 msgstr "" 1872 1910 1873 #: src/models/02-globe-point.php: 901911 #: src/models/02-globe-point.php:103 1874 1912 msgid "Point submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 1875 1913 msgstr "" 1876 1914 1877 #: src/models/02-globe-point.php: 911915 #: src/models/02-globe-point.php:104 1878 1916 msgid "" 1879 1917 "Point scheduled for {date}. <a href=\"{preview_url}\" " … … 1881 1919 msgstr "" 1882 1920 1883 #: src/models/02-globe-point.php: 921921 #: src/models/02-globe-point.php:105 1884 1922 msgid "Point draft updated. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 1885 1923 msgstr "" 1886 1924 1887 #: src/models/02-globe-point.php: 951925 #: src/models/02-globe-point.php:108 1888 1926 msgid "Marker updated. Yay!" 1889 1927 msgstr "" 1890 1928 1891 #: src/models/02-globe-point.php: 961929 #: src/models/02-globe-point.php:109 1892 1930 msgid "%s Marker updated. Yay!" 1893 1931 msgstr "" 1894 1932 1895 #: src/models/02-globe-point.php: 971933 #: src/models/02-globe-point.php:110 1896 1934 msgid "Marker not updated, somebody is editing it" 1897 1935 msgstr "" 1898 1936 1899 #: src/models/02-globe-point.php: 981937 #: src/models/02-globe-point.php:111 1900 1938 msgid "%s Marker not updated, somebody is editing them" 1901 1939 msgstr "" 1902 1940 1903 #: src/models/02-globe-point.php: 991941 #: src/models/02-globe-point.php:112 1904 1942 msgid "Marker permanetly deleted. Fahrenheit 451 team was here?" 1905 1943 msgstr "" 1906 1944 1907 #: src/models/02-globe-point.php:1 001945 #: src/models/02-globe-point.php:113 1908 1946 msgid "%s Marker permanently deleted. Why? :(" 1909 1947 msgstr "" 1910 1948 1911 #: src/models/02-globe-point.php:1 011949 #: src/models/02-globe-point.php:114 1912 1950 msgid "Marker moved to the trash. I'm sad :(" 1913 1951 msgstr "" 1914 1952 1915 #: src/models/02-globe-point.php:1 021953 #: src/models/02-globe-point.php:115 1916 1954 msgid "%s Marker moved to the trash. Why? :(" 1917 1955 msgstr "" 1918 1956 1919 #: src/models/02-globe-point.php:1 031957 #: src/models/02-globe-point.php:116 1920 1958 msgid "Marker recovered from trash. Well done!" 1921 1959 msgstr "" 1922 1960 1923 #: src/models/02-globe-point.php:1 041961 #: src/models/02-globe-point.php:117 1924 1962 msgid "%s Marker saved from the enemies!" 1925 1963 msgstr "" 1926 1964 1927 #: src/models/02-globe-point.php:1 081965 #: src/models/02-globe-point.php:121 1928 1966 msgid "Enter Marker name here" 1929 1967 msgstr "" 1930 1968 1931 #: src/models/02-globe-point.php: 194 src/models/03-globe-line.php:3371932 #: src/models/04-globe-region.php:2 84 src/models/06-globe-html.php:2171969 #: src/models/02-globe-point.php:207 src/models/03-globe-line.php:348 1970 #: src/models/04-globe-region.php:295 src/models/06-globe-html.php:228 1933 1971 msgid "Globe rel" 1934 1972 msgstr "" … … 1946 1984 msgstr "" 1947 1985 1948 #: src/models/03-globe-line.php: 69 src/models/03-globe-line.php:711949 #: src/models/03-globe-line.php: 72 src/models/03-globe-line.php:831986 #: src/models/03-globe-line.php:80 src/models/03-globe-line.php:82 1987 #: src/models/03-globe-line.php:83 src/models/03-globe-line.php:94 1950 1988 msgid "Lines" 1951 1989 msgstr "" 1952 1990 1953 #: src/models/03-globe-line.php: 701991 #: src/models/03-globe-line.php:81 1954 1992 msgid "Line" 1955 1993 msgstr "" 1956 1994 1957 #: src/models/03-globe-line.php: 741995 #: src/models/03-globe-line.php:85 1958 1996 msgid "Create New Line" 1959 1997 msgstr "" 1960 1998 1961 #: src/models/03-globe-line.php: 761999 #: src/models/03-globe-line.php:87 1962 2000 msgid "New Line" 1963 2001 msgstr "" 1964 2002 1965 #: src/models/03-globe-line.php: 772003 #: src/models/03-globe-line.php:88 1966 2004 msgid "View Line" 1967 2005 msgstr "" 1968 2006 1969 #: src/models/03-globe-line.php: 782007 #: src/models/03-globe-line.php:89 1970 2008 msgid "View Lines" 1971 2009 msgstr "" 1972 2010 1973 #: src/models/03-globe-line.php: 792011 #: src/models/03-globe-line.php:90 1974 2012 msgid "Search Lines" 1975 2013 msgstr "" 1976 2014 1977 #: src/models/03-globe-line.php: 802015 #: src/models/03-globe-line.php:91 1978 2016 msgid "No Lines found." 1979 2017 msgstr "" 1980 2018 1981 #: src/models/03-globe-line.php: 812019 #: src/models/03-globe-line.php:92 1982 2020 msgid "No Lines found in Trash." 1983 2021 msgstr "" 1984 2022 1985 #: src/models/03-globe-line.php: 842023 #: src/models/03-globe-line.php:95 1986 2024 msgid "Line Archives" 1987 2025 msgstr "" 1988 2026 1989 #: src/models/03-globe-line.php: 852027 #: src/models/03-globe-line.php:96 1990 2028 msgid "Line Attributes" 1991 2029 msgstr "" 1992 2030 1993 #: src/models/03-globe-line.php: 862031 #: src/models/03-globe-line.php:97 1994 2032 msgid "Insert into Line" 1995 2033 msgstr "" 1996 2034 1997 #: src/models/03-globe-line.php: 872035 #: src/models/03-globe-line.php:98 1998 2036 msgid "Uploaded to this Line" 1999 2037 msgstr "" 2000 2038 2001 #: src/models/03-globe-line.php: 882039 #: src/models/03-globe-line.php:99 2002 2040 msgid "Filter Line list" 2003 2041 msgstr "" 2004 2042 2005 #: src/models/03-globe-line.php: 892043 #: src/models/03-globe-line.php:100 2006 2044 msgid "Line list navigation" 2007 2045 msgstr "" 2008 2046 2009 #: src/models/03-globe-line.php: 902047 #: src/models/03-globe-line.php:101 2010 2048 msgid "Line list" 2011 2049 msgstr "" 2012 2050 2013 #: src/models/03-globe-line.php: 912051 #: src/models/03-globe-line.php:102 2014 2052 msgid "Line Cover Image" 2015 2053 msgstr "" 2016 2054 2017 #: src/models/03-globe-line.php: 922055 #: src/models/03-globe-line.php:103 2018 2056 msgid "Set Line Cover Image" 2019 2057 msgstr "" 2020 2058 2021 #: src/models/03-globe-line.php: 932059 #: src/models/03-globe-line.php:104 2022 2060 msgid "Remove Line Cover" 2023 2061 msgstr "" 2024 2062 2025 #: src/models/03-globe-line.php: 942063 #: src/models/03-globe-line.php:105 2026 2064 msgid "Use as Line Cover" 2027 2065 msgstr "" 2028 2066 2029 #: src/models/03-globe-line.php: 982067 #: src/models/03-globe-line.php:109 2030 2068 msgid "" 2031 2069 "Line information updated. <a href=\"{permalink}\" target=\"_blank\">View " … … 2033 2071 msgstr "" 2034 2072 2035 #: src/models/03-globe-line.php: 992073 #: src/models/03-globe-line.php:110 2036 2074 msgid "Line info updated" 2037 2075 msgstr "" 2038 2076 2039 #: src/models/03-globe-line.php:1 022077 #: src/models/03-globe-line.php:113 2040 2078 msgid "Line content restored from revision" 2041 2079 msgstr "" 2042 2080 2043 #: src/models/03-globe-line.php:1 032081 #: src/models/03-globe-line.php:114 2044 2082 msgid "Line Published" 2045 2083 msgstr "" 2046 2084 2047 #: src/models/03-globe-line.php:1 042085 #: src/models/03-globe-line.php:115 2048 2086 msgid "Line information saved." 2049 2087 msgstr "" 2050 2088 2051 #: src/models/03-globe-line.php:1 052089 #: src/models/03-globe-line.php:116 2052 2090 msgid "Line submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 2053 2091 msgstr "" 2054 2092 2055 #: src/models/03-globe-line.php:1 062093 #: src/models/03-globe-line.php:117 2056 2094 msgid "" 2057 2095 "Line scheduled for {date}. <a href=\"{preview_url}\" " … … 2059 2097 msgstr "" 2060 2098 2061 #: src/models/03-globe-line.php:1 072099 #: src/models/03-globe-line.php:118 2062 2100 msgid "Line draft updated. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 2063 2101 msgstr "" 2064 2102 2065 #: src/models/03-globe-line.php:1 102103 #: src/models/03-globe-line.php:121 2066 2104 msgid "Line updated. Yay!" 2067 2105 msgstr "" 2068 2106 2069 #: src/models/03-globe-line.php:1 112107 #: src/models/03-globe-line.php:122 2070 2108 msgid "%s Line updated. Yay!" 2071 2109 msgstr "" 2072 2110 2073 #: src/models/03-globe-line.php:1 122111 #: src/models/03-globe-line.php:123 2074 2112 msgid "Line not updated, somebody is editing it" 2075 2113 msgstr "" 2076 2114 2077 #: src/models/03-globe-line.php:1 132115 #: src/models/03-globe-line.php:124 2078 2116 msgid "%s Line not updated, somebody is editing them" 2079 2117 msgstr "" 2080 2118 2081 #: src/models/03-globe-line.php:1 142119 #: src/models/03-globe-line.php:125 2082 2120 msgid "Line permanetly deleted. Fahrenheit 451 team was here?" 2083 2121 msgstr "" 2084 2122 2085 #: src/models/03-globe-line.php:1 152123 #: src/models/03-globe-line.php:126 2086 2124 msgid "%s Line permanently deleted. Why? :(" 2087 2125 msgstr "" 2088 2126 2089 #: src/models/03-globe-line.php:1 162127 #: src/models/03-globe-line.php:127 2090 2128 msgid "Line moved to the trash. I'm sad :(" 2091 2129 msgstr "" 2092 2130 2093 #: src/models/03-globe-line.php:1 172131 #: src/models/03-globe-line.php:128 2094 2132 msgid "%s Line moved to the trash. Why? :(" 2095 2133 msgstr "" 2096 2134 2097 #: src/models/03-globe-line.php:1 182135 #: src/models/03-globe-line.php:129 2098 2136 msgid "Line recovered from trash. Well done!" 2099 2137 msgstr "" 2100 2138 2101 #: src/models/03-globe-line.php:1 192139 #: src/models/03-globe-line.php:130 2102 2140 msgid "%s Line saved from the enemies!" 2103 2141 msgstr "" 2104 2142 2105 #: src/models/03-globe-line.php:1 232143 #: src/models/03-globe-line.php:134 2106 2144 msgid "Enter Line name here" 2107 2145 msgstr "" 2108 2146 2109 #: src/models/03-globe-line.php:1 51 src/models/04-globe-region.php:2132147 #: src/models/03-globe-line.php:162 src/models/04-globe-region.php:224 2110 2148 msgid "Details." 2111 2149 msgstr "" 2112 2150 2113 #: src/models/03-globe-line.php:1 582151 #: src/models/03-globe-line.php:169 2114 2152 msgid "Enter manually" 2115 2153 msgstr "" 2116 2154 2117 #: src/models/03-globe-line.php:1 592155 #: src/models/03-globe-line.php:170 2118 2156 msgid "Connect existing markers" 2119 2157 msgstr "" 2120 2158 2121 #: src/models/03-globe-line.php:1 662159 #: src/models/03-globe-line.php:177 2122 2160 msgid "Add More End Points" 2123 2161 msgstr "" 2124 2162 2125 #: src/models/03-globe-line.php:1 672163 #: src/models/03-globe-line.php:178 2126 2164 msgid "Locations to connect" 2127 2165 msgstr "" 2128 2166 2129 #: src/models/03-globe-line.php: 1902167 #: src/models/03-globe-line.php:201 2130 2168 msgid "Line Info" 2131 2169 msgstr "" 2132 2170 2133 #: src/models/03-globe-line.php:2 272171 #: src/models/03-globe-line.php:238 2134 2172 msgid "Add More Markers" 2135 2173 msgstr "" 2136 2174 2137 #: src/models/03-globe-line.php:2 392175 #: src/models/03-globe-line.php:250 2138 2176 msgid "Select Marker" 2139 2177 msgstr "" 2140 2178 2141 #: src/models/03-globe-line.php:2 692179 #: src/models/03-globe-line.php:280 2142 2180 msgid "Line Color" 2143 2181 msgstr "" … … 2159 2197 msgstr "" 2160 2198 2161 #: src/models/04-globe-region.php:1 34 src/models/04-globe-region.php:1362162 #: src/models/04-globe-region.php:1 37 src/models/04-globe-region.php:1482199 #: src/models/04-globe-region.php:145 src/models/04-globe-region.php:147 2200 #: src/models/04-globe-region.php:148 src/models/04-globe-region.php:159 2163 2201 msgid "Regions" 2164 2202 msgstr "" 2165 2203 2166 #: src/models/04-globe-region.php:1 352204 #: src/models/04-globe-region.php:146 2167 2205 msgid "Region" 2168 2206 msgstr "" 2169 2207 2170 #: src/models/04-globe-region.php:1 392208 #: src/models/04-globe-region.php:150 2171 2209 msgid "Create New Region" 2172 2210 msgstr "" 2173 2211 2174 #: src/models/04-globe-region.php:1 412212 #: src/models/04-globe-region.php:152 2175 2213 msgid "New Region" 2176 2214 msgstr "" 2177 2215 2178 #: src/models/04-globe-region.php:1 422216 #: src/models/04-globe-region.php:153 2179 2217 msgid "View Region" 2180 2218 msgstr "" 2181 2219 2182 #: src/models/04-globe-region.php:1 432220 #: src/models/04-globe-region.php:154 2183 2221 msgid "View Regions" 2184 2222 msgstr "" 2185 2223 2186 #: src/models/04-globe-region.php:1 442224 #: src/models/04-globe-region.php:155 2187 2225 msgid "Search Regions" 2188 2226 msgstr "" 2189 2227 2190 #: src/models/04-globe-region.php:1 452228 #: src/models/04-globe-region.php:156 2191 2229 msgid "No Regions found." 2192 2230 msgstr "" 2193 2231 2194 #: src/models/04-globe-region.php:1 462232 #: src/models/04-globe-region.php:157 2195 2233 msgid "No Regions found in Trash." 2196 2234 msgstr "" 2197 2235 2198 #: src/models/04-globe-region.php:1 492236 #: src/models/04-globe-region.php:160 2199 2237 msgid "Region Archives" 2200 2238 msgstr "" 2201 2239 2202 #: src/models/04-globe-region.php:1 502240 #: src/models/04-globe-region.php:161 2203 2241 msgid "Region Attributes" 2204 2242 msgstr "" 2205 2243 2206 #: src/models/04-globe-region.php:1 512244 #: src/models/04-globe-region.php:162 2207 2245 msgid "Insert into Region" 2208 2246 msgstr "" 2209 2247 2210 #: src/models/04-globe-region.php:1 522248 #: src/models/04-globe-region.php:163 2211 2249 msgid "Uploaded to this Region" 2212 2250 msgstr "" 2213 2251 2214 #: src/models/04-globe-region.php:1 532252 #: src/models/04-globe-region.php:164 2215 2253 msgid "Filter Region list" 2216 2254 msgstr "" 2217 2255 2218 #: src/models/04-globe-region.php:1 542256 #: src/models/04-globe-region.php:165 2219 2257 msgid "Region list navigation" 2220 2258 msgstr "" 2221 2259 2222 #: src/models/04-globe-region.php:1 552260 #: src/models/04-globe-region.php:166 2223 2261 msgid "Region list" 2224 2262 msgstr "" 2225 2263 2226 #: src/models/04-globe-region.php:1 562264 #: src/models/04-globe-region.php:167 2227 2265 msgid "Region Cover Image" 2228 2266 msgstr "" 2229 2267 2230 #: src/models/04-globe-region.php:1 572268 #: src/models/04-globe-region.php:168 2231 2269 msgid "Set Region Cover Image" 2232 2270 msgstr "" 2233 2271 2234 #: src/models/04-globe-region.php:1 582272 #: src/models/04-globe-region.php:169 2235 2273 msgid "Remove Region Cover" 2236 2274 msgstr "" 2237 2275 2238 #: src/models/04-globe-region.php:1 592276 #: src/models/04-globe-region.php:170 2239 2277 msgid "Use as Region Cover" 2240 2278 msgstr "" 2241 2279 2242 #: src/models/04-globe-region.php:1 632280 #: src/models/04-globe-region.php:174 2243 2281 msgid "" 2244 2282 "Region information updated. <a href=\"{permalink}\" target=\"_blank\">View " … … 2246 2284 msgstr "" 2247 2285 2248 #: src/models/04-globe-region.php:1 642286 #: src/models/04-globe-region.php:175 2249 2287 msgid "Region info updated" 2250 2288 msgstr "" 2251 2289 2252 #: src/models/04-globe-region.php:1 672290 #: src/models/04-globe-region.php:178 2253 2291 msgid "Region content restored from revision" 2254 2292 msgstr "" 2255 2293 2256 #: src/models/04-globe-region.php:1 682294 #: src/models/04-globe-region.php:179 2257 2295 msgid "Region Published" 2258 2296 msgstr "" 2259 2297 2260 #: src/models/04-globe-region.php:1 692298 #: src/models/04-globe-region.php:180 2261 2299 msgid "Region information saved." 2262 2300 msgstr "" 2263 2301 2264 #: src/models/04-globe-region.php:1 702302 #: src/models/04-globe-region.php:181 2265 2303 msgid "Region submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>" 2266 2304 msgstr "" 2267 2305 2268 #: src/models/04-globe-region.php:1 712306 #: src/models/04-globe-region.php:182 2269 2307 msgid "" 2270 2308 "Region scheduled for {date}. <a href=\"{preview_url}\" " … … 2272 2310 msgstr "" 2273 2311 2274 #: src/models/04-globe-region.php:1 722312 #: src/models/04-globe-region.php:183 2275 2313 msgid "" 2276 2314 "Region draft updated. <a href=\"{preview_url}\" " … … 2278 2316 msgstr "" 2279 2317 2280 #: src/models/04-globe-region.php:1 752318 #: src/models/04-globe-region.php:186 2281 2319 msgid "Region updated. Yay!" 2282 2320 msgstr "" 2283 2321 2284 #: src/models/04-globe-region.php:1 762322 #: src/models/04-globe-region.php:187 2285 2323 msgid "%s Region updated. Yay!" 2286 2324 msgstr "" 2287 2325 2288 #: src/models/04-globe-region.php:1 772326 #: src/models/04-globe-region.php:188 2289 2327 msgid "Region not updated, somebody is editing it" 2290 2328 msgstr "" 2291 2329 2292 #: src/models/04-globe-region.php:1 782330 #: src/models/04-globe-region.php:189 2293 2331 msgid "%s Region not updated, somebody is editing them" 2294 2332 msgstr "" 2295 2333 2296 #: src/models/04-globe-region.php:1 792334 #: src/models/04-globe-region.php:190 2297 2335 msgid "Region permanetly deleted. Fahrenheit 451 team was here?" 2298 2336 msgstr "" 2299 2337 2300 #: src/models/04-globe-region.php:1 802338 #: src/models/04-globe-region.php:191 2301 2339 msgid "%s Region permanently deleted. Why? :(" 2302 2340 msgstr "" 2303 2341 2304 #: src/models/04-globe-region.php:1 812342 #: src/models/04-globe-region.php:192 2305 2343 msgid "Region moved to the trash. I'm sad :(" 2306 2344 msgstr "" 2307 2345 2308 #: src/models/04-globe-region.php:1 822346 #: src/models/04-globe-region.php:193 2309 2347 msgid "%s Region moved to the trash. Why? :(" 2310 2348 msgstr "" 2311 2349 2312 #: src/models/04-globe-region.php:1 832350 #: src/models/04-globe-region.php:194 2313 2351 msgid "Region recovered from trash. Well done!" 2314 2352 msgstr "" 2315 2353 2316 #: src/models/04-globe-region.php:1 842354 #: src/models/04-globe-region.php:195 2317 2355 msgid "%s Region saved from the enemies!" 2318 2356 msgstr "" 2319 2357 2320 #: src/models/04-globe-region.php:1 882358 #: src/models/04-globe-region.php:199 2321 2359 msgid "Enter Region name here" 2322 2360 msgstr "" 2323 2361 2324 #: src/models/04-globe-region.php:2 202362 #: src/models/04-globe-region.php:231 2325 2363 msgid "Select a region" 2326 2364 msgstr "" 2327 2365 2328 #: src/models/04-globe-region.php:2 212366 #: src/models/04-globe-region.php:232 2329 2367 msgid "Region Code *" 2330 2368 msgstr "" 2331 2369 2332 #: src/models/04-globe-region.php:2 242370 #: src/models/04-globe-region.php:235 2333 2371 msgid "Fetching regions from: " 2334 2372 msgstr "" 2335 2373 2336 #: src/models/04-globe-region.php:2 732374 #: src/models/04-globe-region.php:284 2337 2375 msgid "Border Color" 2338 2376 msgstr "" 2339 2377 2340 #: src/models/04-globe-region.php:2 742378 #: src/models/04-globe-region.php:285 2341 2379 msgid "" 2342 2380 "This color will be used for the border of this individual " … … 2346 2384 msgstr "" 2347 2385 2348 #: src/models/06-globe-html.php: 192386 #: src/models/06-globe-html.php:30 2349 2387 msgid "Clone HTML Marker" 2350 2388 msgstr "" 2351 2389 2352 #: src/models/06-globe-html.php: 202390 #: src/models/06-globe-html.php:31 2353 2391 msgid "Create a copy of this HTML Marker" 2354 2392 msgstr "" 2355 2393 2356 #: src/models/06-globe-html.php: 562394 #: src/models/06-globe-html.php:67 2357 2395 msgid "HTML Marker" 2358 2396 msgstr "" 2359 2397 2360 #: src/models/06-globe-html.php: 602398 #: src/models/06-globe-html.php:71 2361 2399 msgid "Create New HTML Marker" 2362 2400 msgstr "" 2363 2401 2364 #: src/models/06-globe-html.php: 622402 #: src/models/06-globe-html.php:73 2365 2403 msgid "New HTML Marker" 2366 2404 msgstr "" 2367 2405 2368 #: src/models/06-globe-html.php: 632406 #: src/models/06-globe-html.php:74 2369 2407 msgid "View HTML Marker" 2370 2408 msgstr "" 2371 2409 2372 #: src/models/06-globe-html.php: 642410 #: src/models/06-globe-html.php:75 2373 2411 msgid "View HTML Markers" 2374 2412 msgstr "" 2375 2413 2376 #: src/models/06-globe-html.php: 652414 #: src/models/06-globe-html.php:76 2377 2415 msgid "Search HTML Markers" 2378 2416 msgstr "" 2379 2417 2380 #: src/models/06-globe-html.php: 662418 #: src/models/06-globe-html.php:77 2381 2419 msgid "No HTML Markers found." 2382 2420 msgstr "" 2383 2421 2384 #: src/models/06-globe-html.php: 672422 #: src/models/06-globe-html.php:78 2385 2423 msgid "No HTML Markers found in Trash." 2386 2424 msgstr "" 2387 2425 2388 #: src/models/06-globe-html.php: 702426 #: src/models/06-globe-html.php:81 2389 2427 msgid "HTML Marker Archives" 2390 2428 msgstr "" 2391 2429 2392 #: src/models/06-globe-html.php: 712430 #: src/models/06-globe-html.php:82 2393 2431 msgid "HTML Marker Attributes" 2394 2432 msgstr "" 2395 2433 2396 #: src/models/06-globe-html.php: 722434 #: src/models/06-globe-html.php:83 2397 2435 msgid "Insert into HTML Marker" 2398 2436 msgstr "" 2399 2437 2400 #: src/models/06-globe-html.php: 732438 #: src/models/06-globe-html.php:84 2401 2439 msgid "Uploaded to this Point" 2402 2440 msgstr "" 2403 2441 2404 #: src/models/06-globe-html.php: 742442 #: src/models/06-globe-html.php:85 2405 2443 msgid "Filter Point list" 2406 2444 msgstr "" 2407 2445 2408 #: src/models/06-globe-html.php: 752446 #: src/models/06-globe-html.php:86 2409 2447 msgid "Point list navigation" 2410 2448 msgstr "" 2411 2449 2412 #: src/models/06-globe-html.php: 762450 #: src/models/06-globe-html.php:87 2413 2451 msgid "Point list" 2414 2452 msgstr "" 2415 2453 2416 #: src/models/06-globe-html.php: 772454 #: src/models/06-globe-html.php:88 2417 2455 msgid "HTML Marker Cover Image" 2418 2456 msgstr "" 2419 2457 2420 #: src/models/06-globe-html.php: 782458 #: src/models/06-globe-html.php:89 2421 2459 msgid "Set HTML Marker Cover Image" 2422 2460 msgstr "" 2423 2461 2424 #: src/models/06-globe-html.php: 792462 #: src/models/06-globe-html.php:90 2425 2463 msgid "Remove HTML Marker Cover" 2426 2464 msgstr "" 2427 2465 2428 #: src/models/06-globe-html.php: 802466 #: src/models/06-globe-html.php:91 2429 2467 msgid "Use as HTML Marker Cover" 2430 2468 msgstr "" 2431 2469 2432 #: src/models/06-globe-html.php: 842470 #: src/models/06-globe-html.php:95 2433 2471 msgid "" 2434 2472 "HTML Marker information updated. <a href=\"{permalink}\" " … … 2436 2474 msgstr "" 2437 2475 2438 #: src/models/06-globe-html.php: 852476 #: src/models/06-globe-html.php:96 2439 2477 msgid "HTML Marker info updated" 2440 2478 msgstr "" 2441 2479 2442 #: src/models/06-globe-html.php: 882480 #: src/models/06-globe-html.php:99 2443 2481 msgid "HTML Marker content restored from revision" 2444 2482 msgstr "" 2445 2483 2446 #: src/models/06-globe-html.php: 892484 #: src/models/06-globe-html.php:100 2447 2485 msgid "HTML Marker Published" 2448 2486 msgstr "" 2449 2487 2450 #: src/models/06-globe-html.php: 902488 #: src/models/06-globe-html.php:101 2451 2489 msgid "HTML Marker information saved." 2452 2490 msgstr "" 2453 2491 2454 #: src/models/06-globe-html.php: 912492 #: src/models/06-globe-html.php:102 2455 2493 msgid "" 2456 2494 "HTML Marker submitted. <a href=\"{preview_url}\" " … … 2458 2496 msgstr "" 2459 2497 2460 #: src/models/06-globe-html.php: 922498 #: src/models/06-globe-html.php:103 2461 2499 msgid "" 2462 2500 "HTML Marker scheduled for {date}. <a href=\"{preview_url}\" " … … 2464 2502 msgstr "" 2465 2503 2466 #: src/models/06-globe-html.php: 932504 #: src/models/06-globe-html.php:104 2467 2505 msgid "" 2468 2506 "HTML Marker draft updated. <a href=\"{preview_url}\" " … … 2470 2508 msgstr "" 2471 2509 2472 #: src/models/06-globe-html.php: 962510 #: src/models/06-globe-html.php:107 2473 2511 msgid "HTML Marker updated. Yay!" 2474 2512 msgstr "" 2475 2513 2476 #: src/models/06-globe-html.php: 972514 #: src/models/06-globe-html.php:108 2477 2515 msgid "%s HTML Marker updated. Yay!" 2478 2516 msgstr "" 2479 2517 2480 #: src/models/06-globe-html.php: 982518 #: src/models/06-globe-html.php:109 2481 2519 msgid "HTML Marker not updated, somebody is editing it" 2482 2520 msgstr "" 2483 2521 2484 #: src/models/06-globe-html.php: 992522 #: src/models/06-globe-html.php:110 2485 2523 msgid "%s HTML Marker not updated, somebody is editing them" 2486 2524 msgstr "" 2487 2525 2488 #: src/models/06-globe-html.php:1 002526 #: src/models/06-globe-html.php:111 2489 2527 msgid "HTML Marker permanetly deleted. Fahrenheit 451 team was here?" 2490 2528 msgstr "" 2491 2529 2492 #: src/models/06-globe-html.php:1 012530 #: src/models/06-globe-html.php:112 2493 2531 msgid "%s HTML Marker permanently deleted. Why? :(" 2494 2532 msgstr "" 2495 2533 2496 #: src/models/06-globe-html.php:1 022534 #: src/models/06-globe-html.php:113 2497 2535 msgid "HTML Marker moved to the trash. I'm sad :(" 2498 2536 msgstr "" 2499 2537 2500 #: src/models/06-globe-html.php:1 032538 #: src/models/06-globe-html.php:114 2501 2539 msgid "%s HTML Marker moved to the trash. Why? :(" 2502 2540 msgstr "" 2503 2541 2504 #: src/models/06-globe-html.php:1 042542 #: src/models/06-globe-html.php:115 2505 2543 msgid "HTML Marker recovered from trash. Well done!" 2506 2544 msgstr "" 2507 2545 2508 #: src/models/06-globe-html.php:1 052546 #: src/models/06-globe-html.php:116 2509 2547 msgid "%s HTML Marker saved from the enemies!" 2510 2548 msgstr "" 2511 2549 2512 #: src/models/06-globe-html.php:1 092550 #: src/models/06-globe-html.php:120 2513 2551 msgid "Enter HTML Marker name here" 2514 2552 msgstr "" 2515 2553 2516 #: src/models/06-globe-html.php: 1932554 #: src/models/06-globe-html.php:204 2517 2555 msgid "Define individual click action and template." 2518 2556 msgstr "" … … 2603 2641 2604 2642 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:606 2605 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:6062606 2643 msgid "Are you sure?" 2607 2644 msgstr "" 2608 2645 2609 2646 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:607 2610 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:6072611 2647 msgid "Please enter %s or more characters" 2612 2648 msgstr "" 2613 2649 2614 2650 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:608 2615 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:6082616 2651 msgid "Searching..." 2617 2652 msgstr "" 2618 2653 2619 2654 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:609 2620 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:6092621 2655 msgid "No results found." 2622 2656 msgstr "" 2623 2657 2624 2658 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:710 2625 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:7102626 2659 msgid "Oops! Not allowed." 2627 2660 msgstr "" … … 2629 2662 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:778 2630 2663 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:782 2631 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:7782632 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:7822633 2664 msgid "Field not found!" 2634 2665 msgstr "" … … 3053 3084 msgstr "" 3054 3085 3055 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:1753056 msgid "Initial"3057 msgstr ""3058 3059 3086 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:184 3060 3087 msgid "Font Variant" … … 3174 3201 msgstr "" 3175 3202 3176 #: vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php:1 393177 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:4 083203 #: vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php:158 3204 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:472 3178 3205 msgid "Author" 3179 3206 msgstr "" 3180 3207 3181 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:4 043208 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:468 3182 3209 msgid "All Authors" 3183 3210 msgstr "" 3184 3211 3185 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php: 683212 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:89 3186 3213 msgid "Item cannot be found. Please select one to duplicate." 3187 3214 msgstr "" 3188 3215 3189 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php: 723216 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:96 3190 3217 msgid "Please select an item to duplicate." 3191 3218 msgstr "" -
interactive-globes/tags/1.4.8/src/models/01-globe-dotlabel.php
r3269027 r3274550 9 9 $action_content_editor = isset( $options['actionContent_editor'] ) && ! empty( $options['actionContent_editor'] ) ? $options['actionContent_editor'] : 'text'; 10 10 $public_cpts = isset( $options['public_cpts'] ) && $options['public_cpts'] ? true : false; 11 12 11 13 12 $dot_labels = [ … … 31 30 'admin_filters' => array( 32 31 'globe_id' => array( 33 'title' => 'Parent Globe ID', 34 'meta_search_key' => 'globe_id', 35 'compare' => '=', // Exact match 36 'type' => 'NUMERIC', // Ensures numeric comparison 32 'title' => 'Parent Globe ID', 33 'meta_key' => 'globe_id', 34 'options' => 'itt_globes_get_dotlabel_globe_values', 35 'use_key' => true, 36 'key' => 'globe_id', 37 37 ), 38 38 ), … … 49 49 'orderby' => 'meta_value_num', 50 50 'function' => function () { 51 global $post; 52 $globe_id = get_post_meta( $post->ID, 'globe_id', true ); 53 if ( $globe_id ) { 54 $globe_title = get_the_title( $globe_id ); 55 if ( $globe_title ) { 56 echo esc_html( $globe_title ); 57 } else { 58 echo esc_html( $globe_id ); 59 } 51 global $post; 52 $globe_id = get_post_meta( $post->ID, 'globe_id', true ); 53 if ( ! $globe_id ) { 54 return; 60 55 } 56 $globe_title = get_the_title( $globe_id ); 57 if ( $globe_title ) { 58 echo esc_html( '[ ' . $globe_id . ' ] ' . $globe_title ); 59 return; 60 } 61 echo esc_html( $globe_id ); 61 62 }, 62 63 ), … … 247 248 ]; 248 249 249 add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'add_itt_globe_dotlabel_post_type', 10, 2 ); 250 function add_itt_globe_dotlabel_post_type( $post_types ) { 250 function itt_globes_get_dotlabel_globe_values() { 251 global $wpdb; 252 253 $post_type = 'itt_globe_dotlabel'; // Replace with your post type 254 $meta_key = 'globe_id'; // Replace if your meta key is different 255 256 $globe_ids = $wpdb->get_col( 257 $wpdb->prepare( 258 "SELECT DISTINCT meta_value 259 FROM {$wpdb->postmeta} 260 WHERE meta_key = %s 261 AND post_id IN ( 262 SELECT ID FROM {$wpdb->posts} WHERE post_type = %s 263 )", 264 $meta_key, 265 $post_type 266 ) 267 ); 268 269 $options = []; 270 sort( $globe_ids, SORT_NUMERIC ); 271 foreach ( $globe_ids as $globe_id ) { 272 if ( ! is_numeric( $globe_id ) ) { 273 continue; 274 } 275 $globe_post = get_post( $globe_id ); 276 if ( ! $globe_post ) { 277 continue; 278 } 279 $options[ $globe_id ] = '[ ' . $globe_id . ' ] ' . $globe_post->post_title; 280 } 281 return $options; 282 } 283 284 add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'itt_globes_add_itt_globe_dotlabel_post_type', 10, 2 ); 285 function itt_globes_add_itt_globe_dotlabel_post_type( $post_types ) { 251 286 $post_types[] = 'itt_globe_dotlabel'; 252 287 return $post_types; 253 288 } 254 289 255 add_filter( 'itt_globes/render/post_setup_meta', ' add_dotlabel_to_shortcode', 10, 2 );256 function add_dotlabel_to_shortcode( $globe_meta, $globe_id ) {290 add_filter( 'itt_globes/render/post_setup_meta', 'itt_globes_add_dotlabel_to_shortcode', 10, 2 ); 291 function itt_globes_add_dotlabel_to_shortcode( $globe_meta, $globe_id ) { 257 292 258 293 if ( $globe_id === 0 ) { -
interactive-globes/tags/1.4.8/src/models/02-globe-point.php
r3269027 r3274550 9 9 $public_cpts = isset( $options['public_cpts'] ) && $options['public_cpts'] ? true : false; 10 10 11 12 11 $points = [ 13 12 'active' => true, … … 15 14 'name' => 'itt_globe_point', 16 15 'features' => [ 17 'quick_edit' => true,18 'single_export' => true,19 16 'duplicate' => array( 20 17 'label' => __( 'Clone Point', 'interactive-globes' ), 21 18 'attr_title' => __( 'Create a copy of this point', 'interactive-globes' ), 22 19 ), 20 'single_export' => array( 21 'label' => __( 'Download Points Export File', 'interactive-globes' ), 22 ), 23 23 'admin_filters' => array( 24 24 'globe_id' => array( 25 'title' => 'Parent Globe ID', 26 'meta_search_key' => 'globe_id', 27 'compare' => '=', // Exact match 28 'type' => 'NUMERIC', // Ensures numeric comparison 29 ), 30 ), 31 'admin_cols' => array( 25 'title' => 'Parent Globe ID', 26 'meta_key' => 'globe_id', 27 'options' => 'itt_globes_get_point_globe_values', 28 'use_key' => true, 29 'key' => 'globe_id', 30 ), 31 ), 32 'admin_cols' => array( 32 33 'title', 33 34 'id' => array( … … 43 44 global $post; 44 45 $globe_id = get_post_meta( $post->ID, 'globe_id', true ); 45 if ( $globe_id ) { 46 $globe_title = get_the_title( $globe_id ); 47 if ( $globe_title ) { 48 echo esc_html( $globe_title . ' [ ' . $globe_id . ' ]' ); 49 } else { 50 echo esc_html( $globe_id ); 51 } 46 if ( ! $globe_id ) { 47 return; 52 48 } 49 $globe_title = get_the_title( $globe_id ); 50 if ( $globe_title ) { 51 echo esc_html( '[ ' . $globe_id . ' ] ' . $globe_title ); 52 return; 53 } 54 echo esc_html( $globe_id ); 53 55 }, 54 56 ), … … 239 241 ]; 240 242 241 add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'add_itt_globe_point_post_type', 10, 2 ); 242 function add_itt_globe_point_post_type( $post_types ) { 243 function itt_globes_get_point_globe_values() { 244 global $wpdb; 245 246 $post_type = 'itt_globe_point'; // Replace with your post type 247 $meta_key = 'globe_id'; // Replace if your meta key is different 248 249 $globe_ids = $wpdb->get_col( 250 $wpdb->prepare( 251 "SELECT DISTINCT meta_value 252 FROM {$wpdb->postmeta} 253 WHERE meta_key = %s 254 AND post_id IN ( 255 SELECT ID FROM {$wpdb->posts} WHERE post_type = %s 256 )", 257 $meta_key, 258 $post_type 259 ) 260 ); 261 262 $options = []; 263 sort( $globe_ids, SORT_NUMERIC ); 264 foreach ( $globe_ids as $globe_id ) { 265 if ( ! is_numeric( $globe_id ) ) { 266 continue; 267 } 268 $globe_post = get_post( $globe_id ); 269 if ( ! $globe_post ) { 270 continue; 271 } 272 $options[ $globe_id ] = '[ ' . $globe_id . ' ] ' . $globe_post->post_title; 273 } 274 return $options; 275 } 276 277 add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'itt_globes_add_itt_globe_point_post_type', 10, 2 ); 278 function itt_globes_add_itt_globe_point_post_type( $post_types ) { 243 279 $post_types[] = 'itt_globe_point'; 244 280 return $post_types; 245 281 } 246 282 247 add_filter( 'itt_globes/render/post_setup_meta', ' add_point_to_shortcode', 10, 2 );248 function add_point_to_shortcode( $globe_meta, $globe_id ) {283 add_filter( 'itt_globes/render/post_setup_meta', 'itt_globes_add_point_to_shortcode', 10, 2 ); 284 function itt_globes_add_point_to_shortcode( $globe_meta, $globe_id ) { 249 285 250 286 if ( $globe_id === 0 ) { … … 330 366 } 331 367 332 333 368 $points = apply_filters( 'itt_globes/point/model', $points ); 334 369 return $points; -
interactive-globes/tags/1.4.8/vendor-prefixed/autoload.php
r3269027 r3274550 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 23 20 require_once __DIR__ . '/composer/autoload_real.php'; 24 21 25 return ComposerAutoloaderInit 063318fd13e99c35a4f3e7f801033e0f::getLoader();22 return ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0::getLoader(); -
interactive-globes/tags/1.4.8/vendor-prefixed/composer/autoload_classmap.php
r3263746 r3274550 148 148 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/Duplicate.php', 149 149 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 150 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => $vendorDir . '/saltus/framework/src/Features/FeatureA/FeatureA.php',151 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => $vendorDir . '/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',152 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => $vendorDir . '/saltus/framework/src/Features/Meta/CMB2Meta.php',153 150 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $vendorDir . '/saltus/framework/src/Features/Meta/CodestarMeta.php', 154 151 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => $vendorDir . '/saltus/framework/src/Features/Meta/Meta.php', -
interactive-globes/tags/1.4.8/vendor-prefixed/composer/autoload_real.php
r3269027 r3274550 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 063318fd13e99c35a4f3e7f801033e0f5 class ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 require __DIR__ . '/platform_check.php'; 26 27 spl_autoload_register(array('ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f', 'loadClassLoader'), true, true); 25 spl_autoload_register(array('ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0', 'loadClassLoader'), true, true); 28 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 063318fd13e99c35a4f3e7f801033e0f', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0', 'loadClassLoader')); 30 28 31 29 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::getInitializer($loader)); 33 31 34 32 $loader->setClassMapAuthoritative(true); -
interactive-globes/tags/1.4.8/vendor-prefixed/composer/autoload_static.php
r3269027 r3274550 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f7 class ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 173 173 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/Duplicate.php', 174 174 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 175 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => __DIR__ . '/..' . '/saltus/framework/src/Features/FeatureA/FeatureA.php',176 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => __DIR__ . '/..' . '/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',177 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CMB2Meta.php',178 175 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CodestarMeta.php', 179 176 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/Meta.php', … … 306 303 { 307 304 return \Closure::bind(function () use ($loader) { 308 $loader->prefixLengthsPsr4 = ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f::$prefixLengthsPsr4;309 $loader->prefixDirsPsr4 = ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f::$prefixDirsPsr4;310 $loader->classMap = ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f::$classMap;305 $loader->prefixLengthsPsr4 = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$prefixLengthsPsr4; 306 $loader->prefixDirsPsr4 = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$prefixDirsPsr4; 307 $loader->classMap = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$classMap; 311 308 312 309 }, null, ClassLoader::class); -
interactive-globes/tags/1.4.8/vendor-prefixed/composer/installed.json
r3263746 r3274550 73 73 "type": "git", 74 74 "url": "https://github.com/SaltusDev/saltus-framework.git", 75 "reference": " 930112677d90dbf2c783698d800d8234594fa836"75 "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56" 76 76 }, 77 77 "dist": { 78 78 "type": "zip", 79 "url": "https://api.github.com/repos/SaltusDev/saltus-framework/zipball/ 930112677d90dbf2c783698d800d8234594fa836",80 "reference": " 930112677d90dbf2c783698d800d8234594fa836",79 "url": "https://api.github.com/repos/SaltusDev/saltus-framework/zipball/25a9204d7af6d3224aa6c98d2263ae76c05d7b56", 80 "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56", 81 81 "shasum": "" 82 82 }, 83 83 "require": { 84 "hassankhan/config": "^3. 1.0",84 "hassankhan/config": "^3.2.0", 85 85 "php": ">=7.2" 86 86 }, 87 87 "require-dev": { 88 "phpunit/phpunit": "^11.4.3", 89 "squizlabs/php_codesniffer": "^3.10.3" 88 "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 89 "digitalrevolution/php-codesniffer-baseline": "^1.1.2", 90 "php-stubs/woocommerce-stubs": "^9.2", 91 "php-stubs/wordpress-stubs": "^6.7", 92 "phpcompatibility/phpcompatibility-wp": "*", 93 "phpstan/extension-installer": "^1.3", 94 "phpunit/phpunit": "^12.0", 95 "squizlabs/php_codesniffer": "^3.7", 96 "szepeviktor/phpstan-wordpress": "^2.1", 97 "wp-coding-standards/wpcs": "^3.1", 98 "yoast/phpunit-polyfills": "^4.0" 90 99 }, 91 "time": "2025-0 2-18T13:11:29+00:00",100 "time": "2025-04-16T08:50:13+00:00", 92 101 "type": "project", 93 102 "installation-source": "dist", … … 107 116 "scripts": { 108 117 "test": [ 109 "vendor/bin/phpcs" 118 "./vendor/bin/phpunit -c phpunit.xml" 119 ], 120 "phpstan": [ 121 "./vendor/bin/phpstan analyse --memory-limit=2G" 122 ], 123 "phpcs": [ 124 "./vendor/bin/phpcs --standard=phpcs.xml" 110 125 ] 111 126 }, -
interactive-globes/tags/1.4.8/vendor-prefixed/hassankhan/config/src/Config.php
r3263746 r3274550 8 8 use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface; 9 9 use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface; 10 11 10 /** 12 11 * Configuration reader and writer for PHP. … … 26 25 * @var array 27 26 */ 28 protected $supportedParsers = [ 29 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Php', 30 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Ini', 31 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Json', 32 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Xml', 33 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Yaml', 34 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Properties', 35 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Serialize' 36 ]; 37 27 protected $supportedParsers = ['Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Php', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Ini', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Json', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Xml', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Yaml', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Properties', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\Serialize']; 38 28 /** 39 29 * All formats supported by Config. … … 41 31 * @var array 42 32 */ 43 protected $supportedWriters = [ 44 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Ini', 45 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Json', 46 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Xml', 47 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Yaml', 48 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Properties', 49 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Serialize' 50 ]; 51 33 protected $supportedWriters = ['Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Ini', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Json', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Xml', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Yaml', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Properties', 'Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\Serialize']; 52 34 /** 53 35 * Static method for loading a Config instance. … … 63 45 return new static($values, $parser, $string); 64 46 } 65 66 47 /** 67 48 * Loads a Config instance. … … 78 59 $this->loadFromFile($values, $parser); 79 60 } 80 81 61 parent::__construct($this->data); 82 62 } 83 84 63 /** 85 64 * Loads configuration from file. … … 92 71 protected function loadFromFile($path, ?ParserInterface $parser = null) 93 72 { 94 $paths = $this->getValidPath($path);73 $paths = $this->getValidPath($path); 95 74 $this->data = []; 96 97 75 foreach ($paths as $path) { 98 76 if ($parser === null) { 99 77 // Get file information 100 $info = pathinfo($path);101 $parts = explode('.', $info['basename']);78 $info = pathinfo($path); 79 $parts = explode('.', $info['basename']); 102 80 $extension = array_pop($parts); 103 104 81 // Skip the `dist` extension 105 82 if ($extension === 'dist') { 106 83 $extension = array_pop($parts); 107 84 } 108 109 85 // Get file parser 110 86 $parser = $this->getParser($extension); 111 112 87 // Try to load file 113 88 $this->data = array_replace_recursive($this->data, $parser->parseFile($path)); 114 115 89 // Clean parser 116 90 $parser = null; … … 121 95 } 122 96 } 123 124 97 /** 125 98 * Writes configuration to file. … … 134 107 if ($writer === null) { 135 108 // Get file information 136 $info = pathinfo($filename);137 $parts = explode('.', $info['basename']);109 $info = pathinfo($filename); 110 $parts = explode('.', $info['basename']); 138 111 $extension = array_pop($parts); 139 140 112 // Skip the `dist` extension 141 113 if ($extension === 'dist') { 142 114 $extension = array_pop($parts); 143 115 } 144 145 116 // Get file writer 146 117 $writer = $this->getWriter($extension); 147 148 118 // Try to save file 149 119 $writer->toFile($this->all(), $filename); 150 151 120 // Clean writer 152 121 $writer = null; … … 156 125 } 157 126 } 158 159 127 /** 160 128 * Loads configuration from string. … … 166 134 { 167 135 $this->data = []; 168 169 136 // Try to parse string 170 137 $this->data = array_replace_recursive($this->data, $parser->parseString($configuration)); 171 138 } 172 173 139 /** 174 140 * Writes configuration to string. … … 181 147 return $writer->toString($this->all(), $pretty); 182 148 } 183 184 149 /** 185 150 * Gets a parser for a given file extension. … … 187 152 * @param string $extension 188 153 * 189 * @return Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface154 * @return \Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface 190 155 * 191 156 * @throws UnsupportedFormatException If `$extension` is an unsupported file format … … 198 163 } 199 164 } 200 201 165 // If none exist, then throw an exception 202 166 throw new UnsupportedFormatException('Unsupported configuration format'); 203 167 } 204 205 168 /** 206 169 * Gets a writer for a given file extension. … … 208 171 * @param string $extension 209 172 * 210 * @return Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface173 * @return \Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface 211 174 * 212 175 * @throws UnsupportedFormatException If `$extension` is an unsupported file format … … 219 182 } 220 183 } 221 222 184 // If none exist, then throw an exception 223 throw new UnsupportedFormatException('Unsupported configuration format'.$extension); 224 } 225 185 throw new UnsupportedFormatException('Unsupported configuration format' . $extension); 186 } 226 187 /** 227 188 * Gets an array of paths … … 236 197 { 237 198 $paths = []; 238 239 199 foreach ($path as $unverifiedPath) { 240 200 try { … … 246 206 continue; 247 207 } 248 249 208 $optionalPath = ltrim($unverifiedPath, '?'); 250 209 $paths = array_merge($paths, $this->getValidPath($optionalPath)); … … 254 213 continue; 255 214 } 256 257 215 // Otherwise rethrow the exception 258 216 throw $e; 259 217 } 260 218 } 261 262 219 return $paths; 263 220 } 264 265 221 /** 266 222 * Checks `$path` to see if it is either an array, a directory, or a file. … … 280 236 return $this->getPathFromArray($path); 281 237 } 282 283 238 // If `$path` is a directory 284 239 if (is_dir($path)) { 285 240 $paths = glob($path . '/*.*'); 286 241 if (empty($paths)) { 287 throw new EmptyDirectoryException("Configuration directory: [$path] is empty"); 288 } 289 242 throw new EmptyDirectoryException("Configuration directory: [{$path}] is empty"); 243 } 290 244 return $paths; 291 245 } 292 293 246 // If `$path` is not a file, throw an exception 294 247 if (!file_exists($path)) { 295 throw new FileNotFoundException("Configuration file: [$path] cannot be found"); 296 } 297 248 throw new FileNotFoundException("Configuration file: [{$path}] cannot be found"); 249 } 298 250 return [$path]; 299 251 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Core.php
r3263746 r3274550 38 38 39 39 // Prefixes to use. 40 const HOOK_PREFIX = ' ';40 const HOOK_PREFIX = 'saltus/framework/'; 41 41 const SERVICE_PREFIX = ''; 42 42 … … 109 109 $this->modeler = new Modeler( $model_factory ); 110 110 $project_path = $this->project['path']; 111 /** @deprecated 1.2.0 */ 111 112 $priority = apply_filters( 'saltus_modeler_priority', 1 ); 113 $priority = apply_filters( 'saltus/framework/modeler/priority', 1 ); 112 114 add_action( 113 115 'init', -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminCols/AdminCols.php
r3263746 r3274550 26 26 */ 27 27 public static function make( $name, $project, $args ) { 28 return new SaltusAdminCols( $name, $ project, $args );28 return new SaltusAdminCols( $name, $args ); 29 29 } 30 30 … … 41 41 return is_admin(); 42 42 } 43 44 43 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php
r3263746 r3274550 15 15 * Enable custom administration columns 16 16 * 17 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion 17 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion with notable changes: 18 * - models can override the default sort order 18 19 */ 19 20 final class SaltusAdminCols implements Processable { 20 21 22 /** 23 * @var string $name The name of the custom post type (CPT) 24 */ 21 25 private $name; 22 private $project; 26 27 /** 28 * @var array $args List of columns 29 */ 23 30 private $args; 24 31 … … 26 33 * @var array Default columns 27 34 */ 28 private $default_columns ;29 30 /** 31 * @var array Managed colum sn32 */ 33 private $managed_columns = null;35 private $default_columns = null; 36 37 /** 38 * @var array Managed columns 39 */ 40 private ?array $managed_columns = null; 34 41 35 42 /** 36 43 * Instantiate this Service object. 37 44 * 38 */ 39 public function __construct( string $name, array $project, array $args ) { 40 $this->project = $project; 41 $this->name = $name; 42 $this->args = $args; 45 * @param string $name The name of the custom post type (CPT) 46 * @param array $args List of columns 47 */ 48 public function __construct( string $name, array $args ) { 49 $this->name = $name; 50 $this->args = $args; 43 51 } 44 52 … … 52 60 add_filter( 'manage_posts_columns', [ $this, 'log_default_cols' ], 0 ); 53 61 add_filter( 'manage_pages_columns', [ $this, 'log_default_cols' ], 0 ); 54 add_filter( "manage_edit-{$this->name}_sortable_columns", [ $this, 'sortables' ] ); 55 add_filter( "manage_{$this->name}_posts_columns", [ $this, 'manage_columns' ] ); 56 add_action( "manage_{$this->name}_posts_custom_column", [ $this, 'manage_custom_columns' ], 10, 2 ); 62 add_filter( 'manage_media_columns', [ $this, 'log_default_cols' ], 0 ); 63 if ( $this->name === 'attachment' ) { 64 add_filter( 'manage_upload_sortable_columns', [ $this, 'sortables' ] ); 65 add_filter( 'manage_media_columns', [ $this, 'manage_columns' ] ); 66 add_action( 'manage_media_custom_column', [ $this, 'manage_custom_columns' ], 10, 2 ); 67 } else { 68 add_filter( "manage_edit-{$this->name}_sortable_columns", [ $this, 'sortables' ] ); 69 add_filter( "manage_{$this->name}_posts_columns", [ $this, 'manage_columns' ] ); 70 add_action( "manage_{$this->name}_posts_custom_column", [ $this, 'manage_custom_columns' ], 10, 2 ); 71 } 72 57 73 add_action( 'load-edit.php', [ $this, 'default_sort' ] ); 58 74 add_filter( 'pre_get_posts', [ $this, 'maybe_sort_by_fields' ] ); … … 73 89 74 90 /** 75 * Adds ourcustom columns to the list of sortable columns.76 * 77 * @param array $cols Array of sortable columns keyed by the column ID.78 * @return array Updated array of sortable columns.91 * Adds the custom columns to the list of sortable columns. 92 * 93 * @param array<string,string> $cols Array of sortable columns keyed by the column ID. 94 * @return array<string,string> Updated array of sortable columns. 79 95 */ 80 96 public function sortables( array $cols ): array { … … 99 115 * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-columns 100 116 * 101 * @param array $cols Associative array of columns102 * @return array Updated array of columns117 * @param array<string,string> $cols Associative array of columns 118 * @return array<string,string> Updated array of columns 103 119 */ 104 120 public function manage_columns( array $cols ): array { … … 121 137 } 122 138 123 # Add our custom columns: 124 foreach ( array_filter( $this->args ) as $id => $col ) { 139 # Add the custom columns: 140 /** @var array<string,(string|mixed[])> */ 141 $admin_cols = array_filter( $this->args ); 142 143 foreach ( $admin_cols as $id => $col ) { 125 144 if ( is_string( $col ) && isset( $cols[ $col ] ) ) { 126 145 # Existing (ie. built-in) column with id as the value … … 137 156 $k = 'author'; 138 157 } 139 $new_cols[ $k ] = esc_html__( 'Author', ' extended-cpts' );158 $new_cols[ $k ] = esc_html__( 'Author', 'saltus-framework' ); 140 159 } elseif ( is_array( $col ) ) { 141 160 if ( isset( $col['cap'] ) && ! current_user_can( $col['cap'] ) ) { … … 146 165 $new_cols[ $id ] = call_user_func( $col['title_cb'], $col ); 147 166 } else { 148 $title = esc_html( $ col['title'] ?? $this->get_item_title( $col ) ?? $id);167 $title = esc_html( $this->get_item_title( $col, $id ) ); 149 168 150 169 if ( isset( $col['title_icon'] ) ) { … … 172 191 * Returns a sensible title for the current item (usually the arguments array for a column) 173 192 * 174 * @param array $item An array of arguments 175 * @return string|null The item title 176 */ 177 protected function get_item_title( array $item ) { 178 if ( isset( $item['taxonomy'] ) ) { 193 * @param array<string,mixed> $item An array of arguments. 194 * @param string $fallback Fallback item title. 195 * @return string The item title. 196 */ 197 protected function get_item_title( array $item, string $fallback = '' ): string { 198 if ( isset( $item['title'] ) ) { 199 return $item['title']; 200 201 } elseif ( isset( $item['taxonomy'] ) ) { 179 202 $tax = get_taxonomy( $item['taxonomy'] ); 180 203 if ( $tax ) { … … 201 224 ) ) ); 202 225 } 203 return null; 204 } 205 206 /** 207 * Output the column data for our custom columns. 208 * 209 * @param string $col The column name 210 */ 211 public function manage_custom_columns( string $col, $post_id ) { 226 return $fallback; 227 } 228 229 /** 230 * Output the column data for the custom columns. 231 * 232 * @param string $col The column name. 233 * @param int $post_id The post ID. 234 */ 235 public function manage_custom_columns( string $col, int $post_id ): void { 212 236 # Shorthand: 213 237 $c = $this->args; 214 238 215 # We're only interested in ourcustom columns:239 # We're only interested in the custom columns: 216 240 $custom_cols = array_filter( array_keys( $c ) ); 217 241 … … 221 245 222 246 if ( isset( $c[ $col ]['post_cap'] ) && ! current_user_can( $c[ $col ]['post_cap'], get_the_ID() ) ) { 247 return; 248 } 249 $post = get_post( $post_id ); 250 251 if ( ! $post ) { 223 252 return; 224 253 } … … 229 258 230 259 if ( isset( $c[ $col ]['function'] ) ) { 231 call_user_func( $c[ $col ]['function'] );260 call_user_func( $c[ $col ]['function'], $post ); 232 261 } elseif ( isset( $c[ $col ]['meta_key'] ) ) { 233 $this->col_post_meta( $ c[ $col ]['meta_key'], $c[ $col ] );262 $this->col_post_meta( $post, $c[ $col ]['meta_key'], $c[ $col ] ); 234 263 } elseif ( isset( $c[ $col ]['taxonomy'] ) ) { 235 $this->col_taxonomy( $post _id, $c[ $col ]['taxonomy'], $c[ $col ] );264 $this->col_taxonomy( $post, $c[ $col ]['taxonomy'], $c[ $col ] ); 236 265 } elseif ( isset( $c[ $col ]['post_field'] ) ) { 237 $this->col_post_field( $post _id, $c[ $col ]['post_field'], $c[ $col ] );266 $this->col_post_field( $post, $c[ $col ]['post_field'], $c[ $col ] ); 238 267 } elseif ( isset( $c[ $col ]['featured_image'] ) ) { 239 $this->col_featured_image( $ c[ $col ]['featured_image'], $c[ $col ] );268 $this->col_featured_image( $post, $c[ $col ]['featured_image'], $c[ $col ] ); 240 269 } 241 270 } … … 244 273 * Outputs column data for a post meta field. 245 274 * 246 * @param string $meta_key The post meta key 247 * @param array $args Array of arguments for this field 248 */ 249 public function col_post_meta( string $meta_key, array $args ) { 250 $vals = get_post_meta( get_the_ID(), $meta_key, false ); 275 * @param \WP_Post $post The post object. 276 * @param string $meta_key The post meta key. 277 * @param array<string,mixed> $args Array of arguments for this field. 278 */ 279 public function col_post_meta( \WP_Post $post, string $meta_key, array $args ): void { 280 $vals = get_post_meta( $post->ID, $meta_key, false ); 251 281 $echo = []; 252 282 … … 257 287 $args['date_format'] = get_option( 'date_format' ); 258 288 } 259 260 foreach ( $vals as $val ) { 261 $val_time = strtotime( $val ); 262 263 if ( $val_time ) { 264 $val = $val_time; 265 } 266 267 if ( is_numeric( $val ) ) { 268 $echo[] = date_i18n( $args['date_format'], $val ); 269 } elseif ( ! empty( $val ) ) { 270 $echo[] = mysql2date( $args['date_format'], $val ); 271 } 272 } 289 $echo = $this->col_date_format( $vals, $args['date_format'] ); 273 290 } else { 274 291 foreach ( $vals as $val ) { 275 276 292 if ( ! empty( $val ) || ( $val === '0' ) ) { 277 293 $echo[] = $val; … … 286 302 } 287 303 } 304 /** 305 * Formats the date values for the column. 306 * 307 * @param array<string> $vals The values to format. 308 * @param string $date_format The date format to use. 309 * @return array<string> The formatted date values. 310 */ 311 private function col_date_format( $vals, $date_format ) { 312 313 $echo = []; 314 foreach ( $vals as $val ) { 315 try { 316 $val_time = ( new \DateTime( '@' . $val ) )->format( 'U' ); 317 } catch ( \Exception $e ) { 318 $val_time = strtotime( $val ); 319 } 320 321 if ( $val_time !== false ) { 322 $val = $val_time; 323 } 324 325 if ( is_numeric( $val ) ) { 326 $echo[] = date_i18n( $date_format, (int) $val ); 327 } elseif ( ! empty( $val ) ) { 328 $echo[] = mysql2date( $date_format, $val ); 329 } 330 } 331 return $echo; 332 } 288 333 289 334 /** 290 335 * Outputs column data for a taxonomy's term names. 291 336 * 292 * @param string $taxonomy The taxonomy name 293 * @param array $args Array of arguments for this field 294 */ 295 public function col_taxonomy( int $post_id, string $taxonomy, array $args ) { 296 297 $post = get_post( $post_id ); 298 $terms = get_the_terms( $post_id, $taxonomy ); 299 $tax = get_taxonomy( $taxonomy ); 300 337 * @param \WP_Post $post The post object. 338 * @param string $taxonomy The taxonomy name. 339 * @param array<string,mixed> $args Array of arguments for this field. 340 */ 341 public function col_taxonomy( \WP_Post $post, string $taxonomy, array $args ): void { 342 $tax = get_taxonomy( $taxonomy ); 343 if ( ! $tax ) { 344 return; 345 } 346 347 $terms = get_the_terms( $post, $taxonomy ); 301 348 if ( is_wp_error( $terms ) ) { 302 349 echo esc_html( $terms->get_error_message() ); 303 350 return; 304 351 } 305 306 352 if ( empty( $terms ) ) { 307 353 printf( … … 316 362 foreach ( $terms as $term ) { 317 363 if ( $args['link'] ) { 318 switch ( $args['link'] ) { 319 320 case 'view': 321 if ( $tax->public ) { 322 // https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1096 323 // @codingStandardsIgnoreStart 324 $out[] = sprintf( 325 '<a href="%1$s">%2$s</a>', 326 esc_url( get_term_link( $term ) ), 327 esc_html( $term->name ) 328 ); 329 // @codingStandardsIgnoreEnd 330 } else { 331 $out[] = esc_html( $term->name ); 332 } 333 break; 334 335 case 'edit': 336 if ( current_user_can( $tax->cap->edit_terms ) ) { 337 $out[] = sprintf( 338 '<a href="%1$s">%2$s</a>', 339 esc_url( get_edit_term_link( $term->term_id, $taxonomy, $post->post_type ) ), 340 esc_html( $term->name ) 341 ); 342 } else { 343 $out[] = esc_html( $term->name ); 344 } 345 break; 346 347 case 'list': 348 $link = add_query_arg( 349 [ 350 'post_type' => $post->post_type, 351 $taxonomy => $term->slug, 352 ], 353 admin_url( 'edit.php' ) 354 ); 355 $out[] = sprintf( 356 '<a href="%1$s">%2$s</a>', 357 esc_url( $link ), 358 esc_html( $term->name ) 359 ); 360 break; 361 362 } 364 $out[] = $this->col_taxonomy_link( $args['link'], $tax, $taxonomy, $term, $post ); 363 365 } else { 364 366 $out[] = esc_html( $term->name ); … … 368 370 echo implode( ', ', $out ); 369 371 } 370 372 /** 373 * Outputs column data for a taxonomy term link. 374 * 375 * @param string $link The link type. 376 * @param \WP_Taxonomy $tax The taxonomy object. 377 * @param string $taxonomy The taxonomy name. 378 * @param \WP_Term $term The term object. 379 * @param \WP_Post $post The post object. 380 */ 381 private function col_taxonomy_link( $link, $tax, $taxonomy, $term, $post ) { 382 $out = ''; 383 switch ( $link ) { 384 385 case 'view': 386 if ( $tax->public ) { 387 // https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1096 388 // @codingStandardsIgnoreStart 389 $out = sprintf( 390 '<a href="%1$s">%2$s</a>', 391 esc_url( get_term_link( $term ) ), 392 esc_html( $term->name ) 393 ); 394 // @codingStandardsIgnoreEnd 395 } else { 396 $out = esc_html( $term->name ); 397 } 398 break; 399 400 case 'edit': 401 if ( current_user_can( $tax->cap->edit_terms ) ) { 402 $out = sprintf( 403 '<a href="%1$s">%2$s</a>', 404 esc_url( get_edit_term_link( $term->term_id, $taxonomy, $post->post_type ) ), 405 esc_html( $term->name ) 406 ); 407 } else { 408 $out = esc_html( $term->name ); 409 } 410 break; 411 412 case 'list': 413 $link = add_query_arg( 414 [ 415 'post_type' => $post->post_type, 416 $taxonomy => $term->slug, 417 ], 418 admin_url( 'edit.php' ) 419 ); 420 $out = sprintf( 421 '<a href="%1$s">%2$s</a>', 422 esc_url( $link ), 423 esc_html( $term->name ) 424 ); 425 break; 426 } 427 return $out; 428 } 371 429 /** 372 430 * Outputs column data for a post field. 373 431 * 374 * @param string $field The post field375 * @param array $args Array of arguments for this field376 * /377 public function col_post_field( int $post_id, string $field, array $args ) {378 $post = get_post( $post_id );432 * @param \WP_Post $post The post object. 433 * @param string $field The post field. 434 * @param array<string,mixed> $args Array of arguments for this field. 435 */ 436 public function col_post_field( \WP_Post $post, string $field, array $args ): void { 379 437 switch ( $field ) { 380 438 … … 414 472 echo esc_html( get_post_field( $field, $post ) ); 415 473 break; 416 417 474 } 418 475 } … … 421 478 * Outputs column data for a post's featured image. 422 479 * 423 * @param string $image_size The image size 424 * @param array $args Array of `width` and `height` attributes for the image 425 */ 426 public function col_featured_image( string $image_size, array $args ) { 480 * @param \WP_Post $post The post object. 481 * @param string $image_size The image size. 482 * @param array<string,string|int> $args Array of `width` and `height` attributes for the image. 483 */ 484 public function col_featured_image( \WP_Post $post, string $image_size, array $args ): void { 427 485 if ( ! function_exists( 'has_post_thumbnail' ) ) { 428 486 return; … … 495 553 * Sets the relevant query vars for sorting posts by our admin sortables. 496 554 * 497 * @param WP_Query $wp_query The current `WP_Query` object.555 * @param \WP_Query $wp_query The current `WP_Query` object. 498 556 */ 499 557 public function maybe_sort_by_fields( \WP_Query $wp_query ) { … … 514 572 515 573 /** 516 * Filters the query's SQL clauses so we can sort postsby taxonomy terms.517 * 518 * @param array $clauses The current query's SQL clauses.519 * @param WP_Query$wp_query The current `WP_Query` object.520 * @return array The updated SQL clauses.574 * Filters the query's SQL clauses so the posts can be sorted by taxonomy terms. 575 * 576 * @param array<string,string> $clauses The current query's SQL clauses. 577 * @param \WP_Query $wp_query The current `WP_Query` object. 578 * @return array<string,string> The updated SQL clauses 521 579 */ 522 580 public function maybe_sort_by_taxonomy( array $clauses, \WP_Query $wp_query ): array { … … 538 596 * sort it by the requested orderby field. 539 597 * 540 * @param array $vars The public query vars, usually from `$wp_query->query`.541 * @param array $sortables The sortables valid for this query (usually the value of the `admin_cols` or542 * `site_sortables` argument when registering an extended post type.543 * @return array The list of private and public query vars to apply to the query.598 * @param array<string,mixed> $vars The public query vars, usually from `$wp_query->query`. 599 * @param array<string,mixed> $sortables The sortables valid for this query (usually the value of the `admin_cols` or 600 * `site_sortables` argument when registering an extended post type. 601 * @return array<string,mixed> The list of private and public query vars to apply to the query. 544 602 */ 545 603 public static function get_sort_field_vars( array $vars, array $sortables ): array { … … 556 614 } 557 615 558 $ orderby= $sortables[ $vars['orderby'] ];559 560 if ( ! is_array( $ orderby) ) {561 return []; 562 } 563 564 if ( isset( $ orderby['sortable'] ) && ! $orderby['sortable'] ) {616 $admin_col = $sortables[ $vars['orderby'] ]; 617 618 if ( ! is_array( $admin_col ) ) { 619 return []; 620 } 621 622 if ( isset( $admin_col['sortable'] ) && ! $admin_col['sortable'] ) { 565 623 return []; 566 624 } … … 568 626 $return = []; 569 627 570 if ( isset( $ orderby['meta_key'] ) ) {571 $return['meta_key'] = $ orderby['meta_key'];628 if ( isset( $admin_col['meta_key'] ) ) { 629 $return['meta_key'] = $admin_col['meta_key']; 572 630 $return['orderby'] = 'meta_value'; 573 // @TODO meta_value_num 574 } elseif ( isset( $orderby['post_field'] ) ) { 575 $field = str_replace( 'post_', '', $orderby['post_field'] ); 631 if ( isset( $admin_col['orderby'] ) ) { 632 $return['orderby'] = $admin_col['orderby']; 633 } 634 } elseif ( isset( $admin_col['post_field'] ) ) { 635 $field = str_replace( 'post_', '', $admin_col['post_field'] ); 576 636 $return['orderby'] = $field; 577 637 } … … 588 648 * sort it by the requested orderby field. 589 649 * 590 * @param array $clauses The query's SQL clauses.591 * @param array $vars The public query vars, usually from `$wp_query->query`.592 * @param array $sortables The sortables valid for this query (usually the value of the `admin_cols` or593 * `site_sortables` argument when registering an extended post type).594 * @return array The list of SQL clauses to apply to the query.650 * @param array<string,string> $clauses The query's SQL clauses. 651 * @param array<string,mixed> $vars The public query vars, usually from `$wp_query->query`. 652 * @param array<string,mixed> $sortables The sortables valid for this query (usually the value of the `admin_cols` or 653 * `site_sortables` argument when registering an extended post type). 654 * @return array<string,string> The list of SQL clauses to apply to the query. 595 655 */ 596 656 public static function get_sort_taxonomy_clauses( array $clauses, array $vars, array $sortables ): array { … … 609 669 } 610 670 611 $ orderby= $sortables[ $vars['orderby'] ];612 613 if ( ! is_array( $ orderby) ) {614 return []; 615 } 616 617 if ( isset( $ orderby['sortable'] ) && ! $orderby['sortable'] ) {618 return []; 619 } 620 621 if ( ! isset( $ orderby['taxonomy'] ) ) {671 $admin_col = $sortables[ $vars['orderby'] ]; 672 673 if ( ! is_array( $admin_col ) ) { 674 return []; 675 } 676 677 if ( isset( $admin_col['sortable'] ) && ! $admin_col['sortable'] ) { 678 return []; 679 } 680 681 if ( ! isset( $admin_col['taxonomy'] ) ) { 622 682 return []; 623 683 } … … 632 692 ON ( ext_cpts_tt.term_id = ext_cpts_t.term_id ) 633 693 "; 634 $clauses['where'] .= $wpdb->prepare( ' AND ( taxonomy = %s OR taxonomy IS NULL )', $ orderby['taxonomy'] );694 $clauses['where'] .= $wpdb->prepare( ' AND ( taxonomy = %s OR taxonomy IS NULL )', $admin_col['taxonomy'] ); 635 695 $clauses['groupby'] = 'ext_cpts_tr.object_id'; 636 696 $clauses['orderby'] = 'GROUP_CONCAT( ext_cpts_t.name ORDER BY name ASC ) '; -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminFilters/AdminFilters.php
r3263746 r3274550 26 26 */ 27 27 public static function make( $name, $project, $args ) { 28 return new SaltusAdminFilters( $name, $ project, $args );28 return new SaltusAdminFilters( $name, $args ); 29 29 } 30 30 … … 41 41 return is_admin(); 42 42 } 43 44 43 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php
r3263746 r3274550 9 9 * Enable custom administration filters 10 10 * 11 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion 11 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion with notable changes: 12 * - models can override the default sort order 13 * - reduce cyclomatic complexity of some functions 12 14 */ 13 15 final class SaltusAdminFilters implements Processable { 14 16 17 /** 18 * @var string $name The name of the custom post type (CPT) 19 */ 15 20 private $name; 16 private $project; 21 22 /** 23 * @var array $args List of filters 24 */ 17 25 private $args; 18 26 19 public $site_filters; 27 /** 28 * @var array $site_filters List of filters 29 */ 30 public $site_filters = []; 20 31 21 32 /** 22 33 * Instantiate this Service object. 23 34 * 24 */ 25 public function __construct( string $name, array $project, array $args ) { 26 $this->project = $project; 27 $this->name = $name; 28 $this->args = $args; 29 $this->site_filters = []; 30 } 31 35 * @param string $name The name of the custom post type (CPT) 36 * @param array $args List of filters 37 * 38 */ 39 public function __construct( string $name, array $args ) { 40 $this->name = $name; 41 $this->args = $args; 42 foreach ( $args as $id => $filter ) { 43 $this->site_filters[ $id ] = $filter; 44 } 45 } 46 47 /** 48 * Process the filters. 49 */ 32 50 public function process() { 33 34 51 add_action( 'load-edit.php', [ $this, 'default_filter' ] ); 35 52 add_filter( 'pre_get_posts', [ $this, 'maybe_filter' ] ); … … 48 65 # Loop over our filters to find the default filter (if there is one): 49 66 foreach ( $this->args as $id => $filter ) { 50 if ( isset( $_GET[ $id ] ) && '' !== $_GET[ $id ] ) { 67 // phpcs:ignore WordPress.Security.NonceVerification 68 if ( empty( $_GET[ $id ] ) ) { 51 69 continue; 52 70 } … … 62 80 * Filters posts by our custom admin filters. 63 81 * 64 * @param WP_Query $wp_query A `WP_Query` object82 * @param \WP_Query $wp_query A `WP_Query` object 65 83 */ 66 84 public function maybe_filter( \WP_Query $wp_query ) { … … 95 113 * `site_filters` argument when registering an extended post type). 96 114 * @param string $post_type The post type name. 115 * 97 116 * @return array The list of private query vars to apply to the query. 98 117 */ 99 public static function get_filter_vars( array $query, array $filters, string $post_type ) : array {118 public static function get_filter_vars( array $query, array $filters, string $post_type ): array { 100 119 $return = []; 101 120 … … 104 123 $date_query = []; 105 124 106 if ( ! isset( $query[ $filter_key ] ) || ( '' === $query[ $filter_key ]) ) {125 if ( ! isset( $query[ $filter_key ] ) || ( $query[ $filter_key ] === '' ) ) { 107 126 continue; 108 127 } … … 112 131 } 113 132 133 $hook = "saltus/framework/admin_filters/{$post_type}/filter_query/{$filter_key}"; 134 135 if ( has_filter( $hook ) ) { 136 /** 137 * Allows a filter's private query vars to be overridden. 138 * 139 * @param array<string,mixed> $return The private query vars. 140 * @param array<string,mixed> $query The public query vars. 141 * @param array<string,mixed> $filter The filter arguments. 142 */ 143 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 144 $return = apply_filters( $hook, $return, $query, $filter ); 145 continue; 146 } 147 114 148 if ( isset( $filter['meta_key'] ) ) { 115 $meta_query = [116 'key' => $filter['meta_key'],117 'value' => wp_unslash( $query[ $filter_key ] ),118 ]; 149 $meta_query = array_merge( $meta_query, $filter ); 150 $meta_query['key'] = $filter['meta_key']; 151 $meta_query['value'] = wp_unslash( $query[ $filter_key ] ); 152 119 153 } elseif ( isset( $filter['meta_search_key'] ) ) { 120 $meta_query = [ 121 'key' => $filter['meta_search_key'], 122 'value' => wp_unslash( $query[ $filter_key ] ), 154 // default to LIKE 155 $meta_query = [ 123 156 'compare' => 'LIKE', 124 157 ]; 158 $meta_query = array_merge( $meta_query, $filter ); 159 $meta_query['key'] = $filter['meta_search_key']; 160 $meta_query['value'] = wp_unslash( $query[ $filter_key ] ); 161 125 162 } elseif ( isset( $filter['meta_key_exists'] ) ) { 126 $meta_query = [127 'key' => wp_unslash( $query[ $filter_key ] ),163 // default to EXISTS 164 $meta_query = [ 128 165 'compare' => 'EXISTS', 129 166 ]; 167 $meta_query = array_merge( $meta_query, $filter ); 168 $meta_query['key'] = wp_unslash( $query[ $filter_key ] ); 169 130 170 } elseif ( isset( $filter['meta_exists'] ) ) { 131 $meta_query = [132 'key' => wp_unslash( $query[ $filter_key ] ),171 // default to NOT IN 172 $meta_query = [ 133 173 'compare' => 'NOT IN', 134 'value' => [ '', '0', 'false', 'null' ],135 174 ]; 175 $meta_query = array_merge( $meta_query, $filter ); 176 $meta_query['key'] = wp_unslash( $query[ $filter_key ] ); 177 $meta_query['value'] = [ '', '0', 'false', 'null' ]; 178 136 179 } elseif ( isset( $filter['post_date'] ) ) { 137 180 $date_query = [ … … 164 207 165 208 /** 166 * Add ourfilter names to the public query vars.167 * 168 * @param string[] $vars Public query variables.169 * @return string[] Updated public query variables.170 */ 171 public function add_query_vars( array $vars ) : array {209 * Add filter names to the public query vars. 210 * 211 * @param array<int,string> $vars Public query variables 212 * @return array<int,string> Updated public query variables 213 */ 214 public function add_query_vars( array $vars ): array { 172 215 $filters = array_keys( $this->site_filters ); 173 216 … … 180 223 * @return string The post type name. 181 224 */ 182 protected static function get_current_post_type() : string { 183 if ( function_exists( 'get_current_screen' ) && is_object( get_current_screen() ) && 'edit' === get_current_screen()->base ) { 225 protected static function get_current_post_type(): string { 226 if ( function_exists( 'get_current_screen' ) && 227 is_object( get_current_screen() ) && 228 get_current_screen()->base === 'edit' ) { 184 229 return get_current_screen()->post_type; 185 } else { 186 return ''; 187 } 230 } 231 return ''; 188 232 } 189 233 … … 193 237 * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-filters 194 238 */ 195 public function filters() {239 public function filters(): void { 196 240 global $wpdb; 197 241 … … 202 246 $pto = get_post_type_object( $this->name ); 203 247 204 foreach ( $this->args as $filter_ key=> $filter ) {248 foreach ( $this->args as $filter_id => $filter ) { 205 249 if ( isset( $filter['cap'] ) && ! current_user_can( $filter['cap'] ) ) { 206 250 continue; 207 251 } 208 252 209 $id = 'filter_' . $filter_key; 210 211 $hook = "ext-cpts/{$this->name}/filter-output/{$filter_key}"; 253 $filter_key = $filter['key'] ?? $filter_id; 254 $id = 'filter_' . $filter_id; 255 256 /** @deprecated 1.2.0 */ 257 $hook = "ext-cpts/{$this->name}/filter-output/{$filter_id}"; 258 $hook = "saltus/framework/admin_filters/filter_output/{$filter_id}"; 212 259 213 260 if ( has_action( $hook ) ) { … … 215 262 * Allows a filter's output to be overridden. 216 263 * 217 * @since 4.3.0 218 * 219 * @param Extended_CPT_Admin $this The post type admin controller instance. 220 * @param array $filter The filter arguments. 221 * @param string $id The filter's `id` attribute value. 264 * @param SaltusAdminFilters $instance The post type admin controller instance. 265 * @param array $filter The filter arguments. 266 * @param string $id The filter's `id` attribute value. 222 267 */ 268 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 223 269 do_action( $hook, $this, $filter, $id ); 224 270 continue; … … 232 278 } 233 279 234 $walker = new WalkerTaxonomyDropdown( [ 235 'field' => 'slug', 236 ] ); 280 $walker = new WalkerTaxonomyDropdown( 281 [ 282 'field' => 'slug', 283 ] 284 ); 237 285 238 286 # If we haven't specified a title, use the all_items label from the taxonomy: … … 264 312 # If we haven't specified a title, generate one from the meta key: 265 313 if ( ! isset( $filter['title'] ) ) { 266 $filter['title'] = str_replace( [ 267 '-', 268 '_', 269 ], ' ', $filter['meta_key'] ); 314 $filter['title'] = str_replace( 315 [ 316 '-', 317 '_', 318 ], 319 ' ', 320 $filter['meta_key'] 321 ); 270 322 $filter['title'] = ucwords( $filter['title'] ) . 's'; 271 323 $filter['title'] = sprintf( 'All %s', $filter['title'] ); … … 274 326 # If we haven't specified a label, generate one from the meta key: 275 327 if ( ! isset( $filter['label'] ) ) { 276 $filter['label'] = str_replace( [ 277 '-', 278 '_', 279 ], ' ', $filter['meta_key'] ); 328 $filter['label'] = str_replace( 329 [ 330 '-', 331 '_', 332 ], 333 ' ', 334 $filter['meta_key'] 335 ); 280 336 $filter['label'] = ucwords( $filter['label'] ); 281 337 $filter['label'] = sprintf( 'Filter by %s', $filter['label'] ); … … 284 340 if ( ! isset( $filter['options'] ) ) { 285 341 # Fetch all the values for our meta key: 286 $filter['options'] = $wpdb->get_col( $wpdb->prepare( " 287 SELECT DISTINCT meta_value 288 FROM {$wpdb->postmeta} as m 289 JOIN {$wpdb->posts} as p ON ( p.ID = m.post_id ) 290 WHERE m.meta_key = %s 291 AND m.meta_value != '' 292 AND p.post_type = %s 293 ORDER BY m.meta_value ASC 294 ", $filter['meta_key'], $this->name ) ); 342 $filter['options'] = $wpdb->get_col( 343 $wpdb->prepare( 344 "SELECT DISTINCT meta_value 345 FROM {$wpdb->postmeta} as m 346 JOIN {$wpdb->posts} as p ON ( p.ID = m.post_id ) 347 WHERE m.meta_key = %s 348 AND m.meta_value != '' 349 AND p.post_type = %s 350 ORDER BY m.meta_value ASC", 351 $filter['meta_key'], 352 $this->name 353 ) 354 ); 295 355 } elseif ( is_callable( $filter['options'] ) ) { 296 356 $filter['options'] = call_user_func( $filter['options'] ); … … 302 362 303 363 $selected = wp_unslash( get_query_var( $filter_key ) ); 304 305 $use_key = false;306 307 foreach ( $filter['options'] as $k => $v) {308 if ( ! is_numeric( $k ) ) {309 $use_key = true;310 break;364 $use_key = $filter['use_key'] ?? false; 365 if ( ! $use_key ) { 366 foreach ( $filter['options'] as $k => $v ) { 367 if ( ! is_numeric( $k ) ) { 368 $use_key = true; 369 break; 370 } 311 371 } 312 372 } … … 335 395 # If we haven't specified a title, generate one from the meta key: 336 396 if ( ! isset( $filter['title'] ) ) { 337 $filter['title'] = str_replace( [ 338 '-', 339 '_', 340 ], ' ', $filter['meta_search_key'] ); 397 $filter['title'] = str_replace( 398 [ 399 '-', 400 '_', 401 ], 402 ' ', 403 $filter['meta_search_key'] 404 ); 341 405 $filter['title'] = ucwords( $filter['title'] ); 342 406 } … … 357 421 $fields = $filter['meta_exists'] ?? $filter['meta_key_exists']; 358 422 359 if ( 1 === count( $fields )) {423 if ( count( $fields ) === 1 ) { 360 424 # Output a checkbox: 361 425 foreach ( $fields as $v => $t ) { … … 402 466 403 467 if ( ! isset( $filter['title'] ) ) { 404 $filter['title'] = __( 'All Authors', ' extended-cpts' );468 $filter['title'] = __( 'All Authors', 'saltus-framework' ); 405 469 } 406 470 407 471 if ( ! isset( $filter['label'] ) ) { 408 $filter['label'] = __( 'Author', ' extended-cpts' );472 $filter['label'] = __( 'Author', 'saltus-framework' ); 409 473 } 410 474 … … 417 481 if ( ! isset( $filter['options'] ) ) { 418 482 # Fetch all the values for our field: 419 $filter['options'] = $wpdb->get_col( $wpdb->prepare( " 420 SELECT DISTINCT post_author 421 FROM {$wpdb->posts} 422 WHERE post_type = %s 423 ", $this->name ) ); 483 $filter['options'] = $wpdb->get_col( 484 $wpdb->prepare( 485 " 486 SELECT DISTINCT post_author 487 FROM {$wpdb->posts} 488 WHERE post_type = %s 489 ", 490 $this->name 491 ) 492 ); 424 493 } elseif ( is_callable( $filter['options'] ) ) { 425 494 $filter['options'] = call_user_func( $filter['options'] ); … … 431 500 432 501 # Output a dropdown: 433 wp_dropdown_users( [ 434 'id' => $id, 435 'include' => $filter['options'], 436 'name' => 'author', 437 'option_none_value' => '0', 438 'selected' => $value, 439 'show_option_none' => $filter['title'], 440 ] ); 441 } 442 } 443 } 444 502 wp_dropdown_users( 503 [ 504 'id' => $id, 505 'include' => $filter['options'], 506 'name' => 'author', 507 'option_none_value' => '0', 508 'selected' => $value, 509 'show_option_none' => $filter['title'], 510 ] 511 ); 512 } 513 } 514 } 445 515 } 446 -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php
r3263746 r3274550 11 11 12 12 /** 13 * @var string 13 * @var string $tree_type The type of tree structure being used (e.g., 'category'). 14 14 */ 15 15 public $tree_type = 'category'; 16 16 17 17 /** 18 * @var array 18 * @var array<string> $db_fields Database fields used for parent/child relationships and term IDs. 19 19 */ 20 20 public $db_fields = [ … … 31 31 * Class constructor. 32 32 * 33 * @param array $args Optional arguments. 33 * @param array|null $args Optional arguments. 34 * - 'field': The field to use for the dropdown value. 34 35 */ 35 36 public function __construct( $args = null ) { … … 43 44 * 44 45 * @param string $output Passed by reference. Used to append additional content. 45 * @param object $ objectTerm data object.46 * @param object $term_object Term data object. 46 47 * @param int $depth Depth of term in reference to parents. 47 48 * @param array $args Optional arguments. 49 * - 'taxonomy': The taxonomy name. 50 * - 'selected_cats': Array of selected term values. 51 * - 'selected': Array of selected term IDs. 52 * - 'show_count': Whether to show the term count. 53 * @param int $current_object_id Current object ID 48 54 * @param int $current_object_id Current object ID. 49 55 */ 50 public function start_el( &$output, $ object, $depth = 0, $args = [], $current_object_id = 0 ) {56 public function start_el( &$output, $term_object, $depth = 0, $args = [], $current_object_id = 0 ) { 51 57 $pad = str_repeat( ' ', $depth * 3 ); 52 58 $tax = get_taxonomy( $args['taxonomy'] ); 53 59 54 60 if ( $this->field ) { 55 $value = $ object->{$this->field};61 $value = $term_object->{$this->field}; 56 62 } else { 57 $value = $tax->hierarchical ? $ object->term_id : $object->name;63 $value = $tax->hierarchical ? $term_object->term_id : $term_object->name; 58 64 } 59 65 60 if ( empty( $ object->term_id ) && ! $tax->hierarchical ) {66 if ( empty( $term_object->term_id ) && ! $tax->hierarchical ) { 61 67 $value = ''; 62 68 } 63 69 64 $cat_name = apply_filters( 'list_cats', $object->name, $object ); 65 $output .= "\t<option class=\"level-{$depth}\" value=\"" . esc_attr( $value ) . '"'; 70 /** @deprecated 1.2.0 */ 71 $cat_name = apply_filters( 'list_cats', $term_object->name, $term_object ); 72 $cat_name = apply_filters( 'saltus/framework/admin_filters/category_list', $term_object->name, $term_object ); 73 $output .= "\t<option class=\"level-{$depth}\" value=\"" . esc_attr( $value ) . '"'; 66 74 67 if ( isset( $args['selected_cats'] ) && in_array( $value, (array) $args['selected_cats'] ) ) {75 if ( isset( $args['selected_cats'] ) && in_array( $value, (array) $args['selected_cats'], true ) ) { 68 76 $output .= ' selected="selected"'; 69 } elseif ( isset( $args['selected'] ) && in_array( $ object->term_id, (array) $args['selected']) ) {77 } elseif ( isset( $args['selected'] ) && in_array( $term_object->term_id, (array) $args['selected'], true ) ) { 70 78 $output .= ' selected="selected"'; 71 79 } … … 75 83 76 84 if ( $args['show_count'] ) { 77 $output .= ' (' . esc_html( number_format_i18n( $ object->count ) ) . ')';85 $output .= ' (' . esc_html( number_format_i18n( $term_object->count ) ) . ')'; 78 86 } 79 87 80 88 $output .= "</option>\n"; 81 89 } 82 83 90 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php
r3263746 r3274550 11 11 12 12 /** 13 * Class DragAndDrop 14 * 15 * Enable an option to manage drag and drop functionality in the admin area. 13 16 */ 14 17 class DragAndDrop implements Service, Conditional, Actionable, Assembly { … … 21 24 22 25 /** 26 * Check whether the conditional service is currently needed. 27 * 28 * @return bool Whether the conditional service is needed. 29 */ 30 public static function is_needed(): bool { 31 return is_admin(); 32 } 33 34 /** 23 35 * Create a new instance of the service provider 24 36 * … … 26 38 */ 27 39 public static function make( $name, $project, $args ) { 28 return new SaltusDragAndDrop( $name, $project , $args);40 return new SaltusDragAndDrop( $name, $project ); 29 41 } 30 42 31 43 /** 32 * Check whether the conditional service is currently needed.44 * Update menu drag and drop in the database 33 45 * 34 * @return bool Whether the conditional service is needed.35 46 */ 36 public static function is_needed(): bool {37 38 /*39 * This service loads in most screens:40 * - admin: in the edit screen41 * - ajax: while updating menu order42 * - front: during pre_get_posts, etc43 */44 return is_admin();45 }46 47 47 public function add_action() { 48 48 $actions = new UpdateMenuDragAndDrop(); 49 49 $actions->add_action(); 50 50 } 51 52 51 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php
r3263746 r3274550 15 15 * 16 16 */ 17 public function __construct( string $name, array $project , ...$args) {17 public function __construct( string $name, array $project ) { 18 18 $this->project = $project; 19 19 $this->name = $name; … … 71 71 72 72 wp_enqueue_style( 'drag_drop_order', $this->project['root_url'] . '/Feature/DragAndDrop/order.css', array(), '1' ); 73 74 73 } 75 74 … … 141 140 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 142 141 $query_result = $wpdb->query( $query_prepared ); 143 144 142 } 145 143 -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php
r3263746 r3274550 7 7 8 8 /** 9 * Class UpdateMenuDragAndDrop 10 * 11 * Handles the drag-and-drop functionality for updating menu order. 9 12 */ 10 13 class UpdateMenuDragAndDrop implements Actionable { … … 16 19 public function __construct() {} 17 20 21 22 /** 23 * Register the WordPress action for handling the AJAX request. 24 */ 18 25 public function add_action() { 19 add_action( 'wp_ajax_saltus- dad-update-menu-order', array( $this, 'update_menu_order' ) );26 add_action( 'wp_ajax_saltus-framwork-drop-and-drag-update-menu-order', array( $this, 'update_menu_order' ) ); 20 27 } 21 28 29 /** 30 * Handle the AJAX request to update the menu order. 31 * 32 * Validates the nonce, checks user permissions, and updates the menu order 33 * in the database based on the provided data. 34 */ 22 35 public function update_menu_order() { 23 36 global $wpdb; … … 37 50 // can't trust much parse_str 38 51 parse_str( $_POST['order'], $data ); 39 40 if ( ! is_array( $data ) ) {41 return false;42 }43 52 44 53 $id_arr = array(); … … 77 86 } 78 87 79 do_action( 'saltus/ dad/update_menu_order' );88 do_action( 'saltus/framework/drop_and_drop/update_menu_order' ); 80 89 } 81 90 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php
r3263746 r3274550 25 25 */ 26 26 public static function make( $name, $project, $args ) { 27 return new SaltusDuplicate( $name, $ project, $args );27 return new SaltusDuplicate( $name, $args ); 28 28 } 29 29 … … 43 43 return is_admin(); 44 44 } 45 46 45 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php
r3263746 r3274550 13 13 final class SaltusDuplicate implements Processable { 14 14 15 /** 16 * @var string $name The name of the custom post type (CPT) 17 */ 15 18 private $name; 19 20 /** 21 * @var string $label The label for duplicate link. 22 */ 16 23 private $label; 24 25 /** 26 * @var string $attr_title The title for the duplicate link. 27 */ 17 28 private $attr_title; 18 29 19 30 /** 20 * Instantiate this Service object.31 * Constructor. 21 32 * 33 * @param string $name The name of the custom post type (CPT). 34 * @param array $args Additional arguments. 35 * - 'label': The label for the duplicate link. 36 * - 'attr_title': The title for the duplicate link. 22 37 */ 23 public function __construct( string $name, array $ project = null, array $args ) {38 public function __construct( string $name, array $args ) { 24 39 $this->name = $name; 25 40 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Duplicate'; … … 34 49 add_filter( 'page_row_actions', array( $this, 'row_link' ), 10, 2 ); 35 50 36 add_action( 'admin_action_ ' . $this->name . '_duplicate_post', array( $this, 'duplicate' ) );51 add_action( 'admin_action_saltus_framework_' . $this->name . '_duplicate_post', array( $this, 'duplicate' ) ); 37 52 } 38 53 39 54 /* 40 55 * Add a duplicate link to action list for this cpt row_actions 56 * 57 * @param array $actions The actions for the row. 58 * @param object $post The post object. 59 * 60 * @return array The modified actions. 61 * 41 62 */ 42 63 public function row_link( $actions, $post ) { … … 53 74 '<a href="%1$s" title="%2$s" rel="permalink">%3$s</a>', 54 75 wp_nonce_url( 55 'admin.php?action= ' . $this->name . '_duplicate_post&post=' . $post->ID,76 'admin.php?action=saltus_framework_' . $this->name . '_duplicate_post&post=' . $post->ID, 56 77 basename( __FILE__ ), 57 'saltus_ duplicate_nonce'78 'saltus_framework_duplicate_nonce' 58 79 ), 59 80 esc_attr( $this->attr_title ), … … 66 87 67 88 global $wpdb; 68 $error_msg = esc_html__( 'Item cannot be found. Please select one to duplicate.', 'saltus ' );89 $error_msg = esc_html__( 'Item cannot be found. Please select one to duplicate.', 'saltus-framework' ); 69 90 70 91 // Die if post not selected 71 if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'saltus_duplicate_post' ) ) ) { 72 wp_die( esc_html__( 'Please select an item to duplicate.', 'saltus' ) ); 92 if ( ! ( isset( $_GET['post'] ) || 93 isset( $_POST['post'] ) || 94 ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'saltus_framework_duplicate_post' ) 95 ) ) { 96 wp_die( esc_html__( 'Please select an item to duplicate.', 'saltus-framework' ) ); 73 97 } 74 98 75 99 // Verify nonce 76 if ( ! isset( $_GET['saltus_duplicate_nonce'] ) || ! wp_verify_nonce( $_GET['saltus_duplicate_nonce'], basename( __FILE__ ) ) ) { 100 if ( ! isset( $_GET['saltus_framework_duplicate_nonce'] ) || 101 ! wp_verify_nonce( $_GET['saltus_framework_duplicate_nonce'], basename( __FILE__ ) ) ) { 77 102 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 78 103 wp_die( $error_msg ); … … 84 109 85 110 // duplicate the post 111 // @phpstan-ignore identical.alwaysFalse 86 112 if ( ! isset( $post ) || $post === null ) { 87 113 return; … … 106 132 107 133 // insert the new post 134 // @phpstan-ignore argument.type 108 135 $new_post_id = wp_insert_post( $args ); 109 136 … … 128 155 return; 129 156 } 130 131 $insert_query = "INSERT INTO $wpdb->postmeta ( post_id, meta_key, meta_value )";157 $sql_query_sel = []; 158 $insert_query = "INSERT INTO $wpdb->postmeta ( post_id, meta_key, meta_value )"; 132 159 foreach ( $query_result as $post_meta ) { 133 160 … … 147 174 $post_type = get_post_type( $post_id ); 148 175 176 /** @deprecated 1.2.0 */ 149 177 do_action( 'saltus/duplicate_post/after', $post_type, $post_id, $new_post_id ); 178 do_action( 'saltus/framework/duplicate_post/after', $post_type, $post_id, $new_post_id ); 150 179 151 180 wp_safe_redirect( admin_url( 'edit.php?post_type=' . $post_type ) ); -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php
r3263746 r3274550 10 10 final class CodestarMeta implements Processable { 11 11 12 /** 13 * @var string $name The name of the custom post type (CPT) 14 */ 12 15 private $name; 16 17 /** 18 * @var array $meta The meta fields 19 */ 13 20 private $meta; 14 21 15 22 /** 16 23 * Instantiate the Codestar Framework Fields object. 17 */ 18 public function __construct( string $name, array $project = null, array $meta = array() ) { 24 * 25 * @param string $name The name of the custom post type (CPT) 26 * @param array $meta Meta fields. 27 */ 28 public function __construct( string $name, array $meta ) { 19 29 $this->name = $name; 20 30 $this->meta = $meta; 21 31 } 22 32 33 /** 34 * Process the functionality 35 */ 23 36 public function process() { 24 37 … … 31 44 } 32 45 33 // else add just the fields46 // add just the fields and register rest api 34 47 $this->create_metabox( $box_id, $box ); 48 $this->register_rest_api( $box_id, $box ); 35 49 } 36 50 } … … 39 53 * Create metabox 40 54 * 41 * @param int $box_id identifier of the metabox42 * @param array $box_settings paramaters for the page43 * @return void55 * @param mixed $box_id Identifier of the metabox 56 * @param array $box_settings Paramaters for the box 57 * 44 58 */ 45 59 private function create_metabox( $box_id, $box_settings ) { … … 77 91 } 78 92 79 if ( ! empty( $box_settings['register_rest_api'] ) && $box_settings['register_rest_api'] === true ) { 80 if ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'serialize' ) { 81 $post_type = $this->name; 82 foreach ( $box_settings['sections'] as $section ) { 83 if ( ! empty( $section['fields'] ) ) { 84 $this->create_meta_fields_serialized( $section['fields'], $box_id, $post_type ); 93 // add filter to properly save line breaks in this meta box 94 add_filter( sprintf( 'csf_%s_save', $box_id ), array( $this, 'sanitize_meta_save' ), 1, 3 ); 95 } 96 97 98 /** 99 * Register REST API 100 * 101 * @param mixed $box_id Identifier of the metabox 102 * @param array $box_settings Paramaters for the box 103 * 104 */ 105 private function register_rest_api( $box_id, $box_settings ) { 106 107 if ( empty( $box_settings['register_rest_api'] ) || $box_settings['register_rest_api'] !== true ) { 108 return; 109 } 110 111 if ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'serialize' ) { 112 $post_type = $this->name; 113 foreach ( $box_settings['sections'] as $section ) { 114 if ( ! empty( $section['fields'] ) ) { 115 $this->create_meta_fields_serialized( $section['fields'], $box_id, $post_type ); 116 } 117 } 118 } 119 if ( empty( $box_settings['data_type'] ) || 120 $box_settings['data_type'] === 'unserialize' ) { 121 $post_type = $this->name; 122 123 foreach ( $box_settings['sections'] as $section ) { 124 if ( ! empty( $section['fields'] ) ) { 125 foreach ( $section['fields'] as $meta_name => $want_to_register_fields ) { 126 $meta_type = 'object'; 127 if ( ! empty( $want_to_register_fields['type'] ) ) { 128 $meta_type = $want_to_register_fields['type']; 129 } 130 $this->create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ); 85 131 } 86 132 } 87 133 } 88 if ( empty( $box_settings['data_type'] ) || 89 ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'unserialize' ) ) { 90 $post_type = $this->name; 91 92 foreach ( $box_settings['sections'] as $section ) { 93 if ( ! empty( $section['fields'] ) ) { 94 foreach ( $section['fields'] as $meta_name => $want_to_register_fields ) { 95 $meta_type = 'object'; 96 if ( ! empty( $want_to_register_fields['type'] ) ) { 97 $meta_type = $want_to_register_fields['type']; 98 } 99 $this->create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ); 100 } 101 } 102 } 103 } 104 } 105 106 // add filter to properly save line breaks in this meta box 107 add_filter( sprintf( 'csf_%s_save', $box_id ), array( $this, 'sanitize_meta_save' ), 1, 3 ); 108 } 134 } 135 } 136 137 /** 138 * Setup REST API fields 139 * 140 * @param array $fields Fields to be registered 141 * 142 * @return array $rest_fields Fields to be registered in REST API 143 */ 109 144 private function setup_restapi_fields( $fields ) { 110 145 $rest_fields = []; 111 $rest_types = $this->match_fields( $this->list_fields());146 $rest_types = $this->match_fields(); 112 147 foreach ( $fields as $name => $attributes ) { 113 148 if ( empty( $attributes['type'] ) ) { … … 125 160 return $rest_fields; 126 161 } 162 163 /** 164 * Create meta fields that are not serialized 165 * Hooks into REST API 166 * 167 * @param string $meta_name Name of the meta field 168 * @param string $meta_type Type of the meta field 169 * @param string $post_type Post type to register the meta field for 170 */ 127 171 private function create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ) { 128 172 129 $rest_types = $this->match_fields( $this->list_fields());173 $rest_types = $this->match_fields(); 130 174 $rest_type = $this->get_field_type( $meta_type, $rest_types ); 131 175 … … 151 195 } 152 196 197 /** 198 * Create meta fields that are serialized 199 * Hooks into REST API 200 * 201 * @param array $meta_fields Meta fields to be registered 202 * @param string $meta_name Name of the meta field 203 * @param string $post_type Post type to register the meta field for 204 */ 153 205 private function create_meta_fields_serialized( $meta_fields, $meta_name, $post_type ) { 154 206 … … 180 232 } 181 233 182 private function list_fields() { 234 /** 235 * Match fields to their types 236 * 237 * @return array Array of field types 238 */ 239 private function match_fields() { 240 241 $field_type_map = [ 242 'accordion' => 'string', 243 'backup' => 'string', 244 'border' => 'string', 245 'button_set' => 'string', 246 'callback' => 'string', 247 'checkbox' => 'string', 248 'code_editor' => 'string', 249 'color' => 'string', 250 'content' => 'string', 251 'date' => 'string', 252 'datetime' => 'string', 253 'dimensions' => 'string', 254 'gallery' => 'string', 255 'heading' => 'string', 256 'icon' => 'string', 257 'image_select' => 'string', 258 'link' => 'string', 259 'link_color' => 'string', 260 'notice' => 'string', 261 'palette' => 'string', 262 'radio' => 'string', 263 'slider' => 'string', 264 'sortable' => 'string', 265 'sorter' => 'string', 266 'spacing' => 'string', 267 'spinner' => 'string', 268 'subheading' => 'string', 269 'submessage' => 'string', 270 'switcher' => 'string', 271 'tabbed' => 'string', 272 'text' => 'string', 273 'textarea' => 'string', 274 'typography' => 'string', 275 'upload' => 'string', 276 'wp_editor' => 'string', 277 'number' => 'number', 278 'background' => 'object', 279 'color_group' => 'object', 280 'fieldset' => 'object', 281 'group' => 'object', 282 'map' => 'object', 283 'media' => 'array', 284 'select' => 'array', 285 'repeater' => 'array', 286 ]; 183 287 184 288 // Include all framework fields 185 return apply_filters( 186 'saltus/cfs/fields', 187 array( 188 'accordion', 189 'background', 190 'backup', 191 'border', 192 'button_set', 193 'callback', 194 'checkbox', 195 'code_editor', 196 'color', 197 'color_group', 198 'content', 199 'date', 200 'datetime', 201 'dimensions', 202 'fieldset', 203 'gallery', 204 'group', 205 'heading', 206 'icon', 207 'image_select', 208 'link', 209 'link_color', 210 'map', 211 'media', 212 'notice', 213 'number', 214 'palette', 215 'radio', 216 'repeater', 217 'select', 218 'slider', 219 'sortable', 220 'sorter', 221 'spacing', 222 'spinner', 223 'subheading', 224 'submessage', 225 'switcher', 226 'tabbed', 227 'text', 228 'textarea', 229 'typography', 230 'upload', 231 'wp_editor', 232 ) 233 ); 234 } 235 private function match_fields( $allowed_fields ) { 236 237 $assigned_field_type = []; 238 foreach ( $allowed_fields as $field ) { 239 switch ( $field ) { 240 case 'accordion': 241 case 'backup': 242 case 'border': 243 case 'button_set': 244 case 'callback': 245 case 'checkbox': 246 case 'code_editor': 247 case 'color': 248 case 'content': 249 case 'date': 250 case 'datetime': 251 case 'dimensions': 252 case 'gallery': 253 case 'heading': 254 case 'icon': 255 case 'image_select': 256 case 'link': 257 case 'link_color': 258 case 'notice': 259 case 'palette': 260 case 'radio': 261 case 'slider': 262 case 'sortable': 263 case 'sorter': 264 case 'spacing': 265 case 'spinner': 266 case 'subheading': 267 case 'submessage': 268 case 'switcher': 269 case 'tabbed': 270 case 'text': 271 case 'textarea': 272 case 'typography': 273 case 'upload': 274 case 'wp_editor': 275 $assigned_field_type[ $field ] = 'string'; 276 break; 277 case 'number': 278 $assigned_field_type[ $field ] = 'number'; 279 break; 280 case 'background': 281 case 'color_group': 282 case 'fieldset': 283 case 'group': 284 case 'map': 285 $assigned_field_type[ $field ] = 'object'; 286 break; 287 case 'media': 288 case 'select': 289 case 'repeater': 290 $assigned_field_type[ $field ] = 'array'; 291 break; 292 default: 293 $assigned_field_type[ $field ] = 'string'; 294 break; 295 } 296 } 297 return $assigned_field_type; 298 } 299 300 private function get_field_type( $field, $fields = null ) { 289 290 /** @deprecated 1.2.0 */ 291 $filtered = apply_filters( 'saltus/cfs/fields', $field_type_map ); 292 $filtered = apply_filters( 'saltus/framework/meta/matched_fields', $field_type_map ); 293 if ( ! is_array( $filtered ) ) { 294 return []; 295 } 296 return $filtered; 297 } 298 299 /** 300 * Get field type 301 * 302 * @param string $field Field name 303 * @param array|null $fields Optional. Fields to match against 304 * 305 * @return string|null Field type or null if not found 306 */ 307 private function get_field_type( $field, ?array $fields = null ) { 301 308 if ( $fields === null ) { 302 $fields = $this->match_fields( $this->list_fields() ); 303 } 304 if ( ! is_array( $fields ) ) { 305 return ''; 306 } 307 if ( ! empty( $fields[ $field ] ) ) { 308 return $fields[ $field ]; 309 } 310 return null; 309 $fields = $this->match_fields(); 310 } 311 312 if ( empty( $fields[ $field ] ) ) { 313 return null; 314 } 315 return $fields[ $field ]; 311 316 } 312 317 … … 314 319 * Create section using builtin Codestart method 315 320 * 316 * @param string $id - identifier of the section317 * @param array $section - parameters for the section321 * @param string $id Identifier of the section 322 * @param array $section Parameters for the section 318 323 * @return void 319 324 */ … … 329 334 * Prepare fields to make sure they have all necessary parameters 330 335 * 331 * @param array $fields 332 * @return array $fields array of fields prepared to be rendered by CodestarFields 336 * @param array $fields Fields to be prepared 337 * 338 * @return array Array of fields prepared to be rendered by CodestarFields 333 339 */ 334 340 private function prepare_fields( $fields ) { … … 354 360 * Function to sanitize meta on save 355 361 * 356 * @param array$request with meta info357 * @param int$post_id358 * @param obj$csf class362 * @param $request with meta info 363 * @param $post_id 364 * @param $csf class 359 365 * @return array 360 366 */ -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php
r3263746 r3274550 9 9 10 10 /** 11 * Class Meta 12 * 13 * Enable an option to manage meta fields 11 14 */ 12 15 final class Meta implements Service, Conditional, Assembly { 16 17 /** 18 * Instantiate this Service object. 19 * 20 */ 21 public function __construct() {} 13 22 14 23 /** … … 25 34 26 35 /** 27 * Instantiate this Service object.36 * Create a new instance of the service provider 28 37 * 29 */ 30 public function __construct() { 31 32 } 33 34 /** 35 * Create a new instance of the service provider 38 * @param string $name The name of the custom post type (CPT) 39 * @param array|null $project Project information. 40 * @param array|null $args Additional arguments. 36 41 * 37 42 * @return object The new instance 38 43 */ 39 44 public static function make( $name, $project, $args ) { 40 return new CodestarMeta( $name, $ project, $args );45 return new CodestarMeta( $name, $args ); 41 46 } 42 43 47 } 44 -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/RememberTabs/RememberTabs.php
r3263746 r3274550 9 9 10 10 /** 11 * Class RememberTabs 12 * 13 * Enable an option to remember the last active tab in the admin area. 11 14 */ 12 15 class RememberTabs implements Service, Conditional, Assembly { … … 17 20 */ 18 21 public function __construct() {} 19 20 /**21 * Create a new instance of the service provider22 *23 * @return object The new instance24 */25 public static function make( $name, $project, $args ) {26 return new SaltusRememberTabs( $name, $project, $args );27 }28 22 29 23 /** … … 40 34 } 41 35 36 /** 37 * Create a new instance of the service provider 38 * 39 * @param string $name The name of the custom post type (CPT) 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments. 42 * 43 * @return object The new instance 44 */ 45 public static function make( $name, $project, $args ) { 46 return new SaltusRememberTabs( $name, $project ); 47 } 42 48 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php
r3263746 r3274550 8 8 final class SaltusRememberTabs implements Processable { 9 9 10 /** 11 * @var string $name The name of the custom post type (CPT) 12 */ 10 13 private $name; 14 15 /** 16 * @var string $name Project information. 17 */ 11 18 private $project; 12 19 13 /**20 /** 14 21 * Instantiate this Service object. 15 22 * 23 * @param string $name The name of the custom post type (CPT) 24 * @param array $project Project information. 16 25 */ 17 public function __construct( string $name, array $project, array $args = null ) { 26 public function __construct( string $name, array $project ) { 27 $this->name = $name; 18 28 $this->project = $project; 19 $this->name = $name;20 29 } 21 30 31 /** 32 * Process the functionality 33 */ 22 34 public function process() { 23 add_action( 'admin_enqueue_scripts', array( $this, 'load_script_css' ));24 add_filter( 'admin_url', array( $this, 'check_remember_tab_url' ), 1, 10);35 add_action( 'admin_enqueue_scripts', [ $this, 'load_script_css' ] ); 36 add_filter( 'admin_url', [ $this, 'check_remember_tab_url' ], 10, 1 ); 25 37 } 26 38 /** 39 * Check if the script and CSS should be loaded 40 * 41 * @return bool 42 */ 27 43 private function check_load_script_css() { 28 44 … … 39 55 } 40 56 57 /** 58 * Load the script and CSS 59 */ 41 60 public function load_script_css() { 42 61 … … 45 64 } 46 65 47 wp_enqueue_script( 'remember_tabs', $this->project['root_url'] . 'Feature/RememberTabs/rememberTabs.js', array(), '1', true ); 48 66 wp_enqueue_script( 67 'remember_tabs', 68 $this->project['root_url'] . 'Feature/RememberTabs/rememberTabs.js', 69 [], 70 '1', 71 true 72 ); 49 73 } 50 74 … … 53 77 * Used to remember tab 54 78 * 55 * @param string $link 56 * @return string 79 * @param string $link Admin url 80 * @return string The url 57 81 */ 58 82 public function check_remember_tab_url( $link ) { 59 83 60 84 global $current_screen; 61 if ( ! is_admin() || ! isset( $current_screen ) || $this->name !== $current_screen->post_type || wp_doing_ajax() ) {85 if ( ! is_admin() || ! isset( $current_screen ) || $this->name !== $current_screen->post_type || wp_doing_ajax() ) { 62 86 return $link; 63 87 } 64 88 65 if ( isset( $_REQUEST['tab'] ) ) {89 if ( isset( $_REQUEST['tab'] ) ) { 66 90 $params['tab'] = absint( $_REQUEST['tab'] ); 67 $link = add_query_arg( $params, $link );91 $link = add_query_arg( $params, $link ); 68 92 } 69 70 93 71 94 return $link; 72 95 } 73 74 96 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Settings/CodestarSettings.php
r3263746 r3274550 6 6 }; 7 7 8 final class CodestarSettings implements Processable {8 final class CodestarSettings implements Processable { 9 9 10 /** 11 * @var string $name The name of the custom post type (CPT) 12 */ 10 13 private $name; 14 15 /** 16 * @var array $settings The settings to be used for the settings page. 17 */ 11 18 private $settings; 12 19 13 public function __construct( string $name, array $project = null, array $settings = array() ) { 20 /** 21 * Constructor. 22 * 23 * @param string $name The name of the custom post type (CPT) 24 * @param array $settings Optional. Settings options 25 */ 26 public function __construct( string $name, array $settings = [] ) { 14 27 $this->name = $name; 15 28 $this->settings = $settings; 16 29 } 17 30 31 /** 32 * Process the settings 33 */ 18 34 public function process() { 19 35 /** … … 65 81 } 66 82 } 67 68 83 } 69 84 … … 71 86 * Create section using builtin Codestart method 72 87 * 73 * @param string$id - identifier of the section88 * @param mixed $id - identifier of the section 74 89 * @param array $section - parameters for the section 75 90 * @return void 76 91 */ 77 92 private function create_section( $id, $section ) { 78 79 93 \Saltus_WP_Plugin_InteractiveGlobes_CSF::createSection( $id, $section ); 80 81 94 } 82 95 … … 98 111 99 112 if ( isset( $field['fields'] ) ) { 100 101 113 $field['fields'] = $this->prepare_fields( $field['fields'] ); 102 103 114 } 104 115 } … … 107 118 return array_values( $fields ); 108 119 } 109 110 111 120 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Settings/Settings.php
r3263746 r3274550 9 9 10 10 /** 11 * Class Settings 12 * 13 * Enable an option to create Settings page 11 14 */ 12 15 final class Settings implements Service, Conditional, Assembly { 16 17 /** 18 * Instantiate this Service object. 19 * 20 */ 21 public function __construct() {} 13 22 14 23 /** … … 18 27 */ 19 28 public static function is_needed(): bool { 29 20 30 /* 21 31 * Only load this sample service on the admin backend. 22 * If this conditional returns false, the service is never even23 * instantiated.24 32 */ 25 33 return \is_admin(); … … 27 35 28 36 /** 29 * Instantiate this Service object.37 * Create a new instance of the service provider 30 38 * 31 */ 32 public function __construct() { 33 34 } 35 36 /** 37 * Create a new instance of the service provider 39 * @param string $name The name of the custom post type (CPT) 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments. 38 42 * 39 43 * @return object The new instance 40 44 */ 41 45 public static function make( $name, $project, $args ) { 42 return new CodestarSettings( $name, $ project, $args );46 return new CodestarSettings( $name, $args ); 43 47 } 44 45 48 } 46 -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php
r3263746 r3274550 7 7 8 8 /** 9 * Class SaltusSingleExport 10 * 9 11 * Enable an option to export single entry 10 12 * … … 13 15 final class SaltusSingleExport implements Processable { 14 16 17 /** 18 * @var string $name The name of the custom post type (CPT) to export. 19 */ 15 20 private $name; 21 22 /** 23 * @var string $label The label for the export link. 24 */ 16 25 private $label; 17 26 18 // unlikely date match for filters 27 /** 28 * A constant representing a fake date used for filtering queries. 29 * Unlikely date match for filters 30 */ 19 31 const FAKE_DATE = '1970-01-05'; // Y-m-d 20 32 21 33 /** 22 * Instantiate this Service object.34 * Constructor. 23 35 * 36 * @param string $name The name of the custom post type (CPT) to export. 37 * @param array|null $args Optional. Additional arguments for the export. 38 * - 'label': The label for the export link. 24 39 */ 25 public function __construct( string $name, array $project = null, array $args) {26 $this->name = $name;27 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Export This';40 public function __construct( string $name, ?array $args = [] ) { 41 $this->name = $name; 42 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Export This'; 28 43 } 29 44 45 /** 46 * Process the export functionality by hooking into WordPress actions. 47 */ 30 48 public function process() { 31 49 add_action( 'init', array( $this, 'init' ) ); … … 34 52 /** 35 53 * Get hooked in: Part II 54 * Initialize the export functionality. 55 * 56 * Hooks into WordPress filters and actions to enable single entry export. 36 57 * 37 58 */ … … 45 66 add_filter( 'query', array( $this, 'query' ) ); 46 67 add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ) ); 68 } 47 69 48 }49 70 /** 50 71 * Insert our action link into the submit box 72 * 73 * @param \WP_Post $post The current post object. 51 74 * 52 75 */ … … 54 77 55 78 // if it's not out cpt, do nothing 56 if ( ! isset( $post->post_type ) ||$post->post_type !== $this->name ) {79 if ( $post->post_type !== $this->name ) { 57 80 return; 58 81 } … … 64 87 color: #82878c; 65 88 font: normal 20px/1 dashicons; 66 speak: none;67 89 display: inline-block; 68 90 padding: 0 3px 0 0; … … 89 111 90 112 /** 91 * Modify export arguments 92 * except if normal export 113 * Modify export arguments. 93 114 * 94 * @param array $args Query args for determining what should be exported 95 * @return $args Modified query 115 * Adjusts the export query arguments to handle single entry export. 116 * 117 * @param array $args Query arguments for determining what should be exported. 118 * 119 * @return array Modified query arguments. 96 120 */ 97 121 public function export_args( $args ) { … … 116 140 117 141 /** 118 * Filter query 119 * Look for 'tagged' query, replace with one matching the needs 142 * Filter the SQL query for single entry export. 120 143 * 121 * @param string $query SQL query 122 * @return string Modified SQL query 144 * Replaces the query to match the single post ID for export. 145 * 146 * @param string $query The original SQL query. 147 * 148 * @return string Modified SQL query. 123 149 */ 124 150 public function query( $query ) { … … 158 184 return $query; 159 185 } 160 161 186 } 162 187 -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/SingleExport/SingleExport.php
r3263746 r3274550 8 8 }; 9 9 10 11 10 /** 11 * Class SingleExport 12 * 13 * Enable an option to export single entry 12 14 */ 13 15 class SingleExport implements Service, Conditional, Assembly { … … 18 20 */ 19 21 public function __construct() {} 20 21 /**22 * Create a new instance of the service provider23 *24 * @return object The new instance25 */26 public static function make( $name, $project, $args ) {27 return new SaltusSingleExport( $name, $project, $args );28 }29 22 30 23 /** … … 41 34 } 42 35 36 /** 37 * Create a new instance of the service provider 38 * 39 * @param string $name The name of the custom post type (CPT) to export. 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments for the export. 42 * 43 * @return object The new instance 44 */ 45 public static function make( $name, $project, $args ) { 46 return new SaltusSingleExport( $name, $args ); 47 } 43 48 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/CanRegister.php
r3263746 r3274550 13 13 * @return void 14 14 */ 15 public function register( string $id, string $ class, array $dependencies );15 public function register( string $id, string $service_class, array $dependencies ); 16 16 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php
r3263746 r3274550 11 11 return new GenericContainer(); 12 12 } 13 14 13 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php
r3263746 r3274550 6 6 use RuntimeException; 7 7 8 class FailedToMakeInstance8 final class FailedToMakeInstance 9 9 extends RuntimeException 10 10 implements SaltusFrameworkThrowable { … … 34 34 ); 35 35 36 return new s tatic( $message, static::CIRCULAR_REFERENCE );36 return new self( $message, self::CIRCULAR_REFERENCE ); 37 37 } 38 38 … … 51 51 ); 52 52 53 return new s tatic( $message, static::UNRESOLVED_INTERFACE );53 return new self( $message, self::UNRESOLVED_INTERFACE ); 54 54 } 55 55 … … 69 69 ); 70 70 71 return new s tatic( $message, static::UNREFLECTABLE_CLASS );71 return new self( $message, self::UNREFLECTABLE_CLASS ); 72 72 } 73 73 … … 78 78 * @param string $argument_name Name of the argument that could not be 79 79 * resolved. 80 * @param string $ classClass that had the argument in its80 * @param string $service_class Class that had the argument in its 81 81 * constructor. 82 82 * @return static 83 83 */ 84 public static function for_unresolved_argument( string $argument_name, string $ class ) {84 public static function for_unresolved_argument( string $argument_name, string $service_class ) { 85 85 $message = \sprintf( 86 86 'Could not resolve the argument "%s" while trying to instantiate the class "%s".', 87 87 $argument_name, 88 $ class88 $service_class 89 89 ); 90 90 91 return new s tatic( $message, static::UNRESOLVED_ARGUMENT );91 return new self( $message, self::UNRESOLVED_ARGUMENT ); 92 92 } 93 93 … … 96 96 * reused but was not yet instantiated. 97 97 * 98 * @param string $ class Class that was not yet instantiated.98 * @param string $service_class Class that was not yet instantiated. 99 99 * 100 100 * @return static 101 101 */ 102 public static function for_uninstantiated_shared_instance( string $ class ) {102 public static function for_uninstantiated_shared_instance( string $service_class ) { 103 103 $message = \sprintf( 104 104 'Could not retrieve the shared instance for "%s" as it was not instantiated yet.', 105 $ class105 $service_class 106 106 ); 107 107 108 return new s tatic( $message, static::UNINSTANTIATED_SHARED_INSTANCE );108 return new self( $message, self::UNINSTANTIATED_SHARED_INSTANCE ); 109 109 } 110 110 … … 113 113 * for a class that doesn't have one. 114 114 * 115 * @param string $ class Class for which there is no delegate.115 * @param string $service_class Class for which there is no delegate. 116 116 * 117 117 * @return static 118 118 */ 119 public static function for_invalid_delegate( string $ class ) {119 public static function for_invalid_delegate( string $service_class ) { 120 120 $message = \sprintf( 121 121 'Could not retrieve a delegate for "%s", none was defined.', 122 $ class122 $service_class 123 123 ); 124 124 125 return new s tatic( $message, static::INVALID_DELEGATE );125 return new self( $message, self::INVALID_DELEGATE ); 126 126 } 127 127 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/GenericContainer.php
r3263746 r3274550 14 14 15 15 /** 16 * Class GenericContainer 17 * 16 18 * A simplified implementation of a service container. 17 19 * 18 * Extend ArrayObject to have default implementations for iterators and20 * Extends ArrayObject to have default implementations for iterators and 19 21 * array access. 20 22 */ … … 24 26 25 27 /** 26 * Instanciates Services28 * @var Instantiator $instantiator Instantiates services. 27 29 */ 28 30 protected $instantiator; 29 31 30 32 /** 31 * Service Container 33 * Constructor. 34 * 35 * Initializes the container with a fallback instantiator. 32 36 */ 33 37 public function __construct() { … … 55 59 56 60 /** 57 * Check whether the container can return a service for the given 58 * identifier. 61 * Check if the container has a service for the given identifier. 59 62 * 60 63 * @param string $id Identifier of the service to look for. 61 64 * 62 * @return bool 65 * @return bool True if the service exists, false otherwise. 63 66 */ 64 67 public function has( string $id ): bool { … … 69 72 * Put a service into the container for later retrieval. 70 73 * 71 * @param string $id Identifier of the service to put into the 72 * container. 74 * @param string $id Identifier of the service. 73 75 * @param Service $service Service to put into the container. 74 76 */ … … 78 80 79 81 /** 80 * Register a single service, and add sit to the container82 * Register a single service, and add it to the container 81 83 * 82 * @param string $id 83 * @param string $class 84 * @param string $id Identifier of the service. 85 * @param string $service_class Fully qualified class name of the service. 86 * @param array|null $dependencies Optional. Dependencies for the service. 84 87 */ 85 public function register( string $id, string $ class,array $dependencies = null ) {88 public function register( string $id, string $service_class, ?array $dependencies = null ) { 86 89 87 90 // Only instantiate services that are actually needed. 88 if ( is_a( $ class, Conditional::class, true ) &&89 ! $ class::is_needed() ) {91 if ( is_a( $service_class, Conditional::class, true ) && 92 ! $service_class::is_needed() ) { 90 93 return; 91 94 } 92 95 93 $service = $this->instantiate( $ class );96 $service = $this->instantiate( $service_class ); 94 97 95 98 $this->put( $id, $service ); 96 97 99 } 98 100 … … 101 103 * Instantiate a single service. 102 104 * 103 * @param string $ class Service class to instantiate.105 * @param string $service_class Service class to instantiate. 104 106 * 105 107 * @throws Invalid If the service could not be properly instantiated. … … 107 109 * @return Service Instantiated service. 108 110 */ 109 private function instantiate( $ class ): Service {111 private function instantiate( $service_class ): Service { 110 112 111 113 // The service needs to be registered, so instantiate right away. 112 $service = $this->make( $ class );114 $service = $this->make( $service_class ); 113 115 114 116 if ( ! $service instanceof Service ) { … … 122 124 * Make an object instance out of an interface or class. 123 125 * 124 * @param string $interface_or_class Interface or class to make an object 125 * instance out of. 126 * @param array $arguments Optional. Additional arguments to pass 127 * to the constructor. Defaults to an 128 * empty array. 126 * @param string $interface_or_class Interface or class name 127 * @param array $dependencies Optional. Dependencies of the class. 129 128 * @return object Instantiated object. 130 129 */ 131 private function make( string $interface_or_class, array $arguments = [] ) {130 private function make( string $interface_or_class, ?array $dependencies = [] ) { 132 131 133 132 $reflection = $this->get_class_reflection( $interface_or_class ); 134 133 $this->ensure_is_instantiable( $reflection ); 135 136 $dependencies = [];137 134 138 135 $object = $this->instantiator->instantiate( $interface_or_class, $dependencies ); … … 142 139 143 140 /** 144 * Get the reflection for a class or throw an exception.141 * Get the reflection for a class. 145 142 * 146 * @param string $class Class to get the reflection for. 147 * @return ReflectionClass Class reflection. 143 * @param string $service_class Class name 148 144 * @throws FailedToMakeInstance If the class could not be reflected. 145 * @return ReflectionClass Class reflection. 149 146 */ 150 private function get_class_reflection( string $ class ): ReflectionClass {147 private function get_class_reflection( string $service_class ): ReflectionClass { 151 148 try { 152 return new ReflectionClass( $ class );149 return new ReflectionClass( $service_class ); 153 150 } catch ( SaltusFrameworkThrowable $exception ) { 154 throw FailedToMakeInstance::for_unreflectable_class( $ class );151 throw FailedToMakeInstance::for_unreflectable_class( $service_class ); 155 152 } 156 153 } … … 161 158 * 162 159 * @param ReflectionClass $reflection Reflected class to check. 163 * @return void160 * 164 161 * @throws FailedToMakeInstance If the interface could not be resolved. 165 162 */ … … 171 168 172 169 /** 173 * Get a fallback instantiator in case none was provided.170 * Get a fallback instantiator 174 171 * 175 172 * @return Instantiator Simplistic fallback instantiator. … … 181 178 * Make an object instance out of an interface or class. 182 179 * 183 * @param string $class Class to make an object instance out of. 184 * @param array $dependencies Optional. Dependencies of the class. 180 * @param string $service_class Class name. 181 * @param array $dependencies Optional. Dependencies of the class. 182 * 185 183 * @return object Instantiated object. 186 184 */ 187 public function instantiate( string $ class, array $dependencies = [] ) {188 return new $ class( ...$dependencies );185 public function instantiate( string $service_class, array $dependencies = [] ) { 186 return new $service_class( ...$dependencies ); 189 187 } 190 188 }; 191 192 189 } 193 190 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/Invalid.php
r3263746 r3274550 5 5 use InvalidArgumentException; 6 6 7 class Invalid7 final class Invalid 8 8 extends InvalidArgumentException 9 9 implements SaltusFrameworkThrowable { … … 26 26 ); 27 27 28 return new s tatic( $message );28 return new self( $message ); 29 29 } 30 30 … … 44 44 ); 45 45 46 return new s tatic( $message );46 return new self( $message ); 47 47 } 48 48 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/ServiceContainer.php
r3263746 r3274550 91 91 * 92 92 * @param string $id 93 * @param string $ class94 */ 95 public function register( string $id, string $ class, array $dependencies ) {93 * @param string $service_class 94 */ 95 public function register( string $id, string $service_class, array $dependencies ) { 96 96 97 97 // Only instantiate services that are actually needed. 98 if ( is_a( $ class, Conditional::class, true ) &&99 ! $ class::is_needed() ) {98 if ( is_a( $service_class, Conditional::class, true ) && 99 ! $service_class::is_needed() ) { 100 100 return; 101 101 } 102 102 103 $service = $this->instantiate( $ class, $dependencies );103 $service = $this->instantiate( $service_class, $dependencies ); 104 104 105 105 $this->put( $id, $service ); … … 111 111 if ( $service instanceof Actionable ) { 112 112 $priority = 1; 113 $filter = 'init';113 $filter = 'init'; 114 114 if ( method_exists( $service, 'priority' ) ) { 115 115 $priority = $service->priority(); … … 131 131 * Instantiate a single service. 132 132 * 133 * @param string $ class Service class to instantiate.133 * @param string $service_class Service class to instantiate. 134 134 * 135 135 * @throws Invalid If the service could not be properly instantiated. … … 137 137 * @return Service Instantiated service. 138 138 */ 139 private function instantiate( $ class, array $dependencies ): Service {139 private function instantiate( $service_class, array $dependencies ): Service { 140 140 141 141 // The service needs to be registered, so instantiate right away. 142 $service = $this->make( $ class, $dependencies );142 $service = $this->make( $service_class, $dependencies ); 143 143 144 144 if ( ! $service instanceof Service ) { … … 154 154 * @param string $interface_or_class Interface or class to make an object 155 155 * instance out of. 156 * @param array $ argumentsOptional. Additional arguments to pass156 * @param array $dependencies Optional. Additional arguments to pass 157 157 * to the constructor. Defaults to an 158 158 * empty array. … … 172 172 * Get the reflection for a class or throw an exception. 173 173 * 174 * @param string $ class Class to get the reflection for.174 * @param string $service_class Class to get the reflection for. 175 175 * @return ReflectionClass Class reflection. 176 176 * @throws FailedToMakeInstance If the class could not be reflected. 177 177 */ 178 private function get_class_reflection( string $ class ): ReflectionClass {178 private function get_class_reflection( string $service_class ): ReflectionClass { 179 179 try { 180 return new ReflectionClass( $ class );180 return new ReflectionClass( $service_class ); 181 181 } catch ( SaltusFrameworkThrowable $exception ) { 182 throw FailedToMakeInstance::for_unreflectable_class( $ class );182 throw FailedToMakeInstance::for_unreflectable_class( $service_class ); 183 183 } 184 184 } … … 209 209 * Make an object instance out of an interface or class. 210 210 * 211 * @param string $ class Class to make an object instance out of.211 * @param string $service_class Class to make an object instance out of. 212 212 * @param array $dependencies Optional. Dependencies of the class. 213 213 * @return object Instantiated object. 214 214 */ 215 public function instantiate( string $ class, array $dependencies = [] ) {216 return new $ class( ...$dependencies );215 public function instantiate( string $service_class, array $dependencies = [] ) { 216 return new $service_class( ...$dependencies ); 217 217 } 218 218 }; 219 220 219 } 221 220 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Service/Actionable.php
r3263746 r3274550 15 15 16 16 /** 17 * Check whether the conditional object is currently needed. 18 * 19 * @return bool Whether the conditional object is needed. 17 * Add an action to the WordPress action hook. 20 18 */ 21 19 public function add_action(); -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Modeler.php
r3263746 r3274550 19 19 $this->model_factory = $model_factory; 20 20 // should contain a list of loaded models 21 22 21 } 23 22 … … 37 36 $path = $project_path . '/src/models/'; 38 37 if ( has_filter( 'saltus_models_path' ) ) { 38 /** @deprecated 1.2.0 */ 39 39 $path = apply_filters( 'saltus_models_path', $path ); 40 } 41 if ( has_filter( 'saltus/framework/models/path' ) ) { 42 $path = apply_filters( 'saltus/framework/models/path', $path ); 40 43 } 41 44 … … 81 84 // check for models added with filters 82 85 if ( has_filter( 'saltus_models' ) ) { 83 $model = apply_filters( 'saltus_models', [] ); 86 /** @deprecated 1.2.0 */ 87 $model = apply_filters( 'saltus_models', [] ); 84 88 ( ! empty( $model ) && count( $model ) > 0 ? 85 $this->iterate_multiple($model ) : 89 $this->iterate_multiple( $model ) : 90 $this->create( $model ) 91 ); 92 } 93 // check for models added with filters 94 if ( has_filter( 'saltus/framework/models/extra_models' ) ) { 95 /** 96 * parse the models and create them. 97 * Useful for models that are the parsed models 98 * 99 * @param array $empty_list Empty list for extra models 100 */ 101 $empty_list = []; 102 $model = apply_filters( 'saltus/framework/models/extra_models', $empty_list ); 103 ( ! empty( $model ) && count( $model ) > 0 ? 104 $this->iterate_multiple( $model ) : 86 105 $this->create( $model ) 87 106 ); … … 126 145 $this->model_list[ $model->get_type() ] = $model; 127 146 } 128 129 147 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/BaseModel.php
r3263746 r3274550 56 56 protected $ui_labels; 57 57 58 /** 59 * Constructor. 60 * 61 * @param AbstractConfig $config_data The configuration data for the model. 62 */ 58 63 public function __construct( AbstractConfig $config_data ) { 59 64 $this->data = $config_data->all(); … … 74 79 // set messages to override 75 80 $this->set_messages( $config_data ); 76 77 81 } 78 82 … … 93 97 * 94 98 * Required to register post type 99 * 100 * @param string $name The name of the post type. 95 101 */ 96 102 protected function set_name( string $name ) { … … 102 108 * 103 109 * Based on labels.overrides.ui values 110 * 111 * @param AbstractConfig $config The configuration labels for the model. 104 112 */ 105 113 protected function set_ui_label_overrides( AbstractConfig $config ) { … … 111 119 * 112 120 * Based on labels.overrides.messages and label.overrides.bulk_messages values 121 * 122 * @param AbstractConfig $config The configuration labels for the model. 113 123 */ 114 124 protected function set_messages( AbstractConfig $config ) { … … 121 131 * 122 132 * Based on name, or keys labels.has-one and labels.has-many 133 * 134 * @param AbstractConfig $config The configuration labels for the model. 123 135 */ 124 136 protected function set_name_labels( AbstractConfig $config ) { … … 146 158 * 147 159 * Merge and/or replace defaults with user config 160 * 161 * @param array $options User defined options 148 162 */ 149 163 protected function set_options( array $options ) { … … 152 166 return; 153 167 } 154 if ( $this->data['options'] ) { 155 $options = array_replace( $options, $this->data['options'] );156 } 168 169 $options = array_replace( $options, $this->data['options'] ); 170 157 171 $this->options = $options; 158 172 } … … 162 176 * 163 177 * If key labels.overrides exists, add to or replace label defaults 178 * 179 * @param array $labels User defined labels 164 180 */ 165 181 protected function set_labels( array $labels ) { … … 189 205 * 10 => "Post draft updated. {Preview post}" 190 206 * 191 * @param array[] $messages An array of post updated message arrays keyed by post type. 192 * @return array[] Updated array of post updated messages. 193 */ 194 public function post_updated_messages( array $messages ) : array { 207 * @param array $messages An array of post updated message arrays keyed by post type. 208 * 209 * @return array Updated array of post updated messages. 210 */ 211 public function post_updated_messages( array $messages ): array { 195 212 global $post; 196 213 … … 229 246 ( isset( $this->messages['post_updated_short'] ) ? str_replace( $search, $replace, $this->messages['post_updated_short'] ) : 230 247 sprintf( 231 '%1$s restored to revision from %2$s',232 esc_html( $this->one ),233 wp_post_revision_title( intval( $_GET['revision'] ), false )248 '%1$s restored to revision from %2$s', 249 esc_html( $this->one ), 250 wp_post_revision_title( intval( $_GET['revision'] ), false ) 234 251 ) 235 252 ) : … … 292 309 * @param array[] $messages An array of bulk post updated message arrays keyed by post type. 293 310 * @param int[] $counts An array of counts for each key in `$messages`. 294 * @return array Updated array of bulk post updated messages. 295 */ 296 public function bulk_post_updated_messages( array $messages, array $counts ) : array { 311 * 312 * @return array Updated array of bulk post updated messages. 313 */ 314 public function bulk_post_updated_messages( array $messages, array $counts ): array { 297 315 $messages[ $this->name ] = [ 298 316 'updated' => isset( $this->bulk_messages['updated_singular'] ) && isset( $this->bulk_messages['updated_plural'] ) ? … … 347 365 * @param string $plural The text that will be used if $number is not 1 348 366 * @param int $number The number to compare against to use either `$single` or `$plural` 349 * @return string Either `$single` or `$plural` text 350 */ 351 protected static function n( string $single, string $plural, int $number ) : string { 352 return ( 1 === intval( $number ) ) ? $single : $plural; 367 * 368 * @return string Either `$single` or `$plural` text 369 */ 370 protected static function n( string $single, string $plural, int $number ): string { 371 return ( intval( $number ) === 1 ) ? $single : $plural; 353 372 } 354 373 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/Model.php
r3263746 r3274550 17 17 */ 18 18 public function get_type(); 19 20 19 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/ModelFactory.php
r3263746 r3274550 2 2 3 3 namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models; 4 use Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Infrastructure\Plugin\{5 Registerable6 };7 4 8 5 use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\AbstractConfig; … … 14 11 protected $project; 15 12 13 /** 14 * Constructor. 15 * 16 * @param object $app The application instance. 17 * @param string $project The project data. 18 */ 16 19 public function __construct( $app, $project ) { 17 20 $this->app = $app; … … 20 23 21 24 /** 22 * Route to class 25 * Create a new model instance based on the provided configuration. 26 * 27 * @param AbstractConfig $config The configuration for the model. 28 * 29 * @return Model|bool The created model instance or false if the type is not recognized. 23 30 */ 24 31 public function create( AbstractConfig $config ) { … … 37 44 if ( $config->has( $service_name ) && $this->app->has( $service_name ) ) { 38 45 39 $config_value = $config->get( $service_name );40 $service= $this->app->get( $service_name );41 $service_imp= $service->make( $cpt->name, $this->project, $config_value );46 $config_value = $config->get( $service_name ); 47 $service = $this->app->get( $service_name ); 48 $service_imp = $service->make( $cpt->name, $this->project, $config_value ); 42 49 43 if ( $service_imp instanceof Processable ) { 44 $service_imp->process(); 50 if ( $service_imp instanceof Processable ) { 51 $service_imp->process(); 52 } 45 53 } 46 }47 54 } 48 55 … … 64 71 65 72 // make sure $args is an array 66 if ( ! is_array( $args ) ){73 if ( ! is_array( $args ) ) { 67 74 $args = []; 68 75 } 69 76 70 $service = $this->app->get( $normalized_feature_name );77 $service = $this->app->get( $normalized_feature_name ); 71 78 $service_imp = $service->make( $cpt->name, $this->project, $args ); 72 79 … … 79 86 // disable block editor only if 'block_editor' is false 80 87 if ( $config->has( 'block_editor' ) && ! $config->get( 'block_editor' ) ) { 81 add_filter( 'use_block_editor_for_post_type', array( $cpt, 'disable_block_editor' ), 10, 2 );88 add_filter( 'use_block_editor_for_post_type', array( $cpt, 'disable_block_editor' ), 10, 2 ); 82 89 } 83 90 return $cpt; … … 91 98 92 99 return false; 93 94 100 } 95 101 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/PostType.php
r3263746 r3274550 2 2 namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models; 3 3 4 /** 5 * Post Type Model 6 * 7 * This model is used to register a custom post type 8 * 9 * @see https://developer.wordpress.org/reference/functions/register_post_type/ 10 */ 4 11 class PostType extends BaseModel implements Model { 5 12 … … 28 35 * Get default Options 29 36 * 30 * Turn it public, change menu position and add `supports` list.31 37 * 32 38 * @return array The list of options settings … … 50 56 51 57 /** 52 * 53 * 58 * Set the meta fields 54 59 */ 55 60 protected function set_meta() { … … 120 125 /** 121 126 * Register Post Type 122 *123 * @return void124 127 */ 125 128 protected function register() { … … 140 143 * Adds filters to change post update messages 141 144 * TODO: accept overrides 142 *143 * @return void144 145 */ 145 146 protected function set_updated_messages() { 146 147 147 add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ], 1 ); 148 148 add_filter( 'bulk_post_updated_messages', [ $this, 'bulk_post_updated_messages' ], 1, 2 ); 149 150 149 } 151 150 … … 154 153 * 155 154 * @param array $ui_labels 156 * @return void157 155 */ 158 156 protected function set_ui_labels( array $ui_labels ) { … … 183 181 * Sets the placeholder text for the title field for this post type. 184 182 * 185 * @param string $title The placeholder text. 186 * @param WP_Post $post The current post. 187 * @return string The updated placeholder text. 183 * @param string $title The placeholder text. 184 * @param \WP_Post $post The current post. 185 * 186 * @return string The updated placeholder text. 188 187 */ 189 public function enter_title_here( string $title, \WP_Post $post ) : string {188 public function enter_title_here( string $title, \WP_Post $post ): string { 190 189 if ( $this->name !== $post->post_type ) { 191 190 return $title; … … 194 193 return $this->ui_labels['enter_title_here']; 195 194 } 196 197 195 } -
interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/Taxonomy.php
r3263746 r3274550 2 2 namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models; 3 3 4 /** 5 * Taxonomy Model 6 * 7 * This model is used to register a custom taxonomy 8 * 9 * @see https://developer.wordpress.org/reference/functions/register_taxonomy/ 10 */ 4 11 class Taxonomy extends BaseModel implements Model { 5 12 6 13 // data req for register_taxonomy() 7 private $links = 'post';8 14 private $associations; 9 15 … … 107 113 108 114 /** 109 * 110 * 115 * Set meta fields 111 116 */ 112 117 private function set_meta() { -
interactive-globes/tags/1.4.8/vendor/autoload.php
r3269027 r3274550 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 25dbc9f91dd60cec63ebce8f5ddfa9d1::getLoader();25 return ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48::getLoader(); -
interactive-globes/tags/1.4.8/vendor/composer/autoload_classmap.php
r3269027 r3274550 66 66 'CSF_Welcome' => $vendorDir . '/saltus/framework/lib/codestar-framework/views/welcome.php', 67 67 'CSF_Widget' => $vendorDir . '/saltus/framework/lib/codestar-framework/classes/widget-options.class.php', 68 'ComposerAutoloaderInit 063318fd13e99c35a4f3e7f801033e0f' => $baseDir . '/../vendor-prefixed/composer/autoload_real.php',68 'ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0' => $baseDir . '/../vendor-prefixed/composer/autoload_real.php', 69 69 'Composer\\Autoload\\ClassLoader' => $baseDir . '/../vendor-prefixed/composer/ClassLoader.php', 70 'Composer\\Autoload\\ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f' => $baseDir . '/../vendor-prefixed/composer/autoload_static.php',70 'Composer\\Autoload\\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0' => $baseDir . '/../vendor-prefixed/composer/autoload_static.php', 71 71 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 72 72 'Noodlehaus\\AbstractConfig' => $vendorDir . '/hassankhan/config/src/AbstractConfig.php', … … 109 109 'Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/Duplicate.php', 110 110 'Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 111 'Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => $vendorDir . '/saltus/framework/src/Features/FeatureA/FeatureA.php',112 'Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => $vendorDir . '/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',113 'Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => $vendorDir . '/saltus/framework/src/Features/Meta/CMB2Meta.php',114 111 'Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $vendorDir . '/saltus/framework/src/Features/Meta/CodestarMeta.php', 115 112 'Saltus\\WP\\Framework\\Features\\Meta\\Meta' => $vendorDir . '/saltus/framework/src/Features/Meta/Meta.php', … … 226 223 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php', 227 224 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 228 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/FeatureA/FeatureA.php',229 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',230 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CMB2Meta.php',231 225 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php', 232 226 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php', -
interactive-globes/tags/1.4.8/vendor/composer/autoload_real.php
r3269027 r3274550 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 25dbc9f91dd60cec63ebce8f5ddfa9d15 class ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 25dbc9f91dd60cec63ebce8f5ddfa9d1', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 25dbc9f91dd60cec63ebce8f5ddfa9d1', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 25dbc9f91dd60cec63ebce8f5ddfa9d1::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
interactive-globes/tags/1.4.8/vendor/composer/autoload_static.php
r3269027 r3274550 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 25dbc9f91dd60cec63ebce8f5ddfa9d17 class ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 94 94 'CSF_Welcome' => __DIR__ . '/..' . '/saltus/framework/lib/codestar-framework/views/welcome.php', 95 95 'CSF_Widget' => __DIR__ . '/..' . '/saltus/framework/lib/codestar-framework/classes/widget-options.class.php', 96 'ComposerAutoloaderInit 063318fd13e99c35a4f3e7f801033e0f' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_real.php',96 'ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_real.php', 97 97 'Composer\\Autoload\\ClassLoader' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/ClassLoader.php', 98 'Composer\\Autoload\\ComposerStaticInit 063318fd13e99c35a4f3e7f801033e0f' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_static.php',98 'Composer\\Autoload\\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_static.php', 99 99 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 100 100 'Noodlehaus\\AbstractConfig' => __DIR__ . '/..' . '/hassankhan/config/src/AbstractConfig.php', … … 137 137 'Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/Duplicate.php', 138 138 'Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 139 'Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => __DIR__ . '/..' . '/saltus/framework/src/Features/FeatureA/FeatureA.php',140 'Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => __DIR__ . '/..' . '/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',141 'Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CMB2Meta.php',142 139 'Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CodestarMeta.php', 143 140 'Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/Meta.php', … … 254 251 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php', 255 252 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\SaltusDuplicate' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php', 256 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\FeatureA' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/FeatureA/FeatureA.php',257 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\FeatureA\\SaltusFeatureA' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/FeatureA/SaltusFeatureA.php',258 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CMB2Meta' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CMB2Meta.php',259 253 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php', 260 254 'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php', … … 387 381 { 388 382 return \Closure::bind(function () use ($loader) { 389 $loader->prefixLengthsPsr4 = ComposerStaticInit 25dbc9f91dd60cec63ebce8f5ddfa9d1::$prefixLengthsPsr4;390 $loader->prefixDirsPsr4 = ComposerStaticInit 25dbc9f91dd60cec63ebce8f5ddfa9d1::$prefixDirsPsr4;391 $loader->classMap = ComposerStaticInit 25dbc9f91dd60cec63ebce8f5ddfa9d1::$classMap;383 $loader->prefixLengthsPsr4 = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$prefixLengthsPsr4; 384 $loader->prefixDirsPsr4 = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$prefixDirsPsr4; 385 $loader->classMap = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$classMap; 392 386 393 387 }, null, ClassLoader::class); -
interactive-globes/tags/1.4.8/vendor/composer/installed.json
r3269027 r3274550 85 85 "type": "git", 86 86 "url": "https://github.com/SaltusDev/saltus-framework.git", 87 "reference": " 930112677d90dbf2c783698d800d8234594fa836"87 "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56" 88 88 }, 89 89 "dist": { 90 90 "type": "zip", 91 "url": "https://api.github.com/repos/SaltusDev/saltus-framework/zipball/ 930112677d90dbf2c783698d800d8234594fa836",92 "reference": " 930112677d90dbf2c783698d800d8234594fa836",91 "url": "https://api.github.com/repos/SaltusDev/saltus-framework/zipball/25a9204d7af6d3224aa6c98d2263ae76c05d7b56", 92 "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56", 93 93 "shasum": "" 94 94 }, 95 95 "require": { 96 "hassankhan/config": "^3. 1.0",96 "hassankhan/config": "^3.2.0", 97 97 "php": ">=7.2" 98 98 }, 99 99 "require-dev": { 100 "phpunit/phpunit": "^11.4.3", 101 "squizlabs/php_codesniffer": "^3.10.3" 100 "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 101 "digitalrevolution/php-codesniffer-baseline": "^1.1.2", 102 "php-stubs/woocommerce-stubs": "^9.2", 103 "php-stubs/wordpress-stubs": "^6.7", 104 "phpcompatibility/phpcompatibility-wp": "*", 105 "phpstan/extension-installer": "^1.3", 106 "phpunit/phpunit": "^12.0", 107 "squizlabs/php_codesniffer": "^3.7", 108 "szepeviktor/phpstan-wordpress": "^2.1", 109 "wp-coding-standards/wpcs": "^3.1", 110 "yoast/phpunit-polyfills": "^4.0" 102 111 }, 103 "time": "2025-0 2-18T13:11:29+00:00",112 "time": "2025-04-16T08:50:13+00:00", 104 113 "type": "project", 105 114 "installation-source": "dist", … … 119 128 "scripts": { 120 129 "test": [ 121 "vendor/bin/phpcs" 130 "./vendor/bin/phpunit -c phpunit.xml" 131 ], 132 "phpstan": [ 133 "./vendor/bin/phpstan analyse --memory-limit=2G" 134 ], 135 "phpcs": [ 136 "./vendor/bin/phpcs --standard=phpcs.xml" 122 137 ] 123 138 }, -
interactive-globes/tags/1.4.8/vendor/composer/installed.php
r3269027 r3274550 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' e725ce4ae9f4b95d08ef2e49e4172fa0342dc235',6 'reference' => '8775aa6c21c922ad232acdde2c27edddc93221e1', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../build', … … 32 32 'pretty_version' => 'dev-dev', 33 33 'version' => 'dev-dev', 34 'reference' => ' 930112677d90dbf2c783698d800d8234594fa836',34 'reference' => '25a9204d7af6d3224aa6c98d2263ae76c05d7b56', 35 35 'type' => 'project', 36 36 'install_path' => __DIR__ . '/../saltus/framework', … … 41 41 'pretty_version' => 'dev-main', 42 42 'version' => 'dev-main', 43 'reference' => ' e725ce4ae9f4b95d08ef2e49e4172fa0342dc235',43 'reference' => '8775aa6c21c922ad232acdde2c27edddc93221e1', 44 44 'type' => 'wordpress-plugin', 45 45 'install_path' => __DIR__ . '/../../build', -
interactive-globes/tags/1.4.8/vendor/saltus/framework/CHANGELOG.md
r3269027 r3274550 5 5 6 6 7 ## [1.2.0] - 2025-04-08 8 9 ### Added 10 - New hook in Admin Filters 11 - Allow meta query params to be passed by model 12 - Allow models to overwrite sort type 13 - CS and analyzers dependencies 14 - Set possible prefixes 15 16 ### Changed 17 - Fix admin filters 18 - Improve naming of filters and actions 19 - CS, Docs, and optimizations 20 - Update admin cols from ext-cpts and small optimizations 21 - Change action name for drag and drop to be more descriptive 22 - Improve naming of Duplicate nonce and action 23 - Simplify parsing of meta box setttings for registering in rest api 24 25 ### Removed 26 - CMB2Meta 27 - Demo feature 28 7 29 ## [1.1.4] - 2025-02-18 8 30 9 31 ### Changed 10 Move loading codestar from files to classmap32 - Move loading codestar from files to classmap 11 33 12 34 ## [1.1.3] - 2025-01-28 13 35 14 36 ### Added 15 Add changelog37 - Add changelog 16 38 17 39 ## [1.1.2] - 2024-12-10 18 40 19 41 ### Fixed 20 Load models by ascending filename order42 - Load models by ascending filename order 21 43 22 44 ## [1.1.1] - 2024-12-10 23 45 24 46 ### Fixed 25 Correct Media meta field type26 Rename drag and drop action27 Allow settings meta boxes to have any number of sections47 - Correct Media meta field type 48 - Rename drag and drop action 49 - Allow settings meta boxes to have any number of sections 28 50 29 51 ## [1.1.0] - 2024-11-28 30 52 31 53 ### Added 32 Items as CPTs54 - Items as CPTs 33 55 ### Changed 34 Updated Codestar35 Updated dependencies56 - Updated Codestar 57 - Updated dependencies 36 58 ### Fixed 37 Save linebreaks on save meta38 interfaces usage59 - Save linebreaks on save meta 60 - interfaces usage 39 61 ### Removed 40 p2p integration62 - p2p integration 41 63 42 64 … … 44 66 45 67 ### Added 46 remember tabs68 - Remember tabs 47 69 ### Fixed 48 Fix missing properties49 Update features to be Processable70 - Fix missing properties 71 - Update features to be Processable 50 72 51 73 … … 53 75 54 76 ### Added 55 Meta feature56 Settings feature57 Drag and drop feature58 Duplicate feature59 Export feature60 Admin Cols and Admin Filters features77 - Meta feature 78 - Settings feature 79 - Drag and drop feature 80 - Duplicate feature 81 - Export feature 82 - Admin Cols and Admin Filters features 61 83 62 84 ## [1.0.0] - 2019-04-23 63 Initial Release85 - Initial Release 64 86 65 87 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/README.md
r3269027 r3274550 5 5 6 6 ## Version 7 ## [1.1.4] - 2025-02-18 7 8 ## [1.2.0] - 2025-04-08 8 9 See [change log file](CHANGELOG.md) for full details. 9 10 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/assets/Feature/DragAndDrop/order.js
r3207680 r3274550 7 7 'update': function (e, ui) { 8 8 $.post( drag_drop_object.ajaxurl, { 9 action: 'saltus- dad-update-menu-order',9 action: 'saltus-framework-drop-and-drag-update-menu-order', 10 10 order: $('#the-list').sortable('serialize'), 11 11 nonce: drag_drop_object.nonce, -
interactive-globes/tags/1.4.8/vendor/saltus/framework/composer.json
r3269027 r3274550 36 36 "require": { 37 37 "php": ">=7.2", 38 "hassankhan/config": "^3. 1.0"38 "hassankhan/config": "^3.2.0" 39 39 }, 40 40 "require-dev": { 41 "phpunit/phpunit": "^11.4.3", 42 "squizlabs/php_codesniffer": "^3.10.3" 41 "phpunit/phpunit": "^12.0", 42 "yoast/phpunit-polyfills": "^4.0", 43 "szepeviktor/phpstan-wordpress": "^2.1", 44 "phpstan/extension-installer": "^1.3", 45 "squizlabs/php_codesniffer": "^3.7", 46 "wp-coding-standards/wpcs": "^3.1", 47 "digitalrevolution/php-codesniffer-baseline": "^1.1.2", 48 "php-stubs/woocommerce-stubs": "^9.2", 49 "php-stubs/wordpress-stubs": "^6.7", 50 "phpcompatibility/phpcompatibility-wp": "*", 51 "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 43 52 }, 44 53 "scripts": { 45 "test": [46 "vendor/bin/phpcs"47 ]54 "test": "./vendor/bin/phpunit -c phpunit.xml", 55 "phpstan": "./vendor/bin/phpstan analyse --memory-limit=2G", 56 "phpcs": "./vendor/bin/phpcs --standard=phpcs.xml" 48 57 }, 49 58 "minimum-stability": "dev", 50 "prefer-stable": true 59 "prefer-stable": true, 60 "config": { 61 "allow-plugins": { 62 "dealerdirect/phpcodesniffer-composer-installer": true, 63 "phpstan/extension-installer": true, 64 "digitalrevolution/php-codesniffer-baseline": true 65 } 66 } 51 67 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Core.php
r3207680 r3274550 38 38 39 39 // Prefixes to use. 40 const HOOK_PREFIX = ' ';40 const HOOK_PREFIX = 'saltus/framework/'; 41 41 const SERVICE_PREFIX = ''; 42 42 … … 109 109 $this->modeler = new Modeler( $model_factory ); 110 110 $project_path = $this->project['path']; 111 /** @deprecated 1.2.0 */ 111 112 $priority = apply_filters( 'saltus_modeler_priority', 1 ); 113 $priority = apply_filters( 'saltus/framework/modeler/priority', 1 ); 112 114 add_action( 113 115 'init', -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminCols/AdminCols.php
r2986425 r3274550 26 26 */ 27 27 public static function make( $name, $project, $args ) { 28 return new SaltusAdminCols( $name, $ project, $args );28 return new SaltusAdminCols( $name, $args ); 29 29 } 30 30 … … 41 41 return is_admin(); 42 42 } 43 44 43 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php
r3098987 r3274550 15 15 * Enable custom administration columns 16 16 * 17 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion 17 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion with notable changes: 18 * - models can override the default sort order 18 19 */ 19 20 final class SaltusAdminCols implements Processable { 20 21 22 /** 23 * @var string $name The name of the custom post type (CPT) 24 */ 21 25 private $name; 22 private $project; 26 27 /** 28 * @var array $args List of columns 29 */ 23 30 private $args; 24 31 … … 26 33 * @var array Default columns 27 34 */ 28 private $default_columns ;29 30 /** 31 * @var array Managed colum sn32 */ 33 private $managed_columns = null;35 private $default_columns = null; 36 37 /** 38 * @var array Managed columns 39 */ 40 private ?array $managed_columns = null; 34 41 35 42 /** 36 43 * Instantiate this Service object. 37 44 * 38 */ 39 public function __construct( string $name, array $project, array $args ) { 40 $this->project = $project; 41 $this->name = $name; 42 $this->args = $args; 45 * @param string $name The name of the custom post type (CPT) 46 * @param array $args List of columns 47 */ 48 public function __construct( string $name, array $args ) { 49 $this->name = $name; 50 $this->args = $args; 43 51 } 44 52 … … 52 60 add_filter( 'manage_posts_columns', [ $this, 'log_default_cols' ], 0 ); 53 61 add_filter( 'manage_pages_columns', [ $this, 'log_default_cols' ], 0 ); 54 add_filter( "manage_edit-{$this->name}_sortable_columns", [ $this, 'sortables' ] ); 55 add_filter( "manage_{$this->name}_posts_columns", [ $this, 'manage_columns' ] ); 56 add_action( "manage_{$this->name}_posts_custom_column", [ $this, 'manage_custom_columns' ], 10, 2 ); 62 add_filter( 'manage_media_columns', [ $this, 'log_default_cols' ], 0 ); 63 if ( $this->name === 'attachment' ) { 64 add_filter( 'manage_upload_sortable_columns', [ $this, 'sortables' ] ); 65 add_filter( 'manage_media_columns', [ $this, 'manage_columns' ] ); 66 add_action( 'manage_media_custom_column', [ $this, 'manage_custom_columns' ], 10, 2 ); 67 } else { 68 add_filter( "manage_edit-{$this->name}_sortable_columns", [ $this, 'sortables' ] ); 69 add_filter( "manage_{$this->name}_posts_columns", [ $this, 'manage_columns' ] ); 70 add_action( "manage_{$this->name}_posts_custom_column", [ $this, 'manage_custom_columns' ], 10, 2 ); 71 } 72 57 73 add_action( 'load-edit.php', [ $this, 'default_sort' ] ); 58 74 add_filter( 'pre_get_posts', [ $this, 'maybe_sort_by_fields' ] ); … … 73 89 74 90 /** 75 * Adds ourcustom columns to the list of sortable columns.76 * 77 * @param array $cols Array of sortable columns keyed by the column ID.78 * @return array Updated array of sortable columns.91 * Adds the custom columns to the list of sortable columns. 92 * 93 * @param array<string,string> $cols Array of sortable columns keyed by the column ID. 94 * @return array<string,string> Updated array of sortable columns. 79 95 */ 80 96 public function sortables( array $cols ): array { … … 99 115 * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-columns 100 116 * 101 * @param array $cols Associative array of columns102 * @return array Updated array of columns117 * @param array<string,string> $cols Associative array of columns 118 * @return array<string,string> Updated array of columns 103 119 */ 104 120 public function manage_columns( array $cols ): array { … … 121 137 } 122 138 123 # Add our custom columns: 124 foreach ( array_filter( $this->args ) as $id => $col ) { 139 # Add the custom columns: 140 /** @var array<string,(string|mixed[])> */ 141 $admin_cols = array_filter( $this->args ); 142 143 foreach ( $admin_cols as $id => $col ) { 125 144 if ( is_string( $col ) && isset( $cols[ $col ] ) ) { 126 145 # Existing (ie. built-in) column with id as the value … … 137 156 $k = 'author'; 138 157 } 139 $new_cols[ $k ] = esc_html__( 'Author', ' extended-cpts' );158 $new_cols[ $k ] = esc_html__( 'Author', 'saltus-framework' ); 140 159 } elseif ( is_array( $col ) ) { 141 160 if ( isset( $col['cap'] ) && ! current_user_can( $col['cap'] ) ) { … … 146 165 $new_cols[ $id ] = call_user_func( $col['title_cb'], $col ); 147 166 } else { 148 $title = esc_html( $ col['title'] ?? $this->get_item_title( $col ) ?? $id);167 $title = esc_html( $this->get_item_title( $col, $id ) ); 149 168 150 169 if ( isset( $col['title_icon'] ) ) { … … 172 191 * Returns a sensible title for the current item (usually the arguments array for a column) 173 192 * 174 * @param array $item An array of arguments 175 * @return string|null The item title 176 */ 177 protected function get_item_title( array $item ) { 178 if ( isset( $item['taxonomy'] ) ) { 193 * @param array<string,mixed> $item An array of arguments. 194 * @param string $fallback Fallback item title. 195 * @return string The item title. 196 */ 197 protected function get_item_title( array $item, string $fallback = '' ): string { 198 if ( isset( $item['title'] ) ) { 199 return $item['title']; 200 201 } elseif ( isset( $item['taxonomy'] ) ) { 179 202 $tax = get_taxonomy( $item['taxonomy'] ); 180 203 if ( $tax ) { … … 201 224 ) ) ); 202 225 } 203 return null; 204 } 205 206 /** 207 * Output the column data for our custom columns. 208 * 209 * @param string $col The column name 210 */ 211 public function manage_custom_columns( string $col, $post_id ) { 226 return $fallback; 227 } 228 229 /** 230 * Output the column data for the custom columns. 231 * 232 * @param string $col The column name. 233 * @param int $post_id The post ID. 234 */ 235 public function manage_custom_columns( string $col, int $post_id ): void { 212 236 # Shorthand: 213 237 $c = $this->args; 214 238 215 # We're only interested in ourcustom columns:239 # We're only interested in the custom columns: 216 240 $custom_cols = array_filter( array_keys( $c ) ); 217 241 … … 221 245 222 246 if ( isset( $c[ $col ]['post_cap'] ) && ! current_user_can( $c[ $col ]['post_cap'], get_the_ID() ) ) { 247 return; 248 } 249 $post = get_post( $post_id ); 250 251 if ( ! $post ) { 223 252 return; 224 253 } … … 229 258 230 259 if ( isset( $c[ $col ]['function'] ) ) { 231 call_user_func( $c[ $col ]['function'] );260 call_user_func( $c[ $col ]['function'], $post ); 232 261 } elseif ( isset( $c[ $col ]['meta_key'] ) ) { 233 $this->col_post_meta( $ c[ $col ]['meta_key'], $c[ $col ] );262 $this->col_post_meta( $post, $c[ $col ]['meta_key'], $c[ $col ] ); 234 263 } elseif ( isset( $c[ $col ]['taxonomy'] ) ) { 235 $this->col_taxonomy( $post _id, $c[ $col ]['taxonomy'], $c[ $col ] );264 $this->col_taxonomy( $post, $c[ $col ]['taxonomy'], $c[ $col ] ); 236 265 } elseif ( isset( $c[ $col ]['post_field'] ) ) { 237 $this->col_post_field( $post _id, $c[ $col ]['post_field'], $c[ $col ] );266 $this->col_post_field( $post, $c[ $col ]['post_field'], $c[ $col ] ); 238 267 } elseif ( isset( $c[ $col ]['featured_image'] ) ) { 239 $this->col_featured_image( $ c[ $col ]['featured_image'], $c[ $col ] );268 $this->col_featured_image( $post, $c[ $col ]['featured_image'], $c[ $col ] ); 240 269 } 241 270 } … … 244 273 * Outputs column data for a post meta field. 245 274 * 246 * @param string $meta_key The post meta key 247 * @param array $args Array of arguments for this field 248 */ 249 public function col_post_meta( string $meta_key, array $args ) { 250 $vals = get_post_meta( get_the_ID(), $meta_key, false ); 275 * @param \WP_Post $post The post object. 276 * @param string $meta_key The post meta key. 277 * @param array<string,mixed> $args Array of arguments for this field. 278 */ 279 public function col_post_meta( \WP_Post $post, string $meta_key, array $args ): void { 280 $vals = get_post_meta( $post->ID, $meta_key, false ); 251 281 $echo = []; 252 282 … … 257 287 $args['date_format'] = get_option( 'date_format' ); 258 288 } 259 260 foreach ( $vals as $val ) { 261 $val_time = strtotime( $val ); 262 263 if ( $val_time ) { 264 $val = $val_time; 265 } 266 267 if ( is_numeric( $val ) ) { 268 $echo[] = date_i18n( $args['date_format'], $val ); 269 } elseif ( ! empty( $val ) ) { 270 $echo[] = mysql2date( $args['date_format'], $val ); 271 } 272 } 289 $echo = $this->col_date_format( $vals, $args['date_format'] ); 273 290 } else { 274 291 foreach ( $vals as $val ) { 275 276 292 if ( ! empty( $val ) || ( $val === '0' ) ) { 277 293 $echo[] = $val; … … 286 302 } 287 303 } 304 /** 305 * Formats the date values for the column. 306 * 307 * @param array<string> $vals The values to format. 308 * @param string $date_format The date format to use. 309 * @return array<string> The formatted date values. 310 */ 311 private function col_date_format( $vals, $date_format ) { 312 313 $echo = []; 314 foreach ( $vals as $val ) { 315 try { 316 $val_time = ( new \DateTime( '@' . $val ) )->format( 'U' ); 317 } catch ( \Exception $e ) { 318 $val_time = strtotime( $val ); 319 } 320 321 if ( $val_time !== false ) { 322 $val = $val_time; 323 } 324 325 if ( is_numeric( $val ) ) { 326 $echo[] = date_i18n( $date_format, (int) $val ); 327 } elseif ( ! empty( $val ) ) { 328 $echo[] = mysql2date( $date_format, $val ); 329 } 330 } 331 return $echo; 332 } 288 333 289 334 /** 290 335 * Outputs column data for a taxonomy's term names. 291 336 * 292 * @param string $taxonomy The taxonomy name 293 * @param array $args Array of arguments for this field 294 */ 295 public function col_taxonomy( int $post_id, string $taxonomy, array $args ) { 296 297 $post = get_post( $post_id ); 298 $terms = get_the_terms( $post_id, $taxonomy ); 299 $tax = get_taxonomy( $taxonomy ); 300 337 * @param \WP_Post $post The post object. 338 * @param string $taxonomy The taxonomy name. 339 * @param array<string,mixed> $args Array of arguments for this field. 340 */ 341 public function col_taxonomy( \WP_Post $post, string $taxonomy, array $args ): void { 342 $tax = get_taxonomy( $taxonomy ); 343 if ( ! $tax ) { 344 return; 345 } 346 347 $terms = get_the_terms( $post, $taxonomy ); 301 348 if ( is_wp_error( $terms ) ) { 302 349 echo esc_html( $terms->get_error_message() ); 303 350 return; 304 351 } 305 306 352 if ( empty( $terms ) ) { 307 353 printf( … … 316 362 foreach ( $terms as $term ) { 317 363 if ( $args['link'] ) { 318 switch ( $args['link'] ) { 319 320 case 'view': 321 if ( $tax->public ) { 322 // https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1096 323 // @codingStandardsIgnoreStart 324 $out[] = sprintf( 325 '<a href="%1$s">%2$s</a>', 326 esc_url( get_term_link( $term ) ), 327 esc_html( $term->name ) 328 ); 329 // @codingStandardsIgnoreEnd 330 } else { 331 $out[] = esc_html( $term->name ); 332 } 333 break; 334 335 case 'edit': 336 if ( current_user_can( $tax->cap->edit_terms ) ) { 337 $out[] = sprintf( 338 '<a href="%1$s">%2$s</a>', 339 esc_url( get_edit_term_link( $term->term_id, $taxonomy, $post->post_type ) ), 340 esc_html( $term->name ) 341 ); 342 } else { 343 $out[] = esc_html( $term->name ); 344 } 345 break; 346 347 case 'list': 348 $link = add_query_arg( 349 [ 350 'post_type' => $post->post_type, 351 $taxonomy => $term->slug, 352 ], 353 admin_url( 'edit.php' ) 354 ); 355 $out[] = sprintf( 356 '<a href="%1$s">%2$s</a>', 357 esc_url( $link ), 358 esc_html( $term->name ) 359 ); 360 break; 361 362 } 364 $out[] = $this->col_taxonomy_link( $args['link'], $tax, $taxonomy, $term, $post ); 363 365 } else { 364 366 $out[] = esc_html( $term->name ); … … 368 370 echo implode( ', ', $out ); 369 371 } 370 372 /** 373 * Outputs column data for a taxonomy term link. 374 * 375 * @param string $link The link type. 376 * @param \WP_Taxonomy $tax The taxonomy object. 377 * @param string $taxonomy The taxonomy name. 378 * @param \WP_Term $term The term object. 379 * @param \WP_Post $post The post object. 380 */ 381 private function col_taxonomy_link( $link, $tax, $taxonomy, $term, $post ) { 382 $out = ''; 383 switch ( $link ) { 384 385 case 'view': 386 if ( $tax->public ) { 387 // https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1096 388 // @codingStandardsIgnoreStart 389 $out = sprintf( 390 '<a href="%1$s">%2$s</a>', 391 esc_url( get_term_link( $term ) ), 392 esc_html( $term->name ) 393 ); 394 // @codingStandardsIgnoreEnd 395 } else { 396 $out = esc_html( $term->name ); 397 } 398 break; 399 400 case 'edit': 401 if ( current_user_can( $tax->cap->edit_terms ) ) { 402 $out = sprintf( 403 '<a href="%1$s">%2$s</a>', 404 esc_url( get_edit_term_link( $term->term_id, $taxonomy, $post->post_type ) ), 405 esc_html( $term->name ) 406 ); 407 } else { 408 $out = esc_html( $term->name ); 409 } 410 break; 411 412 case 'list': 413 $link = add_query_arg( 414 [ 415 'post_type' => $post->post_type, 416 $taxonomy => $term->slug, 417 ], 418 admin_url( 'edit.php' ) 419 ); 420 $out = sprintf( 421 '<a href="%1$s">%2$s</a>', 422 esc_url( $link ), 423 esc_html( $term->name ) 424 ); 425 break; 426 } 427 return $out; 428 } 371 429 /** 372 430 * Outputs column data for a post field. 373 431 * 374 * @param string $field The post field375 * @param array $args Array of arguments for this field376 * /377 public function col_post_field( int $post_id, string $field, array $args ) {378 $post = get_post( $post_id );432 * @param \WP_Post $post The post object. 433 * @param string $field The post field. 434 * @param array<string,mixed> $args Array of arguments for this field. 435 */ 436 public function col_post_field( \WP_Post $post, string $field, array $args ): void { 379 437 switch ( $field ) { 380 438 … … 414 472 echo esc_html( get_post_field( $field, $post ) ); 415 473 break; 416 417 474 } 418 475 } … … 421 478 * Outputs column data for a post's featured image. 422 479 * 423 * @param string $image_size The image size 424 * @param array $args Array of `width` and `height` attributes for the image 425 */ 426 public function col_featured_image( string $image_size, array $args ) { 480 * @param \WP_Post $post The post object. 481 * @param string $image_size The image size. 482 * @param array<string,string|int> $args Array of `width` and `height` attributes for the image. 483 */ 484 public function col_featured_image( \WP_Post $post, string $image_size, array $args ): void { 427 485 if ( ! function_exists( 'has_post_thumbnail' ) ) { 428 486 return; … … 495 553 * Sets the relevant query vars for sorting posts by our admin sortables. 496 554 * 497 * @param WP_Query $wp_query The current `WP_Query` object.555 * @param \WP_Query $wp_query The current `WP_Query` object. 498 556 */ 499 557 public function maybe_sort_by_fields( \WP_Query $wp_query ) { … … 514 572 515 573 /** 516 * Filters the query's SQL clauses so we can sort postsby taxonomy terms.517 * 518 * @param array $clauses The current query's SQL clauses.519 * @param WP_Query$wp_query The current `WP_Query` object.520 * @return array The updated SQL clauses.574 * Filters the query's SQL clauses so the posts can be sorted by taxonomy terms. 575 * 576 * @param array<string,string> $clauses The current query's SQL clauses. 577 * @param \WP_Query $wp_query The current `WP_Query` object. 578 * @return array<string,string> The updated SQL clauses 521 579 */ 522 580 public function maybe_sort_by_taxonomy( array $clauses, \WP_Query $wp_query ): array { … … 538 596 * sort it by the requested orderby field. 539 597 * 540 * @param array $vars The public query vars, usually from `$wp_query->query`.541 * @param array $sortables The sortables valid for this query (usually the value of the `admin_cols` or542 * `site_sortables` argument when registering an extended post type.543 * @return array The list of private and public query vars to apply to the query.598 * @param array<string,mixed> $vars The public query vars, usually from `$wp_query->query`. 599 * @param array<string,mixed> $sortables The sortables valid for this query (usually the value of the `admin_cols` or 600 * `site_sortables` argument when registering an extended post type. 601 * @return array<string,mixed> The list of private and public query vars to apply to the query. 544 602 */ 545 603 public static function get_sort_field_vars( array $vars, array $sortables ): array { … … 556 614 } 557 615 558 $ orderby= $sortables[ $vars['orderby'] ];559 560 if ( ! is_array( $ orderby) ) {561 return []; 562 } 563 564 if ( isset( $ orderby['sortable'] ) && ! $orderby['sortable'] ) {616 $admin_col = $sortables[ $vars['orderby'] ]; 617 618 if ( ! is_array( $admin_col ) ) { 619 return []; 620 } 621 622 if ( isset( $admin_col['sortable'] ) && ! $admin_col['sortable'] ) { 565 623 return []; 566 624 } … … 568 626 $return = []; 569 627 570 if ( isset( $ orderby['meta_key'] ) ) {571 $return['meta_key'] = $ orderby['meta_key'];628 if ( isset( $admin_col['meta_key'] ) ) { 629 $return['meta_key'] = $admin_col['meta_key']; 572 630 $return['orderby'] = 'meta_value'; 573 // @TODO meta_value_num 574 } elseif ( isset( $orderby['post_field'] ) ) { 575 $field = str_replace( 'post_', '', $orderby['post_field'] ); 631 if ( isset( $admin_col['orderby'] ) ) { 632 $return['orderby'] = $admin_col['orderby']; 633 } 634 } elseif ( isset( $admin_col['post_field'] ) ) { 635 $field = str_replace( 'post_', '', $admin_col['post_field'] ); 576 636 $return['orderby'] = $field; 577 637 } … … 588 648 * sort it by the requested orderby field. 589 649 * 590 * @param array $clauses The query's SQL clauses.591 * @param array $vars The public query vars, usually from `$wp_query->query`.592 * @param array $sortables The sortables valid for this query (usually the value of the `admin_cols` or593 * `site_sortables` argument when registering an extended post type).594 * @return array The list of SQL clauses to apply to the query.650 * @param array<string,string> $clauses The query's SQL clauses. 651 * @param array<string,mixed> $vars The public query vars, usually from `$wp_query->query`. 652 * @param array<string,mixed> $sortables The sortables valid for this query (usually the value of the `admin_cols` or 653 * `site_sortables` argument when registering an extended post type). 654 * @return array<string,string> The list of SQL clauses to apply to the query. 595 655 */ 596 656 public static function get_sort_taxonomy_clauses( array $clauses, array $vars, array $sortables ): array { … … 609 669 } 610 670 611 $ orderby= $sortables[ $vars['orderby'] ];612 613 if ( ! is_array( $ orderby) ) {614 return []; 615 } 616 617 if ( isset( $ orderby['sortable'] ) && ! $orderby['sortable'] ) {618 return []; 619 } 620 621 if ( ! isset( $ orderby['taxonomy'] ) ) {671 $admin_col = $sortables[ $vars['orderby'] ]; 672 673 if ( ! is_array( $admin_col ) ) { 674 return []; 675 } 676 677 if ( isset( $admin_col['sortable'] ) && ! $admin_col['sortable'] ) { 678 return []; 679 } 680 681 if ( ! isset( $admin_col['taxonomy'] ) ) { 622 682 return []; 623 683 } … … 632 692 ON ( ext_cpts_tt.term_id = ext_cpts_t.term_id ) 633 693 "; 634 $clauses['where'] .= $wpdb->prepare( ' AND ( taxonomy = %s OR taxonomy IS NULL )', $ orderby['taxonomy'] );694 $clauses['where'] .= $wpdb->prepare( ' AND ( taxonomy = %s OR taxonomy IS NULL )', $admin_col['taxonomy'] ); 635 695 $clauses['groupby'] = 'ext_cpts_tr.object_id'; 636 696 $clauses['orderby'] = 'GROUP_CONCAT( ext_cpts_t.name ORDER BY name ASC ) '; -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminFilters/AdminFilters.php
r2986425 r3274550 26 26 */ 27 27 public static function make( $name, $project, $args ) { 28 return new SaltusAdminFilters( $name, $ project, $args );28 return new SaltusAdminFilters( $name, $args ); 29 29 } 30 30 … … 41 41 return is_admin(); 42 42 } 43 44 43 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php
r3098987 r3274550 9 9 * Enable custom administration filters 10 10 * 11 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion 11 * Adapted from https://github.com/johnbillion/extended-cpts by johnbillion with notable changes: 12 * - models can override the default sort order 13 * - reduce cyclomatic complexity of some functions 12 14 */ 13 15 final class SaltusAdminFilters implements Processable { 14 16 17 /** 18 * @var string $name The name of the custom post type (CPT) 19 */ 15 20 private $name; 16 private $project; 21 22 /** 23 * @var array $args List of filters 24 */ 17 25 private $args; 18 26 19 public $site_filters; 27 /** 28 * @var array $site_filters List of filters 29 */ 30 public $site_filters = []; 20 31 21 32 /** 22 33 * Instantiate this Service object. 23 34 * 24 */ 25 public function __construct( string $name, array $project, array $args ) { 26 $this->project = $project; 27 $this->name = $name; 28 $this->args = $args; 29 $this->site_filters = []; 30 } 31 35 * @param string $name The name of the custom post type (CPT) 36 * @param array $args List of filters 37 * 38 */ 39 public function __construct( string $name, array $args ) { 40 $this->name = $name; 41 $this->args = $args; 42 foreach ( $args as $id => $filter ) { 43 $this->site_filters[ $id ] = $filter; 44 } 45 } 46 47 /** 48 * Process the filters. 49 */ 32 50 public function process() { 33 34 51 add_action( 'load-edit.php', [ $this, 'default_filter' ] ); 35 52 add_filter( 'pre_get_posts', [ $this, 'maybe_filter' ] ); … … 48 65 # Loop over our filters to find the default filter (if there is one): 49 66 foreach ( $this->args as $id => $filter ) { 50 if ( isset( $_GET[ $id ] ) && '' !== $_GET[ $id ] ) { 67 // phpcs:ignore WordPress.Security.NonceVerification 68 if ( empty( $_GET[ $id ] ) ) { 51 69 continue; 52 70 } … … 62 80 * Filters posts by our custom admin filters. 63 81 * 64 * @param WP_Query $wp_query A `WP_Query` object82 * @param \WP_Query $wp_query A `WP_Query` object 65 83 */ 66 84 public function maybe_filter( \WP_Query $wp_query ) { … … 95 113 * `site_filters` argument when registering an extended post type). 96 114 * @param string $post_type The post type name. 115 * 97 116 * @return array The list of private query vars to apply to the query. 98 117 */ 99 public static function get_filter_vars( array $query, array $filters, string $post_type ) : array {118 public static function get_filter_vars( array $query, array $filters, string $post_type ): array { 100 119 $return = []; 101 120 … … 104 123 $date_query = []; 105 124 106 if ( ! isset( $query[ $filter_key ] ) || ( '' === $query[ $filter_key ]) ) {125 if ( ! isset( $query[ $filter_key ] ) || ( $query[ $filter_key ] === '' ) ) { 107 126 continue; 108 127 } … … 112 131 } 113 132 133 $hook = "saltus/framework/admin_filters/{$post_type}/filter_query/{$filter_key}"; 134 135 if ( has_filter( $hook ) ) { 136 /** 137 * Allows a filter's private query vars to be overridden. 138 * 139 * @param array<string,mixed> $return The private query vars. 140 * @param array<string,mixed> $query The public query vars. 141 * @param array<string,mixed> $filter The filter arguments. 142 */ 143 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 144 $return = apply_filters( $hook, $return, $query, $filter ); 145 continue; 146 } 147 114 148 if ( isset( $filter['meta_key'] ) ) { 115 $meta_query = [116 'key' => $filter['meta_key'],117 'value' => wp_unslash( $query[ $filter_key ] ),118 ]; 149 $meta_query = array_merge( $meta_query, $filter ); 150 $meta_query['key'] = $filter['meta_key']; 151 $meta_query['value'] = wp_unslash( $query[ $filter_key ] ); 152 119 153 } elseif ( isset( $filter['meta_search_key'] ) ) { 120 $meta_query = [ 121 'key' => $filter['meta_search_key'], 122 'value' => wp_unslash( $query[ $filter_key ] ), 154 // default to LIKE 155 $meta_query = [ 123 156 'compare' => 'LIKE', 124 157 ]; 158 $meta_query = array_merge( $meta_query, $filter ); 159 $meta_query['key'] = $filter['meta_search_key']; 160 $meta_query['value'] = wp_unslash( $query[ $filter_key ] ); 161 125 162 } elseif ( isset( $filter['meta_key_exists'] ) ) { 126 $meta_query = [127 'key' => wp_unslash( $query[ $filter_key ] ),163 // default to EXISTS 164 $meta_query = [ 128 165 'compare' => 'EXISTS', 129 166 ]; 167 $meta_query = array_merge( $meta_query, $filter ); 168 $meta_query['key'] = wp_unslash( $query[ $filter_key ] ); 169 130 170 } elseif ( isset( $filter['meta_exists'] ) ) { 131 $meta_query = [132 'key' => wp_unslash( $query[ $filter_key ] ),171 // default to NOT IN 172 $meta_query = [ 133 173 'compare' => 'NOT IN', 134 'value' => [ '', '0', 'false', 'null' ],135 174 ]; 175 $meta_query = array_merge( $meta_query, $filter ); 176 $meta_query['key'] = wp_unslash( $query[ $filter_key ] ); 177 $meta_query['value'] = [ '', '0', 'false', 'null' ]; 178 136 179 } elseif ( isset( $filter['post_date'] ) ) { 137 180 $date_query = [ … … 164 207 165 208 /** 166 * Add ourfilter names to the public query vars.167 * 168 * @param string[] $vars Public query variables.169 * @return string[] Updated public query variables.170 */ 171 public function add_query_vars( array $vars ) : array {209 * Add filter names to the public query vars. 210 * 211 * @param array<int,string> $vars Public query variables 212 * @return array<int,string> Updated public query variables 213 */ 214 public function add_query_vars( array $vars ): array { 172 215 $filters = array_keys( $this->site_filters ); 173 216 … … 180 223 * @return string The post type name. 181 224 */ 182 protected static function get_current_post_type() : string { 183 if ( function_exists( 'get_current_screen' ) && is_object( get_current_screen() ) && 'edit' === get_current_screen()->base ) { 225 protected static function get_current_post_type(): string { 226 if ( function_exists( 'get_current_screen' ) && 227 is_object( get_current_screen() ) && 228 get_current_screen()->base === 'edit' ) { 184 229 return get_current_screen()->post_type; 185 } else { 186 return ''; 187 } 230 } 231 return ''; 188 232 } 189 233 … … 193 237 * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-filters 194 238 */ 195 public function filters() {239 public function filters(): void { 196 240 global $wpdb; 197 241 … … 202 246 $pto = get_post_type_object( $this->name ); 203 247 204 foreach ( $this->args as $filter_ key=> $filter ) {248 foreach ( $this->args as $filter_id => $filter ) { 205 249 if ( isset( $filter['cap'] ) && ! current_user_can( $filter['cap'] ) ) { 206 250 continue; 207 251 } 208 252 209 $id = 'filter_' . $filter_key; 210 211 $hook = "ext-cpts/{$this->name}/filter-output/{$filter_key}"; 253 $filter_key = $filter['key'] ?? $filter_id; 254 $id = 'filter_' . $filter_id; 255 256 /** @deprecated 1.2.0 */ 257 $hook = "ext-cpts/{$this->name}/filter-output/{$filter_id}"; 258 $hook = "saltus/framework/admin_filters/filter_output/{$filter_id}"; 212 259 213 260 if ( has_action( $hook ) ) { … … 215 262 * Allows a filter's output to be overridden. 216 263 * 217 * @since 4.3.0 218 * 219 * @param Extended_CPT_Admin $this The post type admin controller instance. 220 * @param array $filter The filter arguments. 221 * @param string $id The filter's `id` attribute value. 264 * @param SaltusAdminFilters $instance The post type admin controller instance. 265 * @param array $filter The filter arguments. 266 * @param string $id The filter's `id` attribute value. 222 267 */ 268 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 223 269 do_action( $hook, $this, $filter, $id ); 224 270 continue; … … 232 278 } 233 279 234 $walker = new WalkerTaxonomyDropdown( [ 235 'field' => 'slug', 236 ] ); 280 $walker = new WalkerTaxonomyDropdown( 281 [ 282 'field' => 'slug', 283 ] 284 ); 237 285 238 286 # If we haven't specified a title, use the all_items label from the taxonomy: … … 264 312 # If we haven't specified a title, generate one from the meta key: 265 313 if ( ! isset( $filter['title'] ) ) { 266 $filter['title'] = str_replace( [ 267 '-', 268 '_', 269 ], ' ', $filter['meta_key'] ); 314 $filter['title'] = str_replace( 315 [ 316 '-', 317 '_', 318 ], 319 ' ', 320 $filter['meta_key'] 321 ); 270 322 $filter['title'] = ucwords( $filter['title'] ) . 's'; 271 323 $filter['title'] = sprintf( 'All %s', $filter['title'] ); … … 274 326 # If we haven't specified a label, generate one from the meta key: 275 327 if ( ! isset( $filter['label'] ) ) { 276 $filter['label'] = str_replace( [ 277 '-', 278 '_', 279 ], ' ', $filter['meta_key'] ); 328 $filter['label'] = str_replace( 329 [ 330 '-', 331 '_', 332 ], 333 ' ', 334 $filter['meta_key'] 335 ); 280 336 $filter['label'] = ucwords( $filter['label'] ); 281 337 $filter['label'] = sprintf( 'Filter by %s', $filter['label'] ); … … 284 340 if ( ! isset( $filter['options'] ) ) { 285 341 # Fetch all the values for our meta key: 286 $filter['options'] = $wpdb->get_col( $wpdb->prepare( " 287 SELECT DISTINCT meta_value 288 FROM {$wpdb->postmeta} as m 289 JOIN {$wpdb->posts} as p ON ( p.ID = m.post_id ) 290 WHERE m.meta_key = %s 291 AND m.meta_value != '' 292 AND p.post_type = %s 293 ORDER BY m.meta_value ASC 294 ", $filter['meta_key'], $this->name ) ); 342 $filter['options'] = $wpdb->get_col( 343 $wpdb->prepare( 344 "SELECT DISTINCT meta_value 345 FROM {$wpdb->postmeta} as m 346 JOIN {$wpdb->posts} as p ON ( p.ID = m.post_id ) 347 WHERE m.meta_key = %s 348 AND m.meta_value != '' 349 AND p.post_type = %s 350 ORDER BY m.meta_value ASC", 351 $filter['meta_key'], 352 $this->name 353 ) 354 ); 295 355 } elseif ( is_callable( $filter['options'] ) ) { 296 356 $filter['options'] = call_user_func( $filter['options'] ); … … 302 362 303 363 $selected = wp_unslash( get_query_var( $filter_key ) ); 304 305 $use_key = false;306 307 foreach ( $filter['options'] as $k => $v) {308 if ( ! is_numeric( $k ) ) {309 $use_key = true;310 break;364 $use_key = $filter['use_key'] ?? false; 365 if ( ! $use_key ) { 366 foreach ( $filter['options'] as $k => $v ) { 367 if ( ! is_numeric( $k ) ) { 368 $use_key = true; 369 break; 370 } 311 371 } 312 372 } … … 335 395 # If we haven't specified a title, generate one from the meta key: 336 396 if ( ! isset( $filter['title'] ) ) { 337 $filter['title'] = str_replace( [ 338 '-', 339 '_', 340 ], ' ', $filter['meta_search_key'] ); 397 $filter['title'] = str_replace( 398 [ 399 '-', 400 '_', 401 ], 402 ' ', 403 $filter['meta_search_key'] 404 ); 341 405 $filter['title'] = ucwords( $filter['title'] ); 342 406 } … … 357 421 $fields = $filter['meta_exists'] ?? $filter['meta_key_exists']; 358 422 359 if ( 1 === count( $fields )) {423 if ( count( $fields ) === 1 ) { 360 424 # Output a checkbox: 361 425 foreach ( $fields as $v => $t ) { … … 402 466 403 467 if ( ! isset( $filter['title'] ) ) { 404 $filter['title'] = __( 'All Authors', ' extended-cpts' );468 $filter['title'] = __( 'All Authors', 'saltus-framework' ); 405 469 } 406 470 407 471 if ( ! isset( $filter['label'] ) ) { 408 $filter['label'] = __( 'Author', ' extended-cpts' );472 $filter['label'] = __( 'Author', 'saltus-framework' ); 409 473 } 410 474 … … 417 481 if ( ! isset( $filter['options'] ) ) { 418 482 # Fetch all the values for our field: 419 $filter['options'] = $wpdb->get_col( $wpdb->prepare( " 420 SELECT DISTINCT post_author 421 FROM {$wpdb->posts} 422 WHERE post_type = %s 423 ", $this->name ) ); 483 $filter['options'] = $wpdb->get_col( 484 $wpdb->prepare( 485 " 486 SELECT DISTINCT post_author 487 FROM {$wpdb->posts} 488 WHERE post_type = %s 489 ", 490 $this->name 491 ) 492 ); 424 493 } elseif ( is_callable( $filter['options'] ) ) { 425 494 $filter['options'] = call_user_func( $filter['options'] ); … … 431 500 432 501 # Output a dropdown: 433 wp_dropdown_users( [ 434 'id' => $id, 435 'include' => $filter['options'], 436 'name' => 'author', 437 'option_none_value' => '0', 438 'selected' => $value, 439 'show_option_none' => $filter['title'], 440 ] ); 441 } 442 } 443 } 444 502 wp_dropdown_users( 503 [ 504 'id' => $id, 505 'include' => $filter['options'], 506 'name' => 'author', 507 'option_none_value' => '0', 508 'selected' => $value, 509 'show_option_none' => $filter['title'], 510 ] 511 ); 512 } 513 } 514 } 445 515 } 446 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php
r2986425 r3274550 11 11 12 12 /** 13 * @var string 13 * @var string $tree_type The type of tree structure being used (e.g., 'category'). 14 14 */ 15 15 public $tree_type = 'category'; 16 16 17 17 /** 18 * @var array 18 * @var array<string> $db_fields Database fields used for parent/child relationships and term IDs. 19 19 */ 20 20 public $db_fields = [ … … 31 31 * Class constructor. 32 32 * 33 * @param array $args Optional arguments. 33 * @param array|null $args Optional arguments. 34 * - 'field': The field to use for the dropdown value. 34 35 */ 35 36 public function __construct( $args = null ) { … … 43 44 * 44 45 * @param string $output Passed by reference. Used to append additional content. 45 * @param object $ objectTerm data object.46 * @param object $term_object Term data object. 46 47 * @param int $depth Depth of term in reference to parents. 47 48 * @param array $args Optional arguments. 49 * - 'taxonomy': The taxonomy name. 50 * - 'selected_cats': Array of selected term values. 51 * - 'selected': Array of selected term IDs. 52 * - 'show_count': Whether to show the term count. 53 * @param int $current_object_id Current object ID 48 54 * @param int $current_object_id Current object ID. 49 55 */ 50 public function start_el( &$output, $ object, $depth = 0, $args = [], $current_object_id = 0 ) {56 public function start_el( &$output, $term_object, $depth = 0, $args = [], $current_object_id = 0 ) { 51 57 $pad = str_repeat( ' ', $depth * 3 ); 52 58 $tax = get_taxonomy( $args['taxonomy'] ); 53 59 54 60 if ( $this->field ) { 55 $value = $ object->{$this->field};61 $value = $term_object->{$this->field}; 56 62 } else { 57 $value = $tax->hierarchical ? $ object->term_id : $object->name;63 $value = $tax->hierarchical ? $term_object->term_id : $term_object->name; 58 64 } 59 65 60 if ( empty( $ object->term_id ) && ! $tax->hierarchical ) {66 if ( empty( $term_object->term_id ) && ! $tax->hierarchical ) { 61 67 $value = ''; 62 68 } 63 69 64 $cat_name = apply_filters( 'list_cats', $object->name, $object ); 65 $output .= "\t<option class=\"level-{$depth}\" value=\"" . esc_attr( $value ) . '"'; 70 /** @deprecated 1.2.0 */ 71 $cat_name = apply_filters( 'list_cats', $term_object->name, $term_object ); 72 $cat_name = apply_filters( 'saltus/framework/admin_filters/category_list', $term_object->name, $term_object ); 73 $output .= "\t<option class=\"level-{$depth}\" value=\"" . esc_attr( $value ) . '"'; 66 74 67 if ( isset( $args['selected_cats'] ) && in_array( $value, (array) $args['selected_cats'] ) ) {75 if ( isset( $args['selected_cats'] ) && in_array( $value, (array) $args['selected_cats'], true ) ) { 68 76 $output .= ' selected="selected"'; 69 } elseif ( isset( $args['selected'] ) && in_array( $ object->term_id, (array) $args['selected']) ) {77 } elseif ( isset( $args['selected'] ) && in_array( $term_object->term_id, (array) $args['selected'], true ) ) { 70 78 $output .= ' selected="selected"'; 71 79 } … … 75 83 76 84 if ( $args['show_count'] ) { 77 $output .= ' (' . esc_html( number_format_i18n( $ object->count ) ) . ')';85 $output .= ' (' . esc_html( number_format_i18n( $term_object->count ) ) . ')'; 78 86 } 79 87 80 88 $output .= "</option>\n"; 81 89 } 82 83 90 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php
r2986425 r3274550 11 11 12 12 /** 13 * Class DragAndDrop 14 * 15 * Enable an option to manage drag and drop functionality in the admin area. 13 16 */ 14 17 class DragAndDrop implements Service, Conditional, Actionable, Assembly { … … 21 24 22 25 /** 26 * Check whether the conditional service is currently needed. 27 * 28 * @return bool Whether the conditional service is needed. 29 */ 30 public static function is_needed(): bool { 31 return is_admin(); 32 } 33 34 /** 23 35 * Create a new instance of the service provider 24 36 * … … 26 38 */ 27 39 public static function make( $name, $project, $args ) { 28 return new SaltusDragAndDrop( $name, $project , $args);40 return new SaltusDragAndDrop( $name, $project ); 29 41 } 30 42 31 43 /** 32 * Check whether the conditional service is currently needed.44 * Update menu drag and drop in the database 33 45 * 34 * @return bool Whether the conditional service is needed.35 46 */ 36 public static function is_needed(): bool {37 38 /*39 * This service loads in most screens:40 * - admin: in the edit screen41 * - ajax: while updating menu order42 * - front: during pre_get_posts, etc43 */44 return is_admin();45 }46 47 47 public function add_action() { 48 48 $actions = new UpdateMenuDragAndDrop(); 49 49 $actions->add_action(); 50 50 } 51 52 51 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php
r2986425 r3274550 15 15 * 16 16 */ 17 public function __construct( string $name, array $project , ...$args) {17 public function __construct( string $name, array $project ) { 18 18 $this->project = $project; 19 19 $this->name = $name; … … 71 71 72 72 wp_enqueue_style( 'drag_drop_order', $this->project['root_url'] . '/Feature/DragAndDrop/order.css', array(), '1' ); 73 74 73 } 75 74 … … 141 140 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared 142 141 $query_result = $wpdb->query( $query_prepared ); 143 144 142 } 145 143 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php
r3207680 r3274550 7 7 8 8 /** 9 * Class UpdateMenuDragAndDrop 10 * 11 * Handles the drag-and-drop functionality for updating menu order. 9 12 */ 10 13 class UpdateMenuDragAndDrop implements Actionable { … … 16 19 public function __construct() {} 17 20 21 22 /** 23 * Register the WordPress action for handling the AJAX request. 24 */ 18 25 public function add_action() { 19 add_action( 'wp_ajax_saltus- dad-update-menu-order', array( $this, 'update_menu_order' ) );26 add_action( 'wp_ajax_saltus-framwork-drop-and-drag-update-menu-order', array( $this, 'update_menu_order' ) ); 20 27 } 21 28 29 /** 30 * Handle the AJAX request to update the menu order. 31 * 32 * Validates the nonce, checks user permissions, and updates the menu order 33 * in the database based on the provided data. 34 */ 22 35 public function update_menu_order() { 23 36 global $wpdb; … … 37 50 // can't trust much parse_str 38 51 parse_str( $_POST['order'], $data ); 39 40 if ( ! is_array( $data ) ) {41 return false;42 }43 52 44 53 $id_arr = array(); … … 77 86 } 78 87 79 do_action( 'saltus/ dad/update_menu_order' );88 do_action( 'saltus/framework/drop_and_drop/update_menu_order' ); 80 89 } 81 90 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Duplicate/Duplicate.php
r2986425 r3274550 25 25 */ 26 26 public static function make( $name, $project, $args ) { 27 return new SaltusDuplicate( $name, $ project, $args );27 return new SaltusDuplicate( $name, $args ); 28 28 } 29 29 … … 43 43 return is_admin(); 44 44 } 45 46 45 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php
r3207680 r3274550 13 13 final class SaltusDuplicate implements Processable { 14 14 15 /** 16 * @var string $name The name of the custom post type (CPT) 17 */ 15 18 private $name; 19 20 /** 21 * @var string $label The label for duplicate link. 22 */ 16 23 private $label; 24 25 /** 26 * @var string $attr_title The title for the duplicate link. 27 */ 17 28 private $attr_title; 18 29 19 30 /** 20 * Instantiate this Service object.31 * Constructor. 21 32 * 33 * @param string $name The name of the custom post type (CPT). 34 * @param array $args Additional arguments. 35 * - 'label': The label for the duplicate link. 36 * - 'attr_title': The title for the duplicate link. 22 37 */ 23 public function __construct( string $name, array $ project = null, array $args ) {38 public function __construct( string $name, array $args ) { 24 39 $this->name = $name; 25 40 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Duplicate'; … … 34 49 add_filter( 'page_row_actions', array( $this, 'row_link' ), 10, 2 ); 35 50 36 add_action( 'admin_action_ ' . $this->name . '_duplicate_post', array( $this, 'duplicate' ) );51 add_action( 'admin_action_saltus_framework_' . $this->name . '_duplicate_post', array( $this, 'duplicate' ) ); 37 52 } 38 53 39 54 /* 40 55 * Add a duplicate link to action list for this cpt row_actions 56 * 57 * @param array $actions The actions for the row. 58 * @param object $post The post object. 59 * 60 * @return array The modified actions. 61 * 41 62 */ 42 63 public function row_link( $actions, $post ) { … … 53 74 '<a href="%1$s" title="%2$s" rel="permalink">%3$s</a>', 54 75 wp_nonce_url( 55 'admin.php?action= ' . $this->name . '_duplicate_post&post=' . $post->ID,76 'admin.php?action=saltus_framework_' . $this->name . '_duplicate_post&post=' . $post->ID, 56 77 basename( __FILE__ ), 57 'saltus_ duplicate_nonce'78 'saltus_framework_duplicate_nonce' 58 79 ), 59 80 esc_attr( $this->attr_title ), … … 66 87 67 88 global $wpdb; 68 $error_msg = esc_html__( 'Item cannot be found. Please select one to duplicate.', 'saltus ' );89 $error_msg = esc_html__( 'Item cannot be found. Please select one to duplicate.', 'saltus-framework' ); 69 90 70 91 // Die if post not selected 71 if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'saltus_duplicate_post' ) ) ) { 72 wp_die( esc_html__( 'Please select an item to duplicate.', 'saltus' ) ); 92 if ( ! ( isset( $_GET['post'] ) || 93 isset( $_POST['post'] ) || 94 ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'saltus_framework_duplicate_post' ) 95 ) ) { 96 wp_die( esc_html__( 'Please select an item to duplicate.', 'saltus-framework' ) ); 73 97 } 74 98 75 99 // Verify nonce 76 if ( ! isset( $_GET['saltus_duplicate_nonce'] ) || ! wp_verify_nonce( $_GET['saltus_duplicate_nonce'], basename( __FILE__ ) ) ) { 100 if ( ! isset( $_GET['saltus_framework_duplicate_nonce'] ) || 101 ! wp_verify_nonce( $_GET['saltus_framework_duplicate_nonce'], basename( __FILE__ ) ) ) { 77 102 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 78 103 wp_die( $error_msg ); … … 84 109 85 110 // duplicate the post 111 // @phpstan-ignore identical.alwaysFalse 86 112 if ( ! isset( $post ) || $post === null ) { 87 113 return; … … 106 132 107 133 // insert the new post 134 // @phpstan-ignore argument.type 108 135 $new_post_id = wp_insert_post( $args ); 109 136 … … 128 155 return; 129 156 } 130 131 $insert_query = "INSERT INTO $wpdb->postmeta ( post_id, meta_key, meta_value )";157 $sql_query_sel = []; 158 $insert_query = "INSERT INTO $wpdb->postmeta ( post_id, meta_key, meta_value )"; 132 159 foreach ( $query_result as $post_meta ) { 133 160 … … 147 174 $post_type = get_post_type( $post_id ); 148 175 176 /** @deprecated 1.2.0 */ 149 177 do_action( 'saltus/duplicate_post/after', $post_type, $post_id, $new_post_id ); 178 do_action( 'saltus/framework/duplicate_post/after', $post_type, $post_id, $new_post_id ); 150 179 151 180 wp_safe_redirect( admin_url( 'edit.php?post_type=' . $post_type ) ); -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Meta/CodestarMeta.php
r3207680 r3274550 10 10 final class CodestarMeta implements Processable { 11 11 12 /** 13 * @var string $name The name of the custom post type (CPT) 14 */ 12 15 private $name; 16 17 /** 18 * @var array $meta The meta fields 19 */ 13 20 private $meta; 14 21 15 22 /** 16 23 * Instantiate the Codestar Framework Fields object. 17 */ 18 public function __construct( string $name, array $project = null, array $meta = array() ) { 24 * 25 * @param string $name The name of the custom post type (CPT) 26 * @param array $meta Meta fields. 27 */ 28 public function __construct( string $name, array $meta ) { 19 29 $this->name = $name; 20 30 $this->meta = $meta; 21 31 } 22 32 33 /** 34 * Process the functionality 35 */ 23 36 public function process() { 24 37 … … 31 44 } 32 45 33 // else add just the fields46 // add just the fields and register rest api 34 47 $this->create_metabox( $box_id, $box ); 48 $this->register_rest_api( $box_id, $box ); 35 49 } 36 50 } … … 39 53 * Create metabox 40 54 * 41 * @param int $box_id identifier of the metabox42 * @param array $box_settings paramaters for the page43 * @return void55 * @param mixed $box_id Identifier of the metabox 56 * @param array $box_settings Paramaters for the box 57 * 44 58 */ 45 59 private function create_metabox( $box_id, $box_settings ) { … … 77 91 } 78 92 79 if ( ! empty( $box_settings['register_rest_api'] ) && $box_settings['register_rest_api'] === true ) { 80 if ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'serialize' ) { 81 $post_type = $this->name; 82 foreach ( $box_settings['sections'] as $section ) { 83 if ( ! empty( $section['fields'] ) ) { 84 $this->create_meta_fields_serialized( $section['fields'], $box_id, $post_type ); 93 // add filter to properly save line breaks in this meta box 94 add_filter( sprintf( 'csf_%s_save', $box_id ), array( $this, 'sanitize_meta_save' ), 1, 3 ); 95 } 96 97 98 /** 99 * Register REST API 100 * 101 * @param mixed $box_id Identifier of the metabox 102 * @param array $box_settings Paramaters for the box 103 * 104 */ 105 private function register_rest_api( $box_id, $box_settings ) { 106 107 if ( empty( $box_settings['register_rest_api'] ) || $box_settings['register_rest_api'] !== true ) { 108 return; 109 } 110 111 if ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'serialize' ) { 112 $post_type = $this->name; 113 foreach ( $box_settings['sections'] as $section ) { 114 if ( ! empty( $section['fields'] ) ) { 115 $this->create_meta_fields_serialized( $section['fields'], $box_id, $post_type ); 116 } 117 } 118 } 119 if ( empty( $box_settings['data_type'] ) || 120 $box_settings['data_type'] === 'unserialize' ) { 121 $post_type = $this->name; 122 123 foreach ( $box_settings['sections'] as $section ) { 124 if ( ! empty( $section['fields'] ) ) { 125 foreach ( $section['fields'] as $meta_name => $want_to_register_fields ) { 126 $meta_type = 'object'; 127 if ( ! empty( $want_to_register_fields['type'] ) ) { 128 $meta_type = $want_to_register_fields['type']; 129 } 130 $this->create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ); 85 131 } 86 132 } 87 133 } 88 if ( empty( $box_settings['data_type'] ) || 89 ( ! empty( $box_settings['data_type'] ) && $box_settings['data_type'] === 'unserialize' ) ) { 90 $post_type = $this->name; 91 92 foreach ( $box_settings['sections'] as $section ) { 93 if ( ! empty( $section['fields'] ) ) { 94 foreach ( $section['fields'] as $meta_name => $want_to_register_fields ) { 95 $meta_type = 'object'; 96 if ( ! empty( $want_to_register_fields['type'] ) ) { 97 $meta_type = $want_to_register_fields['type']; 98 } 99 $this->create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ); 100 } 101 } 102 } 103 } 104 } 105 106 // add filter to properly save line breaks in this meta box 107 add_filter( sprintf( 'csf_%s_save', $box_id ), array( $this, 'sanitize_meta_save' ), 1, 3 ); 108 } 134 } 135 } 136 137 /** 138 * Setup REST API fields 139 * 140 * @param array $fields Fields to be registered 141 * 142 * @return array $rest_fields Fields to be registered in REST API 143 */ 109 144 private function setup_restapi_fields( $fields ) { 110 145 $rest_fields = []; 111 $rest_types = $this->match_fields( $this->list_fields());146 $rest_types = $this->match_fields(); 112 147 foreach ( $fields as $name => $attributes ) { 113 148 if ( empty( $attributes['type'] ) ) { … … 125 160 return $rest_fields; 126 161 } 162 163 /** 164 * Create meta fields that are not serialized 165 * Hooks into REST API 166 * 167 * @param string $meta_name Name of the meta field 168 * @param string $meta_type Type of the meta field 169 * @param string $post_type Post type to register the meta field for 170 */ 127 171 private function create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ) { 128 172 129 $rest_types = $this->match_fields( $this->list_fields());173 $rest_types = $this->match_fields(); 130 174 $rest_type = $this->get_field_type( $meta_type, $rest_types ); 131 175 … … 151 195 } 152 196 197 /** 198 * Create meta fields that are serialized 199 * Hooks into REST API 200 * 201 * @param array $meta_fields Meta fields to be registered 202 * @param string $meta_name Name of the meta field 203 * @param string $post_type Post type to register the meta field for 204 */ 153 205 private function create_meta_fields_serialized( $meta_fields, $meta_name, $post_type ) { 154 206 … … 180 232 } 181 233 182 private function list_fields() { 234 /** 235 * Match fields to their types 236 * 237 * @return array Array of field types 238 */ 239 private function match_fields() { 240 241 $field_type_map = [ 242 'accordion' => 'string', 243 'backup' => 'string', 244 'border' => 'string', 245 'button_set' => 'string', 246 'callback' => 'string', 247 'checkbox' => 'string', 248 'code_editor' => 'string', 249 'color' => 'string', 250 'content' => 'string', 251 'date' => 'string', 252 'datetime' => 'string', 253 'dimensions' => 'string', 254 'gallery' => 'string', 255 'heading' => 'string', 256 'icon' => 'string', 257 'image_select' => 'string', 258 'link' => 'string', 259 'link_color' => 'string', 260 'notice' => 'string', 261 'palette' => 'string', 262 'radio' => 'string', 263 'slider' => 'string', 264 'sortable' => 'string', 265 'sorter' => 'string', 266 'spacing' => 'string', 267 'spinner' => 'string', 268 'subheading' => 'string', 269 'submessage' => 'string', 270 'switcher' => 'string', 271 'tabbed' => 'string', 272 'text' => 'string', 273 'textarea' => 'string', 274 'typography' => 'string', 275 'upload' => 'string', 276 'wp_editor' => 'string', 277 'number' => 'number', 278 'background' => 'object', 279 'color_group' => 'object', 280 'fieldset' => 'object', 281 'group' => 'object', 282 'map' => 'object', 283 'media' => 'array', 284 'select' => 'array', 285 'repeater' => 'array', 286 ]; 183 287 184 288 // Include all framework fields 185 return apply_filters( 186 'saltus/cfs/fields', 187 array( 188 'accordion', 189 'background', 190 'backup', 191 'border', 192 'button_set', 193 'callback', 194 'checkbox', 195 'code_editor', 196 'color', 197 'color_group', 198 'content', 199 'date', 200 'datetime', 201 'dimensions', 202 'fieldset', 203 'gallery', 204 'group', 205 'heading', 206 'icon', 207 'image_select', 208 'link', 209 'link_color', 210 'map', 211 'media', 212 'notice', 213 'number', 214 'palette', 215 'radio', 216 'repeater', 217 'select', 218 'slider', 219 'sortable', 220 'sorter', 221 'spacing', 222 'spinner', 223 'subheading', 224 'submessage', 225 'switcher', 226 'tabbed', 227 'text', 228 'textarea', 229 'typography', 230 'upload', 231 'wp_editor', 232 ) 233 ); 234 } 235 private function match_fields( $allowed_fields ) { 236 237 $assigned_field_type = []; 238 foreach ( $allowed_fields as $field ) { 239 switch ( $field ) { 240 case 'accordion': 241 case 'backup': 242 case 'border': 243 case 'button_set': 244 case 'callback': 245 case 'checkbox': 246 case 'code_editor': 247 case 'color': 248 case 'content': 249 case 'date': 250 case 'datetime': 251 case 'dimensions': 252 case 'gallery': 253 case 'heading': 254 case 'icon': 255 case 'image_select': 256 case 'link': 257 case 'link_color': 258 case 'notice': 259 case 'palette': 260 case 'radio': 261 case 'slider': 262 case 'sortable': 263 case 'sorter': 264 case 'spacing': 265 case 'spinner': 266 case 'subheading': 267 case 'submessage': 268 case 'switcher': 269 case 'tabbed': 270 case 'text': 271 case 'textarea': 272 case 'typography': 273 case 'upload': 274 case 'wp_editor': 275 $assigned_field_type[ $field ] = 'string'; 276 break; 277 case 'number': 278 $assigned_field_type[ $field ] = 'number'; 279 break; 280 case 'background': 281 case 'color_group': 282 case 'fieldset': 283 case 'group': 284 case 'map': 285 $assigned_field_type[ $field ] = 'object'; 286 break; 287 case 'media': 288 case 'select': 289 case 'repeater': 290 $assigned_field_type[ $field ] = 'array'; 291 break; 292 default: 293 $assigned_field_type[ $field ] = 'string'; 294 break; 295 } 296 } 297 return $assigned_field_type; 298 } 299 300 private function get_field_type( $field, $fields = null ) { 289 290 /** @deprecated 1.2.0 */ 291 $filtered = apply_filters( 'saltus/cfs/fields', $field_type_map ); 292 $filtered = apply_filters( 'saltus/framework/meta/matched_fields', $field_type_map ); 293 if ( ! is_array( $filtered ) ) { 294 return []; 295 } 296 return $filtered; 297 } 298 299 /** 300 * Get field type 301 * 302 * @param string $field Field name 303 * @param array|null $fields Optional. Fields to match against 304 * 305 * @return string|null Field type or null if not found 306 */ 307 private function get_field_type( $field, ?array $fields = null ) { 301 308 if ( $fields === null ) { 302 $fields = $this->match_fields( $this->list_fields() ); 303 } 304 if ( ! is_array( $fields ) ) { 305 return ''; 306 } 307 if ( ! empty( $fields[ $field ] ) ) { 308 return $fields[ $field ]; 309 } 310 return null; 309 $fields = $this->match_fields(); 310 } 311 312 if ( empty( $fields[ $field ] ) ) { 313 return null; 314 } 315 return $fields[ $field ]; 311 316 } 312 317 … … 314 319 * Create section using builtin Codestart method 315 320 * 316 * @param string $id - identifier of the section317 * @param array $section - parameters for the section321 * @param string $id Identifier of the section 322 * @param array $section Parameters for the section 318 323 * @return void 319 324 */ … … 329 334 * Prepare fields to make sure they have all necessary parameters 330 335 * 331 * @param array $fields 332 * @return array $fields array of fields prepared to be rendered by CodestarFields 336 * @param array $fields Fields to be prepared 337 * 338 * @return array Array of fields prepared to be rendered by CodestarFields 333 339 */ 334 340 private function prepare_fields( $fields ) { … … 354 360 * Function to sanitize meta on save 355 361 * 356 * @param array$request with meta info357 * @param int$post_id358 * @param obj$csf class362 * @param $request with meta info 363 * @param $post_id 364 * @param $csf class 359 365 * @return array 360 366 */ -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Meta/Meta.php
r3115164 r3274550 9 9 10 10 /** 11 * Class Meta 12 * 13 * Enable an option to manage meta fields 11 14 */ 12 15 final class Meta implements Service, Conditional, Assembly { 16 17 /** 18 * Instantiate this Service object. 19 * 20 */ 21 public function __construct() {} 13 22 14 23 /** … … 25 34 26 35 /** 27 * Instantiate this Service object.36 * Create a new instance of the service provider 28 37 * 29 */ 30 public function __construct() { 31 32 } 33 34 /** 35 * Create a new instance of the service provider 38 * @param string $name The name of the custom post type (CPT) 39 * @param array|null $project Project information. 40 * @param array|null $args Additional arguments. 36 41 * 37 42 * @return object The new instance 38 43 */ 39 44 public static function make( $name, $project, $args ) { 40 return new CodestarMeta( $name, $ project, $args );45 return new CodestarMeta( $name, $args ); 41 46 } 42 43 47 } 44 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/RememberTabs/RememberTabs.php
r2986425 r3274550 9 9 10 10 /** 11 * Class RememberTabs 12 * 13 * Enable an option to remember the last active tab in the admin area. 11 14 */ 12 15 class RememberTabs implements Service, Conditional, Assembly { … … 17 20 */ 18 21 public function __construct() {} 19 20 /**21 * Create a new instance of the service provider22 *23 * @return object The new instance24 */25 public static function make( $name, $project, $args ) {26 return new SaltusRememberTabs( $name, $project, $args );27 }28 22 29 23 /** … … 40 34 } 41 35 36 /** 37 * Create a new instance of the service provider 38 * 39 * @param string $name The name of the custom post type (CPT) 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments. 42 * 43 * @return object The new instance 44 */ 45 public static function make( $name, $project, $args ) { 46 return new SaltusRememberTabs( $name, $project ); 47 } 42 48 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php
r2986425 r3274550 8 8 final class SaltusRememberTabs implements Processable { 9 9 10 /** 11 * @var string $name The name of the custom post type (CPT) 12 */ 10 13 private $name; 14 15 /** 16 * @var string $name Project information. 17 */ 11 18 private $project; 12 19 13 /**20 /** 14 21 * Instantiate this Service object. 15 22 * 23 * @param string $name The name of the custom post type (CPT) 24 * @param array $project Project information. 16 25 */ 17 public function __construct( string $name, array $project, array $args = null ) { 26 public function __construct( string $name, array $project ) { 27 $this->name = $name; 18 28 $this->project = $project; 19 $this->name = $name;20 29 } 21 30 31 /** 32 * Process the functionality 33 */ 22 34 public function process() { 23 add_action( 'admin_enqueue_scripts', array( $this, 'load_script_css' ));24 add_filter( 'admin_url', array( $this, 'check_remember_tab_url' ), 1, 10);35 add_action( 'admin_enqueue_scripts', [ $this, 'load_script_css' ] ); 36 add_filter( 'admin_url', [ $this, 'check_remember_tab_url' ], 10, 1 ); 25 37 } 26 38 /** 39 * Check if the script and CSS should be loaded 40 * 41 * @return bool 42 */ 27 43 private function check_load_script_css() { 28 44 … … 39 55 } 40 56 57 /** 58 * Load the script and CSS 59 */ 41 60 public function load_script_css() { 42 61 … … 45 64 } 46 65 47 wp_enqueue_script( 'remember_tabs', $this->project['root_url'] . 'Feature/RememberTabs/rememberTabs.js', array(), '1', true ); 48 66 wp_enqueue_script( 67 'remember_tabs', 68 $this->project['root_url'] . 'Feature/RememberTabs/rememberTabs.js', 69 [], 70 '1', 71 true 72 ); 49 73 } 50 74 … … 53 77 * Used to remember tab 54 78 * 55 * @param string $link 56 * @return string 79 * @param string $link Admin url 80 * @return string The url 57 81 */ 58 82 public function check_remember_tab_url( $link ) { 59 83 60 84 global $current_screen; 61 if ( ! is_admin() || ! isset( $current_screen ) || $this->name !== $current_screen->post_type || wp_doing_ajax() ) {85 if ( ! is_admin() || ! isset( $current_screen ) || $this->name !== $current_screen->post_type || wp_doing_ajax() ) { 62 86 return $link; 63 87 } 64 88 65 if ( isset( $_REQUEST['tab'] ) ) {89 if ( isset( $_REQUEST['tab'] ) ) { 66 90 $params['tab'] = absint( $_REQUEST['tab'] ); 67 $link = add_query_arg( $params, $link );91 $link = add_query_arg( $params, $link ); 68 92 } 69 70 93 71 94 return $link; 72 95 } 73 74 96 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Settings/CodestarSettings.php
r2986425 r3274550 6 6 }; 7 7 8 final class CodestarSettings implements Processable {8 final class CodestarSettings implements Processable { 9 9 10 /** 11 * @var string $name The name of the custom post type (CPT) 12 */ 10 13 private $name; 14 15 /** 16 * @var array $settings The settings to be used for the settings page. 17 */ 11 18 private $settings; 12 19 13 public function __construct( string $name, array $project = null, array $settings = array() ) { 20 /** 21 * Constructor. 22 * 23 * @param string $name The name of the custom post type (CPT) 24 * @param array $settings Optional. Settings options 25 */ 26 public function __construct( string $name, array $settings = [] ) { 14 27 $this->name = $name; 15 28 $this->settings = $settings; 16 29 } 17 30 31 /** 32 * Process the settings 33 */ 18 34 public function process() { 19 35 /** … … 65 81 } 66 82 } 67 68 83 } 69 84 … … 71 86 * Create section using builtin Codestart method 72 87 * 73 * @param string$id - identifier of the section88 * @param mixed $id - identifier of the section 74 89 * @param array $section - parameters for the section 75 90 * @return void 76 91 */ 77 92 private function create_section( $id, $section ) { 78 79 93 \CSF::createSection( $id, $section ); 80 81 94 } 82 95 … … 98 111 99 112 if ( isset( $field['fields'] ) ) { 100 101 113 $field['fields'] = $this->prepare_fields( $field['fields'] ); 102 103 114 } 104 115 } … … 107 118 return array_values( $fields ); 108 119 } 109 110 111 120 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Settings/Settings.php
r2986425 r3274550 9 9 10 10 /** 11 * Class Settings 12 * 13 * Enable an option to create Settings page 11 14 */ 12 15 final class Settings implements Service, Conditional, Assembly { 16 17 /** 18 * Instantiate this Service object. 19 * 20 */ 21 public function __construct() {} 13 22 14 23 /** … … 18 27 */ 19 28 public static function is_needed(): bool { 29 20 30 /* 21 31 * Only load this sample service on the admin backend. 22 * If this conditional returns false, the service is never even23 * instantiated.24 32 */ 25 33 return \is_admin(); … … 27 35 28 36 /** 29 * Instantiate this Service object.37 * Create a new instance of the service provider 30 38 * 31 */ 32 public function __construct() { 33 34 } 35 36 /** 37 * Create a new instance of the service provider 39 * @param string $name The name of the custom post type (CPT) 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments. 38 42 * 39 43 * @return object The new instance 40 44 */ 41 45 public static function make( $name, $project, $args ) { 42 return new CodestarSettings( $name, $ project, $args );46 return new CodestarSettings( $name, $args ); 43 47 } 44 45 48 } 46 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php
r2986425 r3274550 7 7 8 8 /** 9 * Class SaltusSingleExport 10 * 9 11 * Enable an option to export single entry 10 12 * … … 13 15 final class SaltusSingleExport implements Processable { 14 16 17 /** 18 * @var string $name The name of the custom post type (CPT) to export. 19 */ 15 20 private $name; 21 22 /** 23 * @var string $label The label for the export link. 24 */ 16 25 private $label; 17 26 18 // unlikely date match for filters 27 /** 28 * A constant representing a fake date used for filtering queries. 29 * Unlikely date match for filters 30 */ 19 31 const FAKE_DATE = '1970-01-05'; // Y-m-d 20 32 21 33 /** 22 * Instantiate this Service object.34 * Constructor. 23 35 * 36 * @param string $name The name of the custom post type (CPT) to export. 37 * @param array|null $args Optional. Additional arguments for the export. 38 * - 'label': The label for the export link. 24 39 */ 25 public function __construct( string $name, array $project = null, array $args) {26 $this->name = $name;27 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Export This';40 public function __construct( string $name, ?array $args = [] ) { 41 $this->name = $name; 42 $this->label = ! empty( $args['label'] ) ? $args['label'] : 'Export This'; 28 43 } 29 44 45 /** 46 * Process the export functionality by hooking into WordPress actions. 47 */ 30 48 public function process() { 31 49 add_action( 'init', array( $this, 'init' ) ); … … 34 52 /** 35 53 * Get hooked in: Part II 54 * Initialize the export functionality. 55 * 56 * Hooks into WordPress filters and actions to enable single entry export. 36 57 * 37 58 */ … … 45 66 add_filter( 'query', array( $this, 'query' ) ); 46 67 add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ) ); 68 } 47 69 48 }49 70 /** 50 71 * Insert our action link into the submit box 72 * 73 * @param \WP_Post $post The current post object. 51 74 * 52 75 */ … … 54 77 55 78 // if it's not out cpt, do nothing 56 if ( ! isset( $post->post_type ) ||$post->post_type !== $this->name ) {79 if ( $post->post_type !== $this->name ) { 57 80 return; 58 81 } … … 64 87 color: #82878c; 65 88 font: normal 20px/1 dashicons; 66 speak: none;67 89 display: inline-block; 68 90 padding: 0 3px 0 0; … … 89 111 90 112 /** 91 * Modify export arguments 92 * except if normal export 113 * Modify export arguments. 93 114 * 94 * @param array $args Query args for determining what should be exported 95 * @return $args Modified query 115 * Adjusts the export query arguments to handle single entry export. 116 * 117 * @param array $args Query arguments for determining what should be exported. 118 * 119 * @return array Modified query arguments. 96 120 */ 97 121 public function export_args( $args ) { … … 116 140 117 141 /** 118 * Filter query 119 * Look for 'tagged' query, replace with one matching the needs 142 * Filter the SQL query for single entry export. 120 143 * 121 * @param string $query SQL query 122 * @return string Modified SQL query 144 * Replaces the query to match the single post ID for export. 145 * 146 * @param string $query The original SQL query. 147 * 148 * @return string Modified SQL query. 123 149 */ 124 150 public function query( $query ) { … … 158 184 return $query; 159 185 } 160 161 186 } 162 187 -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/SingleExport/SingleExport.php
r2986425 r3274550 8 8 }; 9 9 10 11 10 /** 11 * Class SingleExport 12 * 13 * Enable an option to export single entry 12 14 */ 13 15 class SingleExport implements Service, Conditional, Assembly { … … 18 20 */ 19 21 public function __construct() {} 20 21 /**22 * Create a new instance of the service provider23 *24 * @return object The new instance25 */26 public static function make( $name, $project, $args ) {27 return new SaltusSingleExport( $name, $project, $args );28 }29 22 30 23 /** … … 41 34 } 42 35 36 /** 37 * Create a new instance of the service provider 38 * 39 * @param string $name The name of the custom post type (CPT) to export. 40 * @param array|null $project Project information. 41 * @param array|null $args Additional arguments for the export. 42 * 43 * @return object The new instance 44 */ 45 public static function make( $name, $project, $args ) { 46 return new SaltusSingleExport( $name, $args ); 47 } 43 48 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/CanRegister.php
r2986425 r3274550 13 13 * @return void 14 14 */ 15 public function register( string $id, string $ class, array $dependencies );15 public function register( string $id, string $service_class, array $dependencies ); 16 16 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php
r2986425 r3274550 11 11 return new GenericContainer(); 12 12 } 13 14 13 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php
r2986425 r3274550 6 6 use RuntimeException; 7 7 8 class FailedToMakeInstance8 final class FailedToMakeInstance 9 9 extends RuntimeException 10 10 implements SaltusFrameworkThrowable { … … 34 34 ); 35 35 36 return new s tatic( $message, static::CIRCULAR_REFERENCE );36 return new self( $message, self::CIRCULAR_REFERENCE ); 37 37 } 38 38 … … 51 51 ); 52 52 53 return new s tatic( $message, static::UNRESOLVED_INTERFACE );53 return new self( $message, self::UNRESOLVED_INTERFACE ); 54 54 } 55 55 … … 69 69 ); 70 70 71 return new s tatic( $message, static::UNREFLECTABLE_CLASS );71 return new self( $message, self::UNREFLECTABLE_CLASS ); 72 72 } 73 73 … … 78 78 * @param string $argument_name Name of the argument that could not be 79 79 * resolved. 80 * @param string $ classClass that had the argument in its80 * @param string $service_class Class that had the argument in its 81 81 * constructor. 82 82 * @return static 83 83 */ 84 public static function for_unresolved_argument( string $argument_name, string $ class ) {84 public static function for_unresolved_argument( string $argument_name, string $service_class ) { 85 85 $message = \sprintf( 86 86 'Could not resolve the argument "%s" while trying to instantiate the class "%s".', 87 87 $argument_name, 88 $ class88 $service_class 89 89 ); 90 90 91 return new s tatic( $message, static::UNRESOLVED_ARGUMENT );91 return new self( $message, self::UNRESOLVED_ARGUMENT ); 92 92 } 93 93 … … 96 96 * reused but was not yet instantiated. 97 97 * 98 * @param string $ class Class that was not yet instantiated.98 * @param string $service_class Class that was not yet instantiated. 99 99 * 100 100 * @return static 101 101 */ 102 public static function for_uninstantiated_shared_instance( string $ class ) {102 public static function for_uninstantiated_shared_instance( string $service_class ) { 103 103 $message = \sprintf( 104 104 'Could not retrieve the shared instance for "%s" as it was not instantiated yet.', 105 $ class105 $service_class 106 106 ); 107 107 108 return new s tatic( $message, static::UNINSTANTIATED_SHARED_INSTANCE );108 return new self( $message, self::UNINSTANTIATED_SHARED_INSTANCE ); 109 109 } 110 110 … … 113 113 * for a class that doesn't have one. 114 114 * 115 * @param string $ class Class for which there is no delegate.115 * @param string $service_class Class for which there is no delegate. 116 116 * 117 117 * @return static 118 118 */ 119 public static function for_invalid_delegate( string $ class ) {119 public static function for_invalid_delegate( string $service_class ) { 120 120 $message = \sprintf( 121 121 'Could not retrieve a delegate for "%s", none was defined.', 122 $ class122 $service_class 123 123 ); 124 124 125 return new s tatic( $message, static::INVALID_DELEGATE );125 return new self( $message, self::INVALID_DELEGATE ); 126 126 } 127 127 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/GenericContainer.php
r2986425 r3274550 14 14 15 15 /** 16 * Class GenericContainer 17 * 16 18 * A simplified implementation of a service container. 17 19 * 18 * Extend ArrayObject to have default implementations for iterators and20 * Extends ArrayObject to have default implementations for iterators and 19 21 * array access. 20 22 */ … … 24 26 25 27 /** 26 * Instanciates Services28 * @var Instantiator $instantiator Instantiates services. 27 29 */ 28 30 protected $instantiator; 29 31 30 32 /** 31 * Service Container 33 * Constructor. 34 * 35 * Initializes the container with a fallback instantiator. 32 36 */ 33 37 public function __construct() { … … 55 59 56 60 /** 57 * Check whether the container can return a service for the given 58 * identifier. 61 * Check if the container has a service for the given identifier. 59 62 * 60 63 * @param string $id Identifier of the service to look for. 61 64 * 62 * @return bool 65 * @return bool True if the service exists, false otherwise. 63 66 */ 64 67 public function has( string $id ): bool { … … 69 72 * Put a service into the container for later retrieval. 70 73 * 71 * @param string $id Identifier of the service to put into the 72 * container. 74 * @param string $id Identifier of the service. 73 75 * @param Service $service Service to put into the container. 74 76 */ … … 78 80 79 81 /** 80 * Register a single service, and add sit to the container82 * Register a single service, and add it to the container 81 83 * 82 * @param string $id 83 * @param string $class 84 * @param string $id Identifier of the service. 85 * @param string $service_class Fully qualified class name of the service. 86 * @param array|null $dependencies Optional. Dependencies for the service. 84 87 */ 85 public function register( string $id, string $ class,array $dependencies = null ) {88 public function register( string $id, string $service_class, ?array $dependencies = null ) { 86 89 87 90 // Only instantiate services that are actually needed. 88 if ( is_a( $ class, Conditional::class, true ) &&89 ! $ class::is_needed() ) {91 if ( is_a( $service_class, Conditional::class, true ) && 92 ! $service_class::is_needed() ) { 90 93 return; 91 94 } 92 95 93 $service = $this->instantiate( $ class );96 $service = $this->instantiate( $service_class ); 94 97 95 98 $this->put( $id, $service ); 96 97 99 } 98 100 … … 101 103 * Instantiate a single service. 102 104 * 103 * @param string $ class Service class to instantiate.105 * @param string $service_class Service class to instantiate. 104 106 * 105 107 * @throws Invalid If the service could not be properly instantiated. … … 107 109 * @return Service Instantiated service. 108 110 */ 109 private function instantiate( $ class ): Service {111 private function instantiate( $service_class ): Service { 110 112 111 113 // The service needs to be registered, so instantiate right away. 112 $service = $this->make( $ class );114 $service = $this->make( $service_class ); 113 115 114 116 if ( ! $service instanceof Service ) { … … 122 124 * Make an object instance out of an interface or class. 123 125 * 124 * @param string $interface_or_class Interface or class to make an object 125 * instance out of. 126 * @param array $arguments Optional. Additional arguments to pass 127 * to the constructor. Defaults to an 128 * empty array. 126 * @param string $interface_or_class Interface or class name 127 * @param array $dependencies Optional. Dependencies of the class. 129 128 * @return object Instantiated object. 130 129 */ 131 private function make( string $interface_or_class, array $arguments = [] ) {130 private function make( string $interface_or_class, ?array $dependencies = [] ) { 132 131 133 132 $reflection = $this->get_class_reflection( $interface_or_class ); 134 133 $this->ensure_is_instantiable( $reflection ); 135 136 $dependencies = [];137 134 138 135 $object = $this->instantiator->instantiate( $interface_or_class, $dependencies ); … … 142 139 143 140 /** 144 * Get the reflection for a class or throw an exception.141 * Get the reflection for a class. 145 142 * 146 * @param string $class Class to get the reflection for. 147 * @return ReflectionClass Class reflection. 143 * @param string $service_class Class name 148 144 * @throws FailedToMakeInstance If the class could not be reflected. 145 * @return ReflectionClass Class reflection. 149 146 */ 150 private function get_class_reflection( string $ class ): ReflectionClass {147 private function get_class_reflection( string $service_class ): ReflectionClass { 151 148 try { 152 return new ReflectionClass( $ class );149 return new ReflectionClass( $service_class ); 153 150 } catch ( SaltusFrameworkThrowable $exception ) { 154 throw FailedToMakeInstance::for_unreflectable_class( $ class );151 throw FailedToMakeInstance::for_unreflectable_class( $service_class ); 155 152 } 156 153 } … … 161 158 * 162 159 * @param ReflectionClass $reflection Reflected class to check. 163 * @return void160 * 164 161 * @throws FailedToMakeInstance If the interface could not be resolved. 165 162 */ … … 171 168 172 169 /** 173 * Get a fallback instantiator in case none was provided.170 * Get a fallback instantiator 174 171 * 175 172 * @return Instantiator Simplistic fallback instantiator. … … 181 178 * Make an object instance out of an interface or class. 182 179 * 183 * @param string $class Class to make an object instance out of. 184 * @param array $dependencies Optional. Dependencies of the class. 180 * @param string $service_class Class name. 181 * @param array $dependencies Optional. Dependencies of the class. 182 * 185 183 * @return object Instantiated object. 186 184 */ 187 public function instantiate( string $ class, array $dependencies = [] ) {188 return new $ class( ...$dependencies );185 public function instantiate( string $service_class, array $dependencies = [] ) { 186 return new $service_class( ...$dependencies ); 189 187 } 190 188 }; 191 192 189 } 193 190 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/Invalid.php
r2986425 r3274550 5 5 use InvalidArgumentException; 6 6 7 class Invalid7 final class Invalid 8 8 extends InvalidArgumentException 9 9 implements SaltusFrameworkThrowable { … … 26 26 ); 27 27 28 return new s tatic( $message );28 return new self( $message ); 29 29 } 30 30 … … 44 44 ); 45 45 46 return new s tatic( $message );46 return new self( $message ); 47 47 } 48 48 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/ServiceContainer.php
r3115164 r3274550 91 91 * 92 92 * @param string $id 93 * @param string $ class94 */ 95 public function register( string $id, string $ class, array $dependencies ) {93 * @param string $service_class 94 */ 95 public function register( string $id, string $service_class, array $dependencies ) { 96 96 97 97 // Only instantiate services that are actually needed. 98 if ( is_a( $ class, Conditional::class, true ) &&99 ! $ class::is_needed() ) {98 if ( is_a( $service_class, Conditional::class, true ) && 99 ! $service_class::is_needed() ) { 100 100 return; 101 101 } 102 102 103 $service = $this->instantiate( $ class, $dependencies );103 $service = $this->instantiate( $service_class, $dependencies ); 104 104 105 105 $this->put( $id, $service ); … … 111 111 if ( $service instanceof Actionable ) { 112 112 $priority = 1; 113 $filter = 'init';113 $filter = 'init'; 114 114 if ( method_exists( $service, 'priority' ) ) { 115 115 $priority = $service->priority(); … … 131 131 * Instantiate a single service. 132 132 * 133 * @param string $ class Service class to instantiate.133 * @param string $service_class Service class to instantiate. 134 134 * 135 135 * @throws Invalid If the service could not be properly instantiated. … … 137 137 * @return Service Instantiated service. 138 138 */ 139 private function instantiate( $ class, array $dependencies ): Service {139 private function instantiate( $service_class, array $dependencies ): Service { 140 140 141 141 // The service needs to be registered, so instantiate right away. 142 $service = $this->make( $ class, $dependencies );142 $service = $this->make( $service_class, $dependencies ); 143 143 144 144 if ( ! $service instanceof Service ) { … … 154 154 * @param string $interface_or_class Interface or class to make an object 155 155 * instance out of. 156 * @param array $ argumentsOptional. Additional arguments to pass156 * @param array $dependencies Optional. Additional arguments to pass 157 157 * to the constructor. Defaults to an 158 158 * empty array. … … 172 172 * Get the reflection for a class or throw an exception. 173 173 * 174 * @param string $ class Class to get the reflection for.174 * @param string $service_class Class to get the reflection for. 175 175 * @return ReflectionClass Class reflection. 176 176 * @throws FailedToMakeInstance If the class could not be reflected. 177 177 */ 178 private function get_class_reflection( string $ class ): ReflectionClass {178 private function get_class_reflection( string $service_class ): ReflectionClass { 179 179 try { 180 return new ReflectionClass( $ class );180 return new ReflectionClass( $service_class ); 181 181 } catch ( SaltusFrameworkThrowable $exception ) { 182 throw FailedToMakeInstance::for_unreflectable_class( $ class );182 throw FailedToMakeInstance::for_unreflectable_class( $service_class ); 183 183 } 184 184 } … … 209 209 * Make an object instance out of an interface or class. 210 210 * 211 * @param string $ class Class to make an object instance out of.211 * @param string $service_class Class to make an object instance out of. 212 212 * @param array $dependencies Optional. Dependencies of the class. 213 213 * @return object Instantiated object. 214 214 */ 215 public function instantiate( string $ class, array $dependencies = [] ) {216 return new $ class( ...$dependencies );215 public function instantiate( string $service_class, array $dependencies = [] ) { 216 return new $service_class( ...$dependencies ); 217 217 } 218 218 }; 219 220 219 } 221 220 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Service/Actionable.php
r2986425 r3274550 15 15 16 16 /** 17 * Check whether the conditional object is currently needed. 18 * 19 * @return bool Whether the conditional object is needed. 17 * Add an action to the WordPress action hook. 20 18 */ 21 19 public function add_action(); -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Modeler.php
r3207680 r3274550 19 19 $this->model_factory = $model_factory; 20 20 // should contain a list of loaded models 21 22 21 } 23 22 … … 37 36 $path = $project_path . '/src/models/'; 38 37 if ( has_filter( 'saltus_models_path' ) ) { 38 /** @deprecated 1.2.0 */ 39 39 $path = apply_filters( 'saltus_models_path', $path ); 40 } 41 if ( has_filter( 'saltus/framework/models/path' ) ) { 42 $path = apply_filters( 'saltus/framework/models/path', $path ); 40 43 } 41 44 … … 81 84 // check for models added with filters 82 85 if ( has_filter( 'saltus_models' ) ) { 83 $model = apply_filters( 'saltus_models', [] ); 86 /** @deprecated 1.2.0 */ 87 $model = apply_filters( 'saltus_models', [] ); 84 88 ( ! empty( $model ) && count( $model ) > 0 ? 85 $this->iterate_multiple($model ) : 89 $this->iterate_multiple( $model ) : 90 $this->create( $model ) 91 ); 92 } 93 // check for models added with filters 94 if ( has_filter( 'saltus/framework/models/extra_models' ) ) { 95 /** 96 * parse the models and create them. 97 * Useful for models that are the parsed models 98 * 99 * @param array $empty_list Empty list for extra models 100 */ 101 $empty_list = []; 102 $model = apply_filters( 'saltus/framework/models/extra_models', $empty_list ); 103 ( ! empty( $model ) && count( $model ) > 0 ? 104 $this->iterate_multiple( $model ) : 86 105 $this->create( $model ) 87 106 ); … … 126 145 $this->model_list[ $model->get_type() ] = $model; 127 146 } 128 129 147 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/BaseModel.php
r2986425 r3274550 56 56 protected $ui_labels; 57 57 58 /** 59 * Constructor. 60 * 61 * @param AbstractConfig $config_data The configuration data for the model. 62 */ 58 63 public function __construct( AbstractConfig $config_data ) { 59 64 $this->data = $config_data->all(); … … 74 79 // set messages to override 75 80 $this->set_messages( $config_data ); 76 77 81 } 78 82 … … 93 97 * 94 98 * Required to register post type 99 * 100 * @param string $name The name of the post type. 95 101 */ 96 102 protected function set_name( string $name ) { … … 102 108 * 103 109 * Based on labels.overrides.ui values 110 * 111 * @param AbstractConfig $config The configuration labels for the model. 104 112 */ 105 113 protected function set_ui_label_overrides( AbstractConfig $config ) { … … 111 119 * 112 120 * Based on labels.overrides.messages and label.overrides.bulk_messages values 121 * 122 * @param AbstractConfig $config The configuration labels for the model. 113 123 */ 114 124 protected function set_messages( AbstractConfig $config ) { … … 121 131 * 122 132 * Based on name, or keys labels.has-one and labels.has-many 133 * 134 * @param AbstractConfig $config The configuration labels for the model. 123 135 */ 124 136 protected function set_name_labels( AbstractConfig $config ) { … … 146 158 * 147 159 * Merge and/or replace defaults with user config 160 * 161 * @param array $options User defined options 148 162 */ 149 163 protected function set_options( array $options ) { … … 152 166 return; 153 167 } 154 if ( $this->data['options'] ) { 155 $options = array_replace( $options, $this->data['options'] );156 } 168 169 $options = array_replace( $options, $this->data['options'] ); 170 157 171 $this->options = $options; 158 172 } … … 162 176 * 163 177 * If key labels.overrides exists, add to or replace label defaults 178 * 179 * @param array $labels User defined labels 164 180 */ 165 181 protected function set_labels( array $labels ) { … … 189 205 * 10 => "Post draft updated. {Preview post}" 190 206 * 191 * @param array[] $messages An array of post updated message arrays keyed by post type. 192 * @return array[] Updated array of post updated messages. 193 */ 194 public function post_updated_messages( array $messages ) : array { 207 * @param array $messages An array of post updated message arrays keyed by post type. 208 * 209 * @return array Updated array of post updated messages. 210 */ 211 public function post_updated_messages( array $messages ): array { 195 212 global $post; 196 213 … … 229 246 ( isset( $this->messages['post_updated_short'] ) ? str_replace( $search, $replace, $this->messages['post_updated_short'] ) : 230 247 sprintf( 231 '%1$s restored to revision from %2$s',232 esc_html( $this->one ),233 wp_post_revision_title( intval( $_GET['revision'] ), false )248 '%1$s restored to revision from %2$s', 249 esc_html( $this->one ), 250 wp_post_revision_title( intval( $_GET['revision'] ), false ) 234 251 ) 235 252 ) : … … 292 309 * @param array[] $messages An array of bulk post updated message arrays keyed by post type. 293 310 * @param int[] $counts An array of counts for each key in `$messages`. 294 * @return array Updated array of bulk post updated messages. 295 */ 296 public function bulk_post_updated_messages( array $messages, array $counts ) : array { 311 * 312 * @return array Updated array of bulk post updated messages. 313 */ 314 public function bulk_post_updated_messages( array $messages, array $counts ): array { 297 315 $messages[ $this->name ] = [ 298 316 'updated' => isset( $this->bulk_messages['updated_singular'] ) && isset( $this->bulk_messages['updated_plural'] ) ? … … 347 365 * @param string $plural The text that will be used if $number is not 1 348 366 * @param int $number The number to compare against to use either `$single` or `$plural` 349 * @return string Either `$single` or `$plural` text 350 */ 351 protected static function n( string $single, string $plural, int $number ) : string { 352 return ( 1 === intval( $number ) ) ? $single : $plural; 367 * 368 * @return string Either `$single` or `$plural` text 369 */ 370 protected static function n( string $single, string $plural, int $number ): string { 371 return ( intval( $number ) === 1 ) ? $single : $plural; 353 372 } 354 373 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/Model.php
r2986425 r3274550 17 17 */ 18 18 public function get_type(); 19 20 19 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/ModelFactory.php
r3031895 r3274550 2 2 3 3 namespace Saltus\WP\Framework\Models; 4 use Saltus\WP\Framework\Infrastructure\Plugin\{5 Registerable6 };7 4 8 5 use Noodlehaus\AbstractConfig; … … 14 11 protected $project; 15 12 13 /** 14 * Constructor. 15 * 16 * @param object $app The application instance. 17 * @param string $project The project data. 18 */ 16 19 public function __construct( $app, $project ) { 17 20 $this->app = $app; … … 20 23 21 24 /** 22 * Route to class 25 * Create a new model instance based on the provided configuration. 26 * 27 * @param AbstractConfig $config The configuration for the model. 28 * 29 * @return Model|bool The created model instance or false if the type is not recognized. 23 30 */ 24 31 public function create( AbstractConfig $config ) { … … 37 44 if ( $config->has( $service_name ) && $this->app->has( $service_name ) ) { 38 45 39 $config_value = $config->get( $service_name );40 $service= $this->app->get( $service_name );41 $service_imp= $service->make( $cpt->name, $this->project, $config_value );46 $config_value = $config->get( $service_name ); 47 $service = $this->app->get( $service_name ); 48 $service_imp = $service->make( $cpt->name, $this->project, $config_value ); 42 49 43 if ( $service_imp instanceof Processable ) { 44 $service_imp->process(); 50 if ( $service_imp instanceof Processable ) { 51 $service_imp->process(); 52 } 45 53 } 46 }47 54 } 48 55 … … 64 71 65 72 // make sure $args is an array 66 if ( ! is_array( $args ) ){73 if ( ! is_array( $args ) ) { 67 74 $args = []; 68 75 } 69 76 70 $service = $this->app->get( $normalized_feature_name );77 $service = $this->app->get( $normalized_feature_name ); 71 78 $service_imp = $service->make( $cpt->name, $this->project, $args ); 72 79 … … 79 86 // disable block editor only if 'block_editor' is false 80 87 if ( $config->has( 'block_editor' ) && ! $config->get( 'block_editor' ) ) { 81 add_filter( 'use_block_editor_for_post_type', array( $cpt, 'disable_block_editor' ), 10, 2 );88 add_filter( 'use_block_editor_for_post_type', array( $cpt, 'disable_block_editor' ), 10, 2 ); 82 89 } 83 90 return $cpt; … … 91 98 92 99 return false; 93 94 100 } 95 101 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/PostType.php
r3098987 r3274550 2 2 namespace Saltus\WP\Framework\Models; 3 3 4 /** 5 * Post Type Model 6 * 7 * This model is used to register a custom post type 8 * 9 * @see https://developer.wordpress.org/reference/functions/register_post_type/ 10 */ 4 11 class PostType extends BaseModel implements Model { 5 12 … … 28 35 * Get default Options 29 36 * 30 * Turn it public, change menu position and add `supports` list.31 37 * 32 38 * @return array The list of options settings … … 50 56 51 57 /** 52 * 53 * 58 * Set the meta fields 54 59 */ 55 60 protected function set_meta() { … … 120 125 /** 121 126 * Register Post Type 122 *123 * @return void124 127 */ 125 128 protected function register() { … … 140 143 * Adds filters to change post update messages 141 144 * TODO: accept overrides 142 *143 * @return void144 145 */ 145 146 protected function set_updated_messages() { 146 147 147 add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ], 1 ); 148 148 add_filter( 'bulk_post_updated_messages', [ $this, 'bulk_post_updated_messages' ], 1, 2 ); 149 150 149 } 151 150 … … 154 153 * 155 154 * @param array $ui_labels 156 * @return void157 155 */ 158 156 protected function set_ui_labels( array $ui_labels ) { … … 183 181 * Sets the placeholder text for the title field for this post type. 184 182 * 185 * @param string $title The placeholder text. 186 * @param WP_Post $post The current post. 187 * @return string The updated placeholder text. 183 * @param string $title The placeholder text. 184 * @param \WP_Post $post The current post. 185 * 186 * @return string The updated placeholder text. 188 187 */ 189 public function enter_title_here( string $title, \WP_Post $post ) : string {188 public function enter_title_here( string $title, \WP_Post $post ): string { 190 189 if ( $this->name !== $post->post_type ) { 191 190 return $title; … … 194 193 return $this->ui_labels['enter_title_here']; 195 194 } 196 197 195 } -
interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/Taxonomy.php
r2986425 r3274550 2 2 namespace Saltus\WP\Framework\Models; 3 3 4 /** 5 * Taxonomy Model 6 * 7 * This model is used to register a custom taxonomy 8 * 9 * @see https://developer.wordpress.org/reference/functions/register_taxonomy/ 10 */ 4 11 class Taxonomy extends BaseModel implements Model { 5 12 6 13 // data req for register_taxonomy() 7 private $links = 'post';8 14 private $associations; 9 15 … … 107 113 108 114 /** 109 * 110 * 115 * Set meta fields 111 116 */ 112 117 private function set_meta() {
Note: See TracChangeset
for help on using the changeset viewer.