Plugin Directory

Changeset 3274550


Ignore:
Timestamp:
04/16/2025 10:50:23 AM (8 months ago)
Author:
pcarvalho
Message:

Version 1.4.8 tag

Location:
interactive-globes/tags/1.4.8
Files:
5 deleted
83 edited

Legend:

Unmodified
Added
Removed
  • interactive-globes/tags/1.4.8/languages/interactive-globes.pot

    r3269027 r3274550  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Interactive Globes 1.4.5\n"
     5"Project-Id-Version: Interactive Globes 1.4.8\n"
    66"Report-Msgid-Bugs-To: https://saltus.dev/\n"
    7 "POT-Creation-Date: 2025-02-27 12:59:08+00:00\n"
     7"POT-Creation-Date: 2025-04-16 08:53:01+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    8080msgstr ""
    8181
    82 #: src/Features/CptManager/CptManagerCore.php:82
     82#: src/Features/CptManager/CptManagerCore.php:104
    8383msgid "Add title"
    8484msgstr ""
     
    8686#: src/Features/DotLabel/DotLabelProMeta.php:22
    8787#: src/Features/Point/PointProMeta.php:22 src/models/04-globe-region.php:27
    88 #: src/models/06-globe-html.php:10
     88#: src/models/06-globe-html.php:21
    8989#: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:119
    9090#: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:132
     
    9999
    100100#: src/Features/DotLabel/DotLabelProMeta.php:29
    101 #: src/models/01-globe-dotlabel.php:138 src/models/02-globe-point.php:133
    102 #: src/models/03-globe-line.php:150 src/models/04-globe-region.php:212
    103 #: src/models/06-globe-html.php:134
     101#: 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
    104104msgid "Details"
    105105msgstr ""
    106106
    107107#: src/Features/DotLabel/DotLabelProMeta.php:33
    108 #: src/Features/Point/PointProMeta.php:33 src/models/03-globe-line.php:258
    109 #: src/models/04-globe-region.php:242 src/models/06-globe-html.php:187
     108#: 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
    110110msgid "Customize"
    111111msgstr ""
    112112
    113113#: src/Features/DotLabel/DotLabelProMeta.php:39
    114 #: src/Features/Point/PointProMeta.php:37 src/models/03-globe-line.php:263
    115 #: src/models/04-globe-region.php:247 src/models/06-globe-html.php:192
     114#: 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
    116116msgid "Use Custom Options"
    117117msgstr ""
    118118
    119119#: src/Features/DotLabel/DotLabelProMeta.php:40
    120 #: src/Features/Point/PointProMeta.php:38 src/models/03-globe-line.php:264
    121 #: src/models/04-globe-region.php:248
     120#: src/Features/Point/PointProMeta.php:38 src/models/03-globe-line.php:275
     121#: src/models/04-globe-region.php:259
    122122msgid "Define custom colors and actions."
    123123msgstr ""
     
    129129#: src/Services/Model/Pro/MetaHTML.php:50
    130130#: 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:253
    132 #: src/models/06-globe-html.php:198
     131#: src/models/00-globe-pro.php:232 src/models/04-globe-region.php:264
     132#: src/models/06-globe-html.php:209
    133133msgid "Click Action"
    134134msgstr ""
     
    139139#: src/Services/Model/Base/MetaPoint.php:125
    140140#: 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:315
     141#: src/models/00-globe-pro.php:242 src/models/03-globe-line.php:326
    142142msgid "Altitude"
    143143msgstr ""
     
    153153#: src/Services/Model/Base/MetaPoint.php:129
    154154#: 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:261
     155#: src/models/00-globe-pro.php:254 src/models/04-globe-region.php:272
    156156msgid "Fill Color"
    157157msgstr ""
     
    163163#: src/Services/Model/Pro/MetaRegions.php:83 src/models/00-globe-pro.php:133
    164164#: src/models/00-globe-pro.php:214 src/models/00-globe-pro.php:260
    165 #: src/models/04-globe-region.php:267
     165#: src/models/04-globe-region.php:278
    166166msgid "Hover Color"
    167167msgstr ""
     
    209209msgstr ""
    210210
    211 #: src/Features/Meta/MetaCore.php:169
     211#: src/Features/Meta/MetaCore.php:140
     212msgid "Copy to clipboard"
     213msgstr ""
     214
     215#: src/Features/Meta/MetaCore.php:184
    212216msgid "Add new"
    213217msgstr ""
    214218
    215 #: src/Features/Meta/MetaCore.php:336
     219#: src/Features/Meta/MetaCore.php:351
    216220#: src/Services/Model/Base/MetaDotLabel.php:44
    217221#: src/Services/Model/Base/MetaPoint.php:44
     
    219223msgstr ""
    220224
    221 #: src/Features/Meta/MetaCore.php:337
     225#: src/Features/Meta/MetaCore.php:352
    222226msgid "Actions"
    223227msgstr ""
    224228
    225 #: src/Features/Meta/MetaCore.php:347
     229#: src/Features/Meta/MetaCore.php:362
    226230msgid "(no title)"
    227231msgstr ""
     
    230234#: src/Services/Model/Pro/MetaLayers.php:53
    231235#: src/Services/Model/Pro/MetaPoint.php:16
    232 #: src/Services/Model/Pro/MetaRegions.php:30 src/models/03-globe-line.php:156
     236#: src/Services/Model/Pro/MetaRegions.php:30 src/models/03-globe-line.php:167
    233237msgid "Type"
    234238msgstr ""
     
    245249
    246250#: src/Features/Point/PointProMeta.php:55
    247 #: src/Services/Model/Pro/MetaPoint.php:21 src/models/02-globe-point.php:55
    248 #: src/models/02-globe-point.php:57
     251#: src/Services/Model/Pro/MetaPoint.php:21 src/models/02-globe-point.php:68
     252#: src/models/02-globe-point.php:70
    249253msgid "Marker"
    250254msgstr ""
     
    301305msgstr ""
    302306
    303 #: src/Features/Sales/UpsellPage.php:48 src/Features/Sales/UpsellPage.php:49
     307#: src/Features/Sales/UpsellPage.php:41 src/Features/Sales/UpsellPage.php:42
    304308msgid "Try Pro Version"
    305309msgstr ""
    306310
    307 #: src/Plugin/Assets.php:181
     311#: src/Plugin/Assets.php:175
    308312msgid "New center saved"
    309313msgstr ""
    310314
    311 #: src/Plugin/Assets.php:182
     315#: src/Plugin/Assets.php:176
    312316msgid "Set initial center"
    313317msgstr ""
     
    363367msgstr ""
    364368
    365 #: src/Services/Model/Base/Labels.php:21 src/models/01-globe-dotlabel.php:64
    366 #: src/models/02-globe-point.php:58 src/models/03-globe-line.php:73
    367 #: src/models/04-globe-region.php:138 src/models/06-globe-html.php:59
     369#: 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
    368372msgid "Create New"
    369373msgstr ""
     
    461465msgstr ""
    462466
    463 #: src/Services/Model/Base/Labels.php:48 src/models/01-globe-dotlabel.php:91
    464 #: src/models/02-globe-point.php:85 src/models/03-globe-line.php:100
    465 #: src/models/04-globe-region.php:165 src/models/06-globe-html.php:86
     467#: 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
    466470msgid "Custom field updated"
    467471msgstr ""
    468472
    469 #: src/Services/Model/Base/Labels.php:49 src/models/01-globe-dotlabel.php:92
    470 #: src/models/02-globe-point.php:86 src/models/03-globe-line.php:101
    471 #: src/models/04-globe-region.php:166 src/models/06-globe-html.php:87
     473#: 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
    472476msgid "Custom field deleted"
    473477msgstr ""
     
    593597msgstr ""
    594598
    595 #: src/Services/Model/Base/Meta.php:144
     599#: src/Services/Model/Base/Meta.php:142
     600msgid "Altitude/Scale Settings"
     601msgstr ""
     602
     603#: src/Services/Model/Base/Meta.php:143
     604msgid ""
     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."
     609msgstr ""
     610
     611#: src/Services/Model/Base/Meta.php:149
    596612msgid "Controls the initial globe scale"
    597613msgstr ""
    598614
    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
     617msgid "Initial"
     618msgstr ""
     619
     620#: src/Services/Model/Base/Meta.php:156
     621msgid ""
     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."
     625msgstr ""
     626
     627#: src/Services/Model/Base/Meta.php:157
     628msgid "Minimum"
     629msgstr ""
     630
     631#: src/Services/Model/Base/Meta.php:163
     632msgid ""
     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."
     636msgstr ""
     637
     638#: src/Services/Model/Base/Meta.php:164
     639msgid "Maximum"
     640msgstr ""
     641
     642#: src/Services/Model/Base/Meta.php:170
    604643msgid "Center coordinates"
    605644msgstr ""
    606645
    607 #: src/Services/Model/Base/Meta.php:150
     646#: src/Services/Model/Base/Meta.php:171
    608647msgid "Center of the globe when initially loaded."
    609648msgstr ""
    610649
    611 #: src/Services/Model/Base/Meta.php:152
     650#: src/Services/Model/Base/Meta.php:173
    612651#: src/Services/Model/Base/MetaDotLabel.php:30
    613652#: src/Services/Model/Base/MetaPoint.php:30
     
    618657msgstr ""
    619658
    620 #: src/Services/Model/Base/Meta.php:154
     659#: src/Services/Model/Base/Meta.php:175
    621660#: src/Services/Model/Base/MetaDotLabel.php:32
    622661#: src/Services/Model/Base/MetaPoint.php:32
     
    626665msgstr ""
    627666
    628 #: src/Services/Model/Base/Meta.php:158
     667#: src/Services/Model/Base/Meta.php:179
    629668#: src/Services/Model/Base/MetaDotLabel.php:55
    630669#: src/Services/Model/Base/MetaPoint.php:55
     
    632671msgstr ""
    633672
    634 #: src/Services/Model/Base/Meta.php:166
     673#: src/Services/Model/Base/Meta.php:187
    635674#: src/Services/Model/Base/MetaDotLabel.php:63
    636675#: src/Services/Model/Base/MetaPoint.php:63
    637 #: src/models/01-globe-dotlabel.php:164 src/models/02-globe-point.php:159
    638 #: src/models/03-globe-line.php:211 src/models/06-globe-html.php:160
     676#: 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
    639678#: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/map/map.php:24
    640679msgid "Latitude"
    641680msgstr ""
    642681
    643 #: src/Services/Model/Base/Meta.php:173
     682#: src/Services/Model/Base/Meta.php:194
    644683#: src/Services/Model/Base/MetaDotLabel.php:69
    645684#: src/Services/Model/Base/MetaPoint.php:69
    646 #: src/models/01-globe-dotlabel.php:171 src/models/02-globe-point.php:166
    647 #: src/models/03-globe-line.php:216 src/models/06-globe-html.php:167
     685#: 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
    648687#: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/map/map.php:25
    649688msgid "Longitude"
    650689msgstr ""
    651690
    652 #: src/Services/Model/Base/Meta.php:183
     691#: src/Services/Model/Base/Meta.php:204
    653692#. translators: legend refers to a caption or visual element explaining colours
    654693#. on map
     
    656695msgstr ""
    657696
    658 #: src/Services/Model/Base/Meta.php:184
     697#: src/Services/Model/Base/Meta.php:205
    659698msgid "Allow interactions with globe, like zoom and pan."
    660699msgstr ""
    661700
    662 #: src/Services/Model/Base/Meta.php:189
     701#: src/Services/Model/Base/Meta.php:210
    663702msgid "Zoom"
    664703msgstr ""
    665704
    666 #: src/Services/Model/Base/Meta.php:194
     705#: src/Services/Model/Base/Meta.php:215
    667706msgid "Pan & Rotate"
    668707msgstr ""
    669708
    670 #: src/Services/Model/Base/Meta.php:201
     709#: src/Services/Model/Base/Meta.php:222
    671710#. translators: legend refers to a caption or visual element explaining colours
    672711#. on map
     
    674713msgstr ""
    675714
    676 #: src/Services/Model/Base/Meta.php:202
     715#: src/Services/Model/Base/Meta.php:223
    677716msgid "Animate globe on load"
    678717msgstr ""
    679718
    680 #: src/Services/Model/Base/Meta.php:208
     719#: src/Services/Model/Base/Meta.php:229
    681720msgid "Container"
    682721msgstr ""
    683722
    684 #: src/Services/Model/Base/Meta.php:214
     723#: src/Services/Model/Base/Meta.php:235
    685724msgid "Background Color"
    686725msgstr ""
    687726
    688 #: src/Services/Model/Base/Meta.php:219
     727#: src/Services/Model/Base/Meta.php:240
    689728msgid "Container Height"
    690729msgstr ""
    691730
    692 #: src/Services/Model/Base/Meta.php:225
     731#: src/Services/Model/Base/Meta.php:246
    693732msgid ""
    694733"The default 56% corresponds to a 16:9 aspect ratio. 100% would be a square. "
     
    697736msgstr ""
    698737
    699 #: src/Services/Model/Base/Meta.php:229
     738#: src/Services/Model/Base/Meta.php:250
    700739msgid "Container Height on Mobile"
    701740msgstr ""
    702741
    703 #: src/Services/Model/Base/Meta.php:235
     742#: src/Services/Model/Base/Meta.php:256
    704743msgid ""
    705744"Leave blank to use the same value above. On mobile there might be the need "
     
    708747msgstr ""
    709748
    710 #: src/Services/Model/Base/Meta.php:239
     749#: src/Services/Model/Base/Meta.php:260
    711750msgid "Container Max-Width"
    712751msgstr ""
    713752
    714 #: src/Services/Model/Base/Meta.php:240
     753#: src/Services/Model/Base/Meta.php:261
    715754msgid ""
    716755"Leave empty if you always want your globe to take 100% of the available "
     
    719758
    720759#: src/Services/Model/Base/MetaDotLabel.php:21
    721 #: src/models/01-globe-dotlabel.php:60 src/models/01-globe-dotlabel.php:62
    722 #: src/models/01-globe-dotlabel.php:63 src/models/01-globe-dotlabel.php:74
     760#: 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
    723762msgid "Dot Labels"
    724763msgstr ""
     
    737776#: src/Services/Model/Base/MetaDotLabel.php:51
    738777#: src/Services/Model/Base/MetaPoint.php:51
    739 #: src/models/01-globe-dotlabel.php:142 src/models/02-globe-point.php:137
    740 #: src/models/06-globe-html.php:138
     778#: src/models/01-globe-dotlabel.php:160 src/models/02-globe-point.php:150
     779#: src/models/06-globe-html.php:149
    741780msgid "Coordinates"
    742781msgstr ""
     
    744783#: src/Services/Model/Base/MetaDotLabel.php:78
    745784#: src/Services/Model/Base/MetaPoint.php:78
    746 #: src/models/01-globe-dotlabel.php:185 src/models/02-globe-point.php:180
    747 #: src/models/04-globe-region.php:232
     785#: src/models/01-globe-dotlabel.php:203 src/models/02-globe-point.php:193
     786#: src/models/04-globe-region.php:243
    748787msgid "Tooltip Content"
    749788msgstr ""
     
    751790#: src/Services/Model/Base/MetaDotLabel.php:82
    752791#: src/Services/Model/Base/MetaPoint.php:82
    753 #: src/models/01-globe-dotlabel.php:189 src/models/02-globe-point.php:184
    754 #: src/models/04-globe-region.php:236 src/models/06-globe-html.php:180
     792#: 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
    755794msgid "Action Content"
    756795msgstr ""
     
    758797#: src/Services/Model/Base/MetaDotLabel.php:83
    759798#: src/Services/Model/Base/MetaPoint.php:83
    760 #: src/models/01-globe-dotlabel.php:190 src/models/02-globe-point.php:185
    761 #: src/models/04-globe-region.php:237 src/models/06-globe-html.php:181
     799#: 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
    762801msgid "URL or content to trigger when marker is clicked."
    763802msgstr ""
    764803
    765804#: src/Services/Model/Base/MetaDotLabel.php:83
    766 #: src/Services/Model/Base/MetaPoint.php:83 src/models/04-globe-region.php:237
     805#: src/Services/Model/Base/MetaPoint.php:83 src/models/04-globe-region.php:248
    767806msgid "Don't forget to select a click action below."
    768807msgstr ""
     
    787826msgstr ""
    788827
    789 #: src/Services/Model/Base/MetaPoint.php:21 src/models/02-globe-point.php:54
     828#: src/Services/Model/Base/MetaPoint.php:21 src/models/02-globe-point.php:67
    790829msgid "3D Markers"
    791830msgstr ""
     
    852891msgstr ""
    853892
    854 #: src/Services/Model/Pro/MetaHTML.php:18 src/models/06-globe-html.php:55
    855 #: src/models/06-globe-html.php:69
     893#: src/Services/Model/Pro/MetaHTML.php:18 src/models/06-globe-html.php:66
     894#: src/models/06-globe-html.php:80
    856895msgid "HTML Markers"
    857896msgstr ""
     
    865904msgstr ""
    866905
    867 #: src/Services/Model/Pro/MetaHTML.php:43 src/models/06-globe-html.php:206
     906#: src/Services/Model/Pro/MetaHTML.php:43 src/models/06-globe-html.php:217
    868907msgid "HTML Marker Template"
    869908msgstr ""
    870909
    871 #: src/Services/Model/Pro/MetaHTML.php:44 src/models/06-globe-html.php:207
     910#: src/Services/Model/Pro/MetaHTML.php:44 src/models/06-globe-html.php:218
    872911msgid ""
    873912"Template for the HTML content. You can use HTML code and if necessary use "
     
    9881027msgstr ""
    9891028
    990 #: src/Services/Model/Pro/MetaLines.php:46 src/models/03-globe-line.php:282
     1029#: src/Services/Model/Pro/MetaLines.php:46 src/models/03-globe-line.php:293
    9911030msgid "Line Dash"
    9921031msgstr ""
    9931032
    994 #: src/Services/Model/Pro/MetaLines.php:47 src/models/03-globe-line.php:283
     1033#: src/Services/Model/Pro/MetaLines.php:47 src/models/03-globe-line.php:294
    9951034msgid ""
    9961035"The length of the dashed segments in the arc, in terms of relative line "
     
    9981037msgstr ""
    9991038
    1000 #: src/Services/Model/Pro/MetaLines.php:58 src/models/03-globe-line.php:295
     1039#: src/Services/Model/Pro/MetaLines.php:58 src/models/03-globe-line.php:306
    10011040msgid "Line Dash Gap"
    10021041msgstr ""
    10031042
    1004 #: src/Services/Model/Pro/MetaLines.php:59 src/models/03-globe-line.php:296
     1043#: src/Services/Model/Pro/MetaLines.php:59 src/models/03-globe-line.php:307
    10051044msgid ""
    10061045"The length of the gap between dash segments, in terms of relative line "
     
    10081047msgstr ""
    10091048
    1010 #: src/Services/Model/Pro/MetaLines.php:64 src/models/03-globe-line.php:302
     1049#: src/Services/Model/Pro/MetaLines.php:64 src/models/03-globe-line.php:313
    10111050msgid "Line Width"
    10121051msgstr ""
    10131052
    1014 #: src/Services/Model/Pro/MetaLines.php:65 src/models/03-globe-line.php:303
     1053#: src/Services/Model/Pro/MetaLines.php:65 src/models/03-globe-line.php:314
    10151054msgid "The line’s diameter, in angular degrees"
    10161055msgstr ""
    10171056
    1018 #: src/Services/Model/Pro/MetaLines.php:77 src/models/03-globe-line.php:316
     1057#: src/Services/Model/Pro/MetaLines.php:77 src/models/03-globe-line.php:327
    10191058msgid ""
    10201059"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:328
     1060"two points. ( 0 = ground line, 100 = globe radius )"
     1061msgstr ""
     1062
     1063#: src/Services/Model/Pro/MetaLines.php:82 src/models/03-globe-line.php:339
    10251064msgid ""
    10261065"Time duration (in seconds) to animate the motion of dash positions from the "
     
    10301069msgstr ""
    10311070
    1032 #: src/Services/Model/Pro/MetaLines.php:88 src/models/03-globe-line.php:327
     1071#: src/Services/Model/Pro/MetaLines.php:88 src/models/03-globe-line.php:338
    10331072msgid "Animation speed"
    10341073msgstr ""
     
    15391578msgstr ""
    15401579
    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
     1586msgid "Associated Globe"
     1587msgstr ""
     1588
     1589#: src/models/01-globe-dotlabel.php:25
    15421590msgid "Clone Dot Label"
    15431591msgstr ""
    15441592
    1545 #: src/models/01-globe-dotlabel.php:20
     1593#: src/models/01-globe-dotlabel.php:26
    15461594msgid "Create a copy of this dot label"
    15471595msgstr ""
    15481596
    1549 #: src/models/01-globe-dotlabel.php:23
     1597#: src/models/01-globe-dotlabel.php:29
    15501598msgid "Download Dot Labels Export File"
    15511599msgstr ""
    15521600
    1553 #: src/models/01-globe-dotlabel.php:32 src/models/02-globe-point.php:28
    1554 #: src/models/03-globe-line.php:41 src/models/04-globe-region.php:106
    1555 #: src/models/06-globe-html.php:29
     1601#: 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
    15561604msgid "Parent Globe"
    15571605msgstr ""
    15581606
    1559 #: src/models/01-globe-dotlabel.php:61
     1607#: src/models/01-globe-dotlabel.php:79
    15601608msgid "Dot Label"
    15611609msgstr ""
    15621610
    1563 #: src/models/01-globe-dotlabel.php:65
     1611#: src/models/01-globe-dotlabel.php:83
    15641612msgid "Create New Dot Label"
    15651613msgstr ""
    15661614
    1567 #: src/models/01-globe-dotlabel.php:66 src/models/02-globe-point.php:60
    1568 #: src/models/03-globe-line.php:75 src/models/04-globe-region.php:140
    1569 #: src/models/06-globe-html.php:61
     1615#: 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
    15701618msgid "Edit"
    15711619msgstr ""
    15721620
    1573 #: src/models/01-globe-dotlabel.php:67
     1621#: src/models/01-globe-dotlabel.php:85
    15741622msgid "New Dot Label"
    15751623msgstr ""
    15761624
    1577 #: src/models/01-globe-dotlabel.php:68
     1625#: src/models/01-globe-dotlabel.php:86
    15781626msgid "View Dot Label"
    15791627msgstr ""
    15801628
    1581 #: src/models/01-globe-dotlabel.php:69
     1629#: src/models/01-globe-dotlabel.php:87
    15821630msgid "View Dot Labels"
    15831631msgstr ""
    15841632
    1585 #: src/models/01-globe-dotlabel.php:70
     1633#: src/models/01-globe-dotlabel.php:88
    15861634msgid "Search Dot Labels"
    15871635msgstr ""
    15881636
    1589 #: src/models/01-globe-dotlabel.php:71
     1637#: src/models/01-globe-dotlabel.php:89
    15901638msgid "No Dot Labels found."
    15911639msgstr ""
    15921640
    1593 #: src/models/01-globe-dotlabel.php:72
     1641#: src/models/01-globe-dotlabel.php:90
    15941642msgid "No Dot Labels found in Trash."
    15951643msgstr ""
    15961644
    1597 #: src/models/01-globe-dotlabel.php:73 src/models/02-globe-point.php:67
    1598 #: src/models/03-globe-line.php:82 src/models/04-globe-region.php:147
    1599 #: src/models/06-globe-html.php:68
     1645#: 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
    16001648msgid "Parent Globe:"
    16011649msgstr ""
    16021650
    1603 #: src/models/01-globe-dotlabel.php:75
     1651#: src/models/01-globe-dotlabel.php:93
    16041652msgid "Dot Label Archives"
    16051653msgstr ""
    16061654
    1607 #: src/models/01-globe-dotlabel.php:76
     1655#: src/models/01-globe-dotlabel.php:94
    16081656msgid "Dot Label Attributes"
    16091657msgstr ""
    16101658
    1611 #: src/models/01-globe-dotlabel.php:77
     1659#: src/models/01-globe-dotlabel.php:95
    16121660msgid "Insert into Dot Label"
    16131661msgstr ""
    16141662
    1615 #: src/models/01-globe-dotlabel.php:78
     1663#: src/models/01-globe-dotlabel.php:96
    16161664msgid "Uploaded to this Dot Label"
    16171665msgstr ""
    16181666
    1619 #: src/models/01-globe-dotlabel.php:79
     1667#: src/models/01-globe-dotlabel.php:97
    16201668msgid "Filter Dot Label list"
    16211669msgstr ""
    16221670
    1623 #: src/models/01-globe-dotlabel.php:80
     1671#: src/models/01-globe-dotlabel.php:98
    16241672msgid "Dot Label list navigation"
    16251673msgstr ""
    16261674
    1627 #: src/models/01-globe-dotlabel.php:81
     1675#: src/models/01-globe-dotlabel.php:99
    16281676msgid "Dot Label list"
    16291677msgstr ""
    16301678
    1631 #: src/models/01-globe-dotlabel.php:82
     1679#: src/models/01-globe-dotlabel.php:100
    16321680msgid "Dot Label Cover Image"
    16331681msgstr ""
    16341682
    1635 #: src/models/01-globe-dotlabel.php:83
     1683#: src/models/01-globe-dotlabel.php:101
    16361684msgid "Set Dot Label Cover Image"
    16371685msgstr ""
    16381686
    1639 #: src/models/01-globe-dotlabel.php:84
     1687#: src/models/01-globe-dotlabel.php:102
    16401688msgid "Remove Dot Label Cover"
    16411689msgstr ""
    16421690
    1643 #: src/models/01-globe-dotlabel.php:85
     1691#: src/models/01-globe-dotlabel.php:103
    16441692msgid "Use as Dot Label Cover"
    16451693msgstr ""
    16461694
    1647 #: src/models/01-globe-dotlabel.php:89
     1695#: src/models/01-globe-dotlabel.php:107
    16481696msgid ""
    16491697"Dot Label information updated. <a href=\"{permalink}\" "
     
    16511699msgstr ""
    16521700
    1653 #: src/models/01-globe-dotlabel.php:90
     1701#: src/models/01-globe-dotlabel.php:108
    16541702msgid "Dot Label info updated"
    16551703msgstr ""
    16561704
    1657 #: src/models/01-globe-dotlabel.php:93
     1705#: src/models/01-globe-dotlabel.php:111
    16581706msgid "Dot Label content restored from revision"
    16591707msgstr ""
    16601708
    1661 #: src/models/01-globe-dotlabel.php:94
     1709#: src/models/01-globe-dotlabel.php:112
    16621710msgid "Dot Label Published"
    16631711msgstr ""
    16641712
    1665 #: src/models/01-globe-dotlabel.php:95
     1713#: src/models/01-globe-dotlabel.php:113
    16661714msgid "Dot Label information saved."
    16671715msgstr ""
    16681716
    1669 #: src/models/01-globe-dotlabel.php:96
     1717#: src/models/01-globe-dotlabel.php:114
    16701718msgid "Dot Label submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    16711719msgstr ""
    16721720
    1673 #: src/models/01-globe-dotlabel.php:97
     1721#: src/models/01-globe-dotlabel.php:115
    16741722msgid ""
    16751723"Dot Label scheduled for {date}. <a href=\"{preview_url}\" "
     
    16771725msgstr ""
    16781726
    1679 #: src/models/01-globe-dotlabel.php:98
     1727#: src/models/01-globe-dotlabel.php:116
    16801728msgid ""
    16811729"Dot Label draft updated. <a href=\"{preview_url}\" "
     
    16831731msgstr ""
    16841732
    1685 #: src/models/01-globe-dotlabel.php:101
     1733#: src/models/01-globe-dotlabel.php:119
    16861734msgid "Dot Label updated. Yay!"
    16871735msgstr ""
    16881736
    1689 #: src/models/01-globe-dotlabel.php:102
     1737#: src/models/01-globe-dotlabel.php:120
    16901738msgid "%s Dot Label updated. Yay!"
    16911739msgstr ""
    16921740
    1693 #: src/models/01-globe-dotlabel.php:103
     1741#: src/models/01-globe-dotlabel.php:121
    16941742msgid "Dot Label not updated, somebody is editing it"
    16951743msgstr ""
    16961744
    1697 #: src/models/01-globe-dotlabel.php:104
     1745#: src/models/01-globe-dotlabel.php:122
    16981746msgid "%s Dot Label not updated, somebody is editing them"
    16991747msgstr ""
    17001748
    1701 #: src/models/01-globe-dotlabel.php:105
     1749#: src/models/01-globe-dotlabel.php:123
    17021750msgid "Dot Label permanetly deleted. Fahrenheit 451 team was here?"
    17031751msgstr ""
    17041752
    1705 #: src/models/01-globe-dotlabel.php:106
     1753#: src/models/01-globe-dotlabel.php:124
    17061754msgid "%s Dot Label permanently deleted. Why? :("
    17071755msgstr ""
    17081756
    1709 #: src/models/01-globe-dotlabel.php:107
     1757#: src/models/01-globe-dotlabel.php:125
    17101758msgid "Dot Label moved to the trash. I'm sad :("
    17111759msgstr ""
    17121760
    1713 #: src/models/01-globe-dotlabel.php:108
     1761#: src/models/01-globe-dotlabel.php:126
    17141762msgid "%s Dot Label moved to the trash. Why? :("
    17151763msgstr ""
    17161764
    1717 #: src/models/01-globe-dotlabel.php:109
     1765#: src/models/01-globe-dotlabel.php:127
    17181766msgid "Dot Label recovered from trash. Well done!"
    17191767msgstr ""
    17201768
    1721 #: src/models/01-globe-dotlabel.php:110
     1769#: src/models/01-globe-dotlabel.php:128
    17221770msgid "%s Dot Label saved from the enemies!"
    17231771msgstr ""
    17241772
    1725 #: src/models/01-globe-dotlabel.php:114
     1773#: src/models/01-globe-dotlabel.php:132
    17261774msgid "Enter Dot Label name here"
    17271775msgstr ""
    17281776
    1729 #: src/models/01-globe-dotlabel.php:134 src/models/02-globe-point.php:128
    1730 #: src/models/03-globe-line.php:141 src/models/04-globe-region.php:206
    1731 #: src/models/06-globe-html.php:129
     1777#: 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
    17321780msgid "Information"
    17331781msgstr ""
    17341782
    1735 #: src/models/01-globe-dotlabel.php:147 src/models/02-globe-point.php:142
    1736 #: src/models/03-globe-line.php:194 src/models/06-globe-html.php:143
     1783#: 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
    17371785msgid "zoom"
    17381786msgstr ""
    17391787
    1740 #: src/models/01-globe-dotlabel.php:156 src/models/02-globe-point.php:151
    1741 #: src/models/03-globe-line.php:203 src/models/06-globe-html.php:152
     1788#: 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
    17421790msgid "address"
    17431791msgstr ""
    17441792
    1745 #: src/models/01-globe-dotlabel.php:198
     1793#: src/models/01-globe-dotlabel.php:216
    17461794msgid "Globe - Dot Label relationship"
    17471795msgstr ""
    17481796
    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
    17621800msgid "Select a Parent Globe"
    17631801msgstr ""
    17641802
    1765 #: src/models/02-globe-point.php:18
     1803#: src/models/02-globe-point.php:20
    17661804msgid "Clone Point"
    17671805msgstr ""
    17681806
    1769 #: src/models/02-globe-point.php:19
     1807#: src/models/02-globe-point.php:21
    17701808msgid "Create a copy of this point"
    17711809msgstr ""
    17721810
    1773 #: src/models/02-globe-point.php:56 src/models/02-globe-point.php:68
    1774 #: src/models/03-globe-line.php:225 src/models/06-globe-html.php:57
    1775 #: src/models/06-globe-html.php:58
     1811#: 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
    17761814msgid "Markers"
    17771815msgstr ""
    17781816
    1779 #: src/models/02-globe-point.php:59
     1817#: src/models/02-globe-point.php:72
    17801818msgid "Create New Marker"
    17811819msgstr ""
    17821820
    1783 #: src/models/02-globe-point.php:61
     1821#: src/models/02-globe-point.php:74
    17841822msgid "New Marker"
    17851823msgstr ""
    17861824
    1787 #: src/models/02-globe-point.php:62
     1825#: src/models/02-globe-point.php:75
    17881826msgid "View Marker"
    17891827msgstr ""
    17901828
    1791 #: src/models/02-globe-point.php:63
     1829#: src/models/02-globe-point.php:76
    17921830msgid "View Markers"
    17931831msgstr ""
    17941832
    1795 #: src/models/02-globe-point.php:64
     1833#: src/models/02-globe-point.php:77
    17961834msgid "Search Markers"
    17971835msgstr ""
    17981836
    1799 #: src/models/02-globe-point.php:65
     1837#: src/models/02-globe-point.php:78
    18001838msgid "No Markers found."
    18011839msgstr ""
    18021840
    1803 #: src/models/02-globe-point.php:66
     1841#: src/models/02-globe-point.php:79
    18041842msgid "No Markers found in Trash."
    18051843msgstr ""
    18061844
    1807 #: src/models/02-globe-point.php:69
     1845#: src/models/02-globe-point.php:82
    18081846msgid "Marker Archives"
    18091847msgstr ""
    18101848
    1811 #: src/models/02-globe-point.php:70
     1849#: src/models/02-globe-point.php:83
    18121850msgid "Marker Attributes"
    18131851msgstr ""
    18141852
    1815 #: src/models/02-globe-point.php:71
     1853#: src/models/02-globe-point.php:84
    18161854msgid "Insert into Marker"
    18171855msgstr ""
    18181856
    1819 #: src/models/02-globe-point.php:72
     1857#: src/models/02-globe-point.php:85
    18201858msgid "Uploaded to this Marker"
    18211859msgstr ""
    18221860
    1823 #: src/models/02-globe-point.php:73
     1861#: src/models/02-globe-point.php:86
    18241862msgid "Filter Marker list"
    18251863msgstr ""
    18261864
    1827 #: src/models/02-globe-point.php:74
     1865#: src/models/02-globe-point.php:87
    18281866msgid "Marker list navigation"
    18291867msgstr ""
    18301868
    1831 #: src/models/02-globe-point.php:75
     1869#: src/models/02-globe-point.php:88
    18321870msgid "Marker list"
    18331871msgstr ""
    18341872
    1835 #: src/models/02-globe-point.php:76
     1873#: src/models/02-globe-point.php:89
    18361874msgid "Marker Cover Image"
    18371875msgstr ""
    18381876
    1839 #: src/models/02-globe-point.php:77
     1877#: src/models/02-globe-point.php:90
    18401878msgid "Set Marker Cover Image"
    18411879msgstr ""
    18421880
    1843 #: src/models/02-globe-point.php:78
     1881#: src/models/02-globe-point.php:91
    18441882msgid "Remove Marker Cover"
    18451883msgstr ""
    18461884
    1847 #: src/models/02-globe-point.php:79
     1885#: src/models/02-globe-point.php:92
    18481886msgid "Use as Marker Cover"
    18491887msgstr ""
    18501888
    1851 #: src/models/02-globe-point.php:83
     1889#: src/models/02-globe-point.php:96
    18521890msgid ""
    18531891"Marker information updated. <a href=\"{permalink}\" target=\"_blank\">View "
     
    18551893msgstr ""
    18561894
    1857 #: src/models/02-globe-point.php:84
     1895#: src/models/02-globe-point.php:97
    18581896msgid "Marker info updated"
    18591897msgstr ""
    18601898
    1861 #: src/models/02-globe-point.php:87
     1899#: src/models/02-globe-point.php:100
    18621900msgid "Marker content restored from revision"
    18631901msgstr ""
    18641902
    1865 #: src/models/02-globe-point.php:88
     1903#: src/models/02-globe-point.php:101
    18661904msgid "Marker Published"
    18671905msgstr ""
    18681906
    1869 #: src/models/02-globe-point.php:89
     1907#: src/models/02-globe-point.php:102
    18701908msgid "Marker information saved."
    18711909msgstr ""
    18721910
    1873 #: src/models/02-globe-point.php:90
     1911#: src/models/02-globe-point.php:103
    18741912msgid "Point submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    18751913msgstr ""
    18761914
    1877 #: src/models/02-globe-point.php:91
     1915#: src/models/02-globe-point.php:104
    18781916msgid ""
    18791917"Point scheduled for {date}. <a href=\"{preview_url}\" "
     
    18811919msgstr ""
    18821920
    1883 #: src/models/02-globe-point.php:92
     1921#: src/models/02-globe-point.php:105
    18841922msgid "Point draft updated. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    18851923msgstr ""
    18861924
    1887 #: src/models/02-globe-point.php:95
     1925#: src/models/02-globe-point.php:108
    18881926msgid "Marker updated. Yay!"
    18891927msgstr ""
    18901928
    1891 #: src/models/02-globe-point.php:96
     1929#: src/models/02-globe-point.php:109
    18921930msgid "%s Marker updated. Yay!"
    18931931msgstr ""
    18941932
    1895 #: src/models/02-globe-point.php:97
     1933#: src/models/02-globe-point.php:110
    18961934msgid "Marker not updated, somebody is editing it"
    18971935msgstr ""
    18981936
    1899 #: src/models/02-globe-point.php:98
     1937#: src/models/02-globe-point.php:111
    19001938msgid "%s Marker not updated, somebody is editing them"
    19011939msgstr ""
    19021940
    1903 #: src/models/02-globe-point.php:99
     1941#: src/models/02-globe-point.php:112
    19041942msgid "Marker permanetly deleted. Fahrenheit 451 team was here?"
    19051943msgstr ""
    19061944
    1907 #: src/models/02-globe-point.php:100
     1945#: src/models/02-globe-point.php:113
    19081946msgid "%s Marker permanently deleted. Why? :("
    19091947msgstr ""
    19101948
    1911 #: src/models/02-globe-point.php:101
     1949#: src/models/02-globe-point.php:114
    19121950msgid "Marker moved to the trash. I'm sad :("
    19131951msgstr ""
    19141952
    1915 #: src/models/02-globe-point.php:102
     1953#: src/models/02-globe-point.php:115
    19161954msgid "%s Marker moved to the trash. Why? :("
    19171955msgstr ""
    19181956
    1919 #: src/models/02-globe-point.php:103
     1957#: src/models/02-globe-point.php:116
    19201958msgid "Marker recovered from trash. Well done!"
    19211959msgstr ""
    19221960
    1923 #: src/models/02-globe-point.php:104
     1961#: src/models/02-globe-point.php:117
    19241962msgid "%s Marker saved from the enemies!"
    19251963msgstr ""
    19261964
    1927 #: src/models/02-globe-point.php:108
     1965#: src/models/02-globe-point.php:121
    19281966msgid "Enter Marker name here"
    19291967msgstr ""
    19301968
    1931 #: src/models/02-globe-point.php:194 src/models/03-globe-line.php:337
    1932 #: src/models/04-globe-region.php:284 src/models/06-globe-html.php:217
     1969#: 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
    19331971msgid "Globe rel"
    19341972msgstr ""
     
    19461984msgstr ""
    19471985
    1948 #: src/models/03-globe-line.php:69 src/models/03-globe-line.php:71
    1949 #: src/models/03-globe-line.php:72 src/models/03-globe-line.php:83
     1986#: 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
    19501988msgid "Lines"
    19511989msgstr ""
    19521990
    1953 #: src/models/03-globe-line.php:70
     1991#: src/models/03-globe-line.php:81
    19541992msgid "Line"
    19551993msgstr ""
    19561994
    1957 #: src/models/03-globe-line.php:74
     1995#: src/models/03-globe-line.php:85
    19581996msgid "Create New Line"
    19591997msgstr ""
    19601998
    1961 #: src/models/03-globe-line.php:76
     1999#: src/models/03-globe-line.php:87
    19622000msgid "New Line"
    19632001msgstr ""
    19642002
    1965 #: src/models/03-globe-line.php:77
     2003#: src/models/03-globe-line.php:88
    19662004msgid "View Line"
    19672005msgstr ""
    19682006
    1969 #: src/models/03-globe-line.php:78
     2007#: src/models/03-globe-line.php:89
    19702008msgid "View Lines"
    19712009msgstr ""
    19722010
    1973 #: src/models/03-globe-line.php:79
     2011#: src/models/03-globe-line.php:90
    19742012msgid "Search Lines"
    19752013msgstr ""
    19762014
    1977 #: src/models/03-globe-line.php:80
     2015#: src/models/03-globe-line.php:91
    19782016msgid "No Lines found."
    19792017msgstr ""
    19802018
    1981 #: src/models/03-globe-line.php:81
     2019#: src/models/03-globe-line.php:92
    19822020msgid "No Lines found in Trash."
    19832021msgstr ""
    19842022
    1985 #: src/models/03-globe-line.php:84
     2023#: src/models/03-globe-line.php:95
    19862024msgid "Line Archives"
    19872025msgstr ""
    19882026
    1989 #: src/models/03-globe-line.php:85
     2027#: src/models/03-globe-line.php:96
    19902028msgid "Line Attributes"
    19912029msgstr ""
    19922030
    1993 #: src/models/03-globe-line.php:86
     2031#: src/models/03-globe-line.php:97
    19942032msgid "Insert into Line"
    19952033msgstr ""
    19962034
    1997 #: src/models/03-globe-line.php:87
     2035#: src/models/03-globe-line.php:98
    19982036msgid "Uploaded to this Line"
    19992037msgstr ""
    20002038
    2001 #: src/models/03-globe-line.php:88
     2039#: src/models/03-globe-line.php:99
    20022040msgid "Filter Line list"
    20032041msgstr ""
    20042042
    2005 #: src/models/03-globe-line.php:89
     2043#: src/models/03-globe-line.php:100
    20062044msgid "Line list navigation"
    20072045msgstr ""
    20082046
    2009 #: src/models/03-globe-line.php:90
     2047#: src/models/03-globe-line.php:101
    20102048msgid "Line list"
    20112049msgstr ""
    20122050
    2013 #: src/models/03-globe-line.php:91
     2051#: src/models/03-globe-line.php:102
    20142052msgid "Line Cover Image"
    20152053msgstr ""
    20162054
    2017 #: src/models/03-globe-line.php:92
     2055#: src/models/03-globe-line.php:103
    20182056msgid "Set Line Cover Image"
    20192057msgstr ""
    20202058
    2021 #: src/models/03-globe-line.php:93
     2059#: src/models/03-globe-line.php:104
    20222060msgid "Remove Line Cover"
    20232061msgstr ""
    20242062
    2025 #: src/models/03-globe-line.php:94
     2063#: src/models/03-globe-line.php:105
    20262064msgid "Use as Line Cover"
    20272065msgstr ""
    20282066
    2029 #: src/models/03-globe-line.php:98
     2067#: src/models/03-globe-line.php:109
    20302068msgid ""
    20312069"Line information updated. <a href=\"{permalink}\" target=\"_blank\">View "
     
    20332071msgstr ""
    20342072
    2035 #: src/models/03-globe-line.php:99
     2073#: src/models/03-globe-line.php:110
    20362074msgid "Line info updated"
    20372075msgstr ""
    20382076
    2039 #: src/models/03-globe-line.php:102
     2077#: src/models/03-globe-line.php:113
    20402078msgid "Line content restored from revision"
    20412079msgstr ""
    20422080
    2043 #: src/models/03-globe-line.php:103
     2081#: src/models/03-globe-line.php:114
    20442082msgid "Line Published"
    20452083msgstr ""
    20462084
    2047 #: src/models/03-globe-line.php:104
     2085#: src/models/03-globe-line.php:115
    20482086msgid "Line information saved."
    20492087msgstr ""
    20502088
    2051 #: src/models/03-globe-line.php:105
     2089#: src/models/03-globe-line.php:116
    20522090msgid "Line submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    20532091msgstr ""
    20542092
    2055 #: src/models/03-globe-line.php:106
     2093#: src/models/03-globe-line.php:117
    20562094msgid ""
    20572095"Line scheduled for {date}. <a href=\"{preview_url}\" "
     
    20592097msgstr ""
    20602098
    2061 #: src/models/03-globe-line.php:107
     2099#: src/models/03-globe-line.php:118
    20622100msgid "Line draft updated. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    20632101msgstr ""
    20642102
    2065 #: src/models/03-globe-line.php:110
     2103#: src/models/03-globe-line.php:121
    20662104msgid "Line updated. Yay!"
    20672105msgstr ""
    20682106
    2069 #: src/models/03-globe-line.php:111
     2107#: src/models/03-globe-line.php:122
    20702108msgid "%s Line updated. Yay!"
    20712109msgstr ""
    20722110
    2073 #: src/models/03-globe-line.php:112
     2111#: src/models/03-globe-line.php:123
    20742112msgid "Line not updated, somebody is editing it"
    20752113msgstr ""
    20762114
    2077 #: src/models/03-globe-line.php:113
     2115#: src/models/03-globe-line.php:124
    20782116msgid "%s Line not updated, somebody is editing them"
    20792117msgstr ""
    20802118
    2081 #: src/models/03-globe-line.php:114
     2119#: src/models/03-globe-line.php:125
    20822120msgid "Line permanetly deleted. Fahrenheit 451 team was here?"
    20832121msgstr ""
    20842122
    2085 #: src/models/03-globe-line.php:115
     2123#: src/models/03-globe-line.php:126
    20862124msgid "%s Line permanently deleted. Why? :("
    20872125msgstr ""
    20882126
    2089 #: src/models/03-globe-line.php:116
     2127#: src/models/03-globe-line.php:127
    20902128msgid "Line moved to the trash. I'm sad :("
    20912129msgstr ""
    20922130
    2093 #: src/models/03-globe-line.php:117
     2131#: src/models/03-globe-line.php:128
    20942132msgid "%s Line moved to the trash. Why? :("
    20952133msgstr ""
    20962134
    2097 #: src/models/03-globe-line.php:118
     2135#: src/models/03-globe-line.php:129
    20982136msgid "Line recovered from trash. Well done!"
    20992137msgstr ""
    21002138
    2101 #: src/models/03-globe-line.php:119
     2139#: src/models/03-globe-line.php:130
    21022140msgid "%s Line saved from the enemies!"
    21032141msgstr ""
    21042142
    2105 #: src/models/03-globe-line.php:123
     2143#: src/models/03-globe-line.php:134
    21062144msgid "Enter Line name here"
    21072145msgstr ""
    21082146
    2109 #: src/models/03-globe-line.php:151 src/models/04-globe-region.php:213
     2147#: src/models/03-globe-line.php:162 src/models/04-globe-region.php:224
    21102148msgid "Details."
    21112149msgstr ""
    21122150
    2113 #: src/models/03-globe-line.php:158
     2151#: src/models/03-globe-line.php:169
    21142152msgid "Enter manually"
    21152153msgstr ""
    21162154
    2117 #: src/models/03-globe-line.php:159
     2155#: src/models/03-globe-line.php:170
    21182156msgid "Connect existing markers"
    21192157msgstr ""
    21202158
    2121 #: src/models/03-globe-line.php:166
     2159#: src/models/03-globe-line.php:177
    21222160msgid "Add More End Points"
    21232161msgstr ""
    21242162
    2125 #: src/models/03-globe-line.php:167
     2163#: src/models/03-globe-line.php:178
    21262164msgid "Locations to connect"
    21272165msgstr ""
    21282166
    2129 #: src/models/03-globe-line.php:190
     2167#: src/models/03-globe-line.php:201
    21302168msgid "Line Info"
    21312169msgstr ""
    21322170
    2133 #: src/models/03-globe-line.php:227
     2171#: src/models/03-globe-line.php:238
    21342172msgid "Add More Markers"
    21352173msgstr ""
    21362174
    2137 #: src/models/03-globe-line.php:239
     2175#: src/models/03-globe-line.php:250
    21382176msgid "Select Marker"
    21392177msgstr ""
    21402178
    2141 #: src/models/03-globe-line.php:269
     2179#: src/models/03-globe-line.php:280
    21422180msgid "Line Color"
    21432181msgstr ""
     
    21592197msgstr ""
    21602198
    2161 #: src/models/04-globe-region.php:134 src/models/04-globe-region.php:136
    2162 #: src/models/04-globe-region.php:137 src/models/04-globe-region.php:148
     2199#: 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
    21632201msgid "Regions"
    21642202msgstr ""
    21652203
    2166 #: src/models/04-globe-region.php:135
     2204#: src/models/04-globe-region.php:146
    21672205msgid "Region"
    21682206msgstr ""
    21692207
    2170 #: src/models/04-globe-region.php:139
     2208#: src/models/04-globe-region.php:150
    21712209msgid "Create New Region"
    21722210msgstr ""
    21732211
    2174 #: src/models/04-globe-region.php:141
     2212#: src/models/04-globe-region.php:152
    21752213msgid "New Region"
    21762214msgstr ""
    21772215
    2178 #: src/models/04-globe-region.php:142
     2216#: src/models/04-globe-region.php:153
    21792217msgid "View Region"
    21802218msgstr ""
    21812219
    2182 #: src/models/04-globe-region.php:143
     2220#: src/models/04-globe-region.php:154
    21832221msgid "View Regions"
    21842222msgstr ""
    21852223
    2186 #: src/models/04-globe-region.php:144
     2224#: src/models/04-globe-region.php:155
    21872225msgid "Search Regions"
    21882226msgstr ""
    21892227
    2190 #: src/models/04-globe-region.php:145
     2228#: src/models/04-globe-region.php:156
    21912229msgid "No Regions found."
    21922230msgstr ""
    21932231
    2194 #: src/models/04-globe-region.php:146
     2232#: src/models/04-globe-region.php:157
    21952233msgid "No Regions found in Trash."
    21962234msgstr ""
    21972235
    2198 #: src/models/04-globe-region.php:149
     2236#: src/models/04-globe-region.php:160
    21992237msgid "Region Archives"
    22002238msgstr ""
    22012239
    2202 #: src/models/04-globe-region.php:150
     2240#: src/models/04-globe-region.php:161
    22032241msgid "Region Attributes"
    22042242msgstr ""
    22052243
    2206 #: src/models/04-globe-region.php:151
     2244#: src/models/04-globe-region.php:162
    22072245msgid "Insert into Region"
    22082246msgstr ""
    22092247
    2210 #: src/models/04-globe-region.php:152
     2248#: src/models/04-globe-region.php:163
    22112249msgid "Uploaded to this Region"
    22122250msgstr ""
    22132251
    2214 #: src/models/04-globe-region.php:153
     2252#: src/models/04-globe-region.php:164
    22152253msgid "Filter Region list"
    22162254msgstr ""
    22172255
    2218 #: src/models/04-globe-region.php:154
     2256#: src/models/04-globe-region.php:165
    22192257msgid "Region list navigation"
    22202258msgstr ""
    22212259
    2222 #: src/models/04-globe-region.php:155
     2260#: src/models/04-globe-region.php:166
    22232261msgid "Region list"
    22242262msgstr ""
    22252263
    2226 #: src/models/04-globe-region.php:156
     2264#: src/models/04-globe-region.php:167
    22272265msgid "Region Cover Image"
    22282266msgstr ""
    22292267
    2230 #: src/models/04-globe-region.php:157
     2268#: src/models/04-globe-region.php:168
    22312269msgid "Set Region Cover Image"
    22322270msgstr ""
    22332271
    2234 #: src/models/04-globe-region.php:158
     2272#: src/models/04-globe-region.php:169
    22352273msgid "Remove Region Cover"
    22362274msgstr ""
    22372275
    2238 #: src/models/04-globe-region.php:159
     2276#: src/models/04-globe-region.php:170
    22392277msgid "Use as Region Cover"
    22402278msgstr ""
    22412279
    2242 #: src/models/04-globe-region.php:163
     2280#: src/models/04-globe-region.php:174
    22432281msgid ""
    22442282"Region information updated. <a href=\"{permalink}\" target=\"_blank\">View "
     
    22462284msgstr ""
    22472285
    2248 #: src/models/04-globe-region.php:164
     2286#: src/models/04-globe-region.php:175
    22492287msgid "Region info updated"
    22502288msgstr ""
    22512289
    2252 #: src/models/04-globe-region.php:167
     2290#: src/models/04-globe-region.php:178
    22532291msgid "Region content restored from revision"
    22542292msgstr ""
    22552293
    2256 #: src/models/04-globe-region.php:168
     2294#: src/models/04-globe-region.php:179
    22572295msgid "Region Published"
    22582296msgstr ""
    22592297
    2260 #: src/models/04-globe-region.php:169
     2298#: src/models/04-globe-region.php:180
    22612299msgid "Region information saved."
    22622300msgstr ""
    22632301
    2264 #: src/models/04-globe-region.php:170
     2302#: src/models/04-globe-region.php:181
    22652303msgid "Region submitted. <a href=\"{preview_url}\" target=\"_blank\">Preview</a>"
    22662304msgstr ""
    22672305
    2268 #: src/models/04-globe-region.php:171
     2306#: src/models/04-globe-region.php:182
    22692307msgid ""
    22702308"Region scheduled for {date}. <a href=\"{preview_url}\" "
     
    22722310msgstr ""
    22732311
    2274 #: src/models/04-globe-region.php:172
     2312#: src/models/04-globe-region.php:183
    22752313msgid ""
    22762314"Region draft updated. <a href=\"{preview_url}\" "
     
    22782316msgstr ""
    22792317
    2280 #: src/models/04-globe-region.php:175
     2318#: src/models/04-globe-region.php:186
    22812319msgid "Region updated. Yay!"
    22822320msgstr ""
    22832321
    2284 #: src/models/04-globe-region.php:176
     2322#: src/models/04-globe-region.php:187
    22852323msgid "%s Region updated. Yay!"
    22862324msgstr ""
    22872325
    2288 #: src/models/04-globe-region.php:177
     2326#: src/models/04-globe-region.php:188
    22892327msgid "Region not updated, somebody is editing it"
    22902328msgstr ""
    22912329
    2292 #: src/models/04-globe-region.php:178
     2330#: src/models/04-globe-region.php:189
    22932331msgid "%s Region not updated, somebody is editing them"
    22942332msgstr ""
    22952333
    2296 #: src/models/04-globe-region.php:179
     2334#: src/models/04-globe-region.php:190
    22972335msgid "Region permanetly deleted. Fahrenheit 451 team was here?"
    22982336msgstr ""
    22992337
    2300 #: src/models/04-globe-region.php:180
     2338#: src/models/04-globe-region.php:191
    23012339msgid "%s Region permanently deleted. Why? :("
    23022340msgstr ""
    23032341
    2304 #: src/models/04-globe-region.php:181
     2342#: src/models/04-globe-region.php:192
    23052343msgid "Region moved to the trash. I'm sad :("
    23062344msgstr ""
    23072345
    2308 #: src/models/04-globe-region.php:182
     2346#: src/models/04-globe-region.php:193
    23092347msgid "%s Region moved to the trash. Why? :("
    23102348msgstr ""
    23112349
    2312 #: src/models/04-globe-region.php:183
     2350#: src/models/04-globe-region.php:194
    23132351msgid "Region recovered from trash. Well done!"
    23142352msgstr ""
    23152353
    2316 #: src/models/04-globe-region.php:184
     2354#: src/models/04-globe-region.php:195
    23172355msgid "%s Region saved from the enemies!"
    23182356msgstr ""
    23192357
    2320 #: src/models/04-globe-region.php:188
     2358#: src/models/04-globe-region.php:199
    23212359msgid "Enter Region name here"
    23222360msgstr ""
    23232361
    2324 #: src/models/04-globe-region.php:220
     2362#: src/models/04-globe-region.php:231
    23252363msgid "Select a region"
    23262364msgstr ""
    23272365
    2328 #: src/models/04-globe-region.php:221
     2366#: src/models/04-globe-region.php:232
    23292367msgid "Region Code *"
    23302368msgstr ""
    23312369
    2332 #: src/models/04-globe-region.php:224
     2370#: src/models/04-globe-region.php:235
    23332371msgid "Fetching regions from: "
    23342372msgstr ""
    23352373
    2336 #: src/models/04-globe-region.php:273
     2374#: src/models/04-globe-region.php:284
    23372375msgid "Border Color"
    23382376msgstr ""
    23392377
    2340 #: src/models/04-globe-region.php:274
     2378#: src/models/04-globe-region.php:285
    23412379msgid ""
    23422380"This color will be used for the border of this individual "
     
    23462384msgstr ""
    23472385
    2348 #: src/models/06-globe-html.php:19
     2386#: src/models/06-globe-html.php:30
    23492387msgid "Clone HTML Marker"
    23502388msgstr ""
    23512389
    2352 #: src/models/06-globe-html.php:20
     2390#: src/models/06-globe-html.php:31
    23532391msgid "Create a copy of this HTML Marker"
    23542392msgstr ""
    23552393
    2356 #: src/models/06-globe-html.php:56
     2394#: src/models/06-globe-html.php:67
    23572395msgid "HTML Marker"
    23582396msgstr ""
    23592397
    2360 #: src/models/06-globe-html.php:60
     2398#: src/models/06-globe-html.php:71
    23612399msgid "Create New HTML Marker"
    23622400msgstr ""
    23632401
    2364 #: src/models/06-globe-html.php:62
     2402#: src/models/06-globe-html.php:73
    23652403msgid "New HTML Marker"
    23662404msgstr ""
    23672405
    2368 #: src/models/06-globe-html.php:63
     2406#: src/models/06-globe-html.php:74
    23692407msgid "View HTML Marker"
    23702408msgstr ""
    23712409
    2372 #: src/models/06-globe-html.php:64
     2410#: src/models/06-globe-html.php:75
    23732411msgid "View HTML Markers"
    23742412msgstr ""
    23752413
    2376 #: src/models/06-globe-html.php:65
     2414#: src/models/06-globe-html.php:76
    23772415msgid "Search HTML Markers"
    23782416msgstr ""
    23792417
    2380 #: src/models/06-globe-html.php:66
     2418#: src/models/06-globe-html.php:77
    23812419msgid "No HTML Markers found."
    23822420msgstr ""
    23832421
    2384 #: src/models/06-globe-html.php:67
     2422#: src/models/06-globe-html.php:78
    23852423msgid "No HTML Markers found in Trash."
    23862424msgstr ""
    23872425
    2388 #: src/models/06-globe-html.php:70
     2426#: src/models/06-globe-html.php:81
    23892427msgid "HTML Marker Archives"
    23902428msgstr ""
    23912429
    2392 #: src/models/06-globe-html.php:71
     2430#: src/models/06-globe-html.php:82
    23932431msgid "HTML Marker Attributes"
    23942432msgstr ""
    23952433
    2396 #: src/models/06-globe-html.php:72
     2434#: src/models/06-globe-html.php:83
    23972435msgid "Insert into HTML Marker"
    23982436msgstr ""
    23992437
    2400 #: src/models/06-globe-html.php:73
     2438#: src/models/06-globe-html.php:84
    24012439msgid "Uploaded to this Point"
    24022440msgstr ""
    24032441
    2404 #: src/models/06-globe-html.php:74
     2442#: src/models/06-globe-html.php:85
    24052443msgid "Filter Point list"
    24062444msgstr ""
    24072445
    2408 #: src/models/06-globe-html.php:75
     2446#: src/models/06-globe-html.php:86
    24092447msgid "Point list navigation"
    24102448msgstr ""
    24112449
    2412 #: src/models/06-globe-html.php:76
     2450#: src/models/06-globe-html.php:87
    24132451msgid "Point list"
    24142452msgstr ""
    24152453
    2416 #: src/models/06-globe-html.php:77
     2454#: src/models/06-globe-html.php:88
    24172455msgid "HTML Marker Cover Image"
    24182456msgstr ""
    24192457
    2420 #: src/models/06-globe-html.php:78
     2458#: src/models/06-globe-html.php:89
    24212459msgid "Set HTML Marker Cover Image"
    24222460msgstr ""
    24232461
    2424 #: src/models/06-globe-html.php:79
     2462#: src/models/06-globe-html.php:90
    24252463msgid "Remove HTML Marker Cover"
    24262464msgstr ""
    24272465
    2428 #: src/models/06-globe-html.php:80
     2466#: src/models/06-globe-html.php:91
    24292467msgid "Use as HTML Marker Cover"
    24302468msgstr ""
    24312469
    2432 #: src/models/06-globe-html.php:84
     2470#: src/models/06-globe-html.php:95
    24332471msgid ""
    24342472"HTML Marker information updated. <a href=\"{permalink}\" "
     
    24362474msgstr ""
    24372475
    2438 #: src/models/06-globe-html.php:85
     2476#: src/models/06-globe-html.php:96
    24392477msgid "HTML Marker info updated"
    24402478msgstr ""
    24412479
    2442 #: src/models/06-globe-html.php:88
     2480#: src/models/06-globe-html.php:99
    24432481msgid "HTML Marker content restored from revision"
    24442482msgstr ""
    24452483
    2446 #: src/models/06-globe-html.php:89
     2484#: src/models/06-globe-html.php:100
    24472485msgid "HTML Marker Published"
    24482486msgstr ""
    24492487
    2450 #: src/models/06-globe-html.php:90
     2488#: src/models/06-globe-html.php:101
    24512489msgid "HTML Marker information saved."
    24522490msgstr ""
    24532491
    2454 #: src/models/06-globe-html.php:91
     2492#: src/models/06-globe-html.php:102
    24552493msgid ""
    24562494"HTML Marker submitted. <a href=\"{preview_url}\" "
     
    24582496msgstr ""
    24592497
    2460 #: src/models/06-globe-html.php:92
     2498#: src/models/06-globe-html.php:103
    24612499msgid ""
    24622500"HTML Marker scheduled for {date}. <a href=\"{preview_url}\" "
     
    24642502msgstr ""
    24652503
    2466 #: src/models/06-globe-html.php:93
     2504#: src/models/06-globe-html.php:104
    24672505msgid ""
    24682506"HTML Marker draft updated. <a href=\"{preview_url}\" "
     
    24702508msgstr ""
    24712509
    2472 #: src/models/06-globe-html.php:96
     2510#: src/models/06-globe-html.php:107
    24732511msgid "HTML Marker updated. Yay!"
    24742512msgstr ""
    24752513
    2476 #: src/models/06-globe-html.php:97
     2514#: src/models/06-globe-html.php:108
    24772515msgid "%s HTML Marker updated. Yay!"
    24782516msgstr ""
    24792517
    2480 #: src/models/06-globe-html.php:98
     2518#: src/models/06-globe-html.php:109
    24812519msgid "HTML Marker not updated, somebody is editing it"
    24822520msgstr ""
    24832521
    2484 #: src/models/06-globe-html.php:99
     2522#: src/models/06-globe-html.php:110
    24852523msgid "%s HTML Marker not updated, somebody is editing them"
    24862524msgstr ""
    24872525
    2488 #: src/models/06-globe-html.php:100
     2526#: src/models/06-globe-html.php:111
    24892527msgid "HTML Marker permanetly deleted. Fahrenheit 451 team was here?"
    24902528msgstr ""
    24912529
    2492 #: src/models/06-globe-html.php:101
     2530#: src/models/06-globe-html.php:112
    24932531msgid "%s HTML Marker permanently deleted. Why? :("
    24942532msgstr ""
    24952533
    2496 #: src/models/06-globe-html.php:102
     2534#: src/models/06-globe-html.php:113
    24972535msgid "HTML Marker moved to the trash. I'm sad :("
    24982536msgstr ""
    24992537
    2500 #: src/models/06-globe-html.php:103
     2538#: src/models/06-globe-html.php:114
    25012539msgid "%s HTML Marker moved to the trash. Why? :("
    25022540msgstr ""
    25032541
    2504 #: src/models/06-globe-html.php:104
     2542#: src/models/06-globe-html.php:115
    25052543msgid "HTML Marker recovered from trash. Well done!"
    25062544msgstr ""
    25072545
    2508 #: src/models/06-globe-html.php:105
     2546#: src/models/06-globe-html.php:116
    25092547msgid "%s HTML Marker saved from the enemies!"
    25102548msgstr ""
    25112549
    2512 #: src/models/06-globe-html.php:109
     2550#: src/models/06-globe-html.php:120
    25132551msgid "Enter HTML Marker name here"
    25142552msgstr ""
    25152553
    2516 #: src/models/06-globe-html.php:193
     2554#: src/models/06-globe-html.php:204
    25172555msgid "Define individual click action and template."
    25182556msgstr ""
     
    26032641
    26042642#: 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:606
    26062643msgid "Are you sure?"
    26072644msgstr ""
    26082645
    26092646#: 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:607
    26112647msgid "Please enter %s or more characters"
    26122648msgstr ""
    26132649
    26142650#: 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:608
    26162651msgid "Searching..."
    26172652msgstr ""
    26182653
    26192654#: 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:609
    26212655msgid "No results found."
    26222656msgstr ""
    26232657
    26242658#: 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:710
    26262659msgid "Oops! Not allowed."
    26272660msgstr ""
     
    26292662#: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.php:778
    26302663#: 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:778
    2632 #: vendor-prefixed/saltus/framework/lib/codestar-framework/classes/setup.class.phpsetup.class.php:782
    26332664msgid "Field not found!"
    26342665msgstr ""
     
    30533084msgstr ""
    30543085
    3055 #: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:175
    3056 msgid "Initial"
    3057 msgstr ""
    3058 
    30593086#: vendor-prefixed/saltus/framework/lib/codestar-framework/fields/typography/typography.php:184
    30603087msgid "Font Variant"
     
    31743201msgstr ""
    31753202
    3176 #: vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php:139
    3177 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:408
     3203#: vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php:158
     3204#: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:472
    31783205msgid "Author"
    31793206msgstr ""
    31803207
    3181 #: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:404
     3208#: vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php:468
    31823209msgid "All Authors"
    31833210msgstr ""
    31843211
    3185 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:68
     3212#: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:89
    31863213msgid "Item cannot be found. Please select one to duplicate."
    31873214msgstr ""
    31883215
    3189 #: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:72
     3216#: vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php:96
    31903217msgid "Please select an item to duplicate."
    31913218msgstr ""
  • interactive-globes/tags/1.4.8/src/models/01-globe-dotlabel.php

    r3269027 r3274550  
    99$action_content_editor = isset( $options['actionContent_editor'] ) && ! empty( $options['actionContent_editor'] ) ? $options['actionContent_editor'] : 'text';
    1010$public_cpts           = isset( $options['public_cpts'] ) && $options['public_cpts'] ? true : false;
    11 
    1211
    1312$dot_labels = [
     
    3130        'admin_filters' => array(
    3231            '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',
    3737            ),
    3838        ),
     
    4949                'orderby'  => 'meta_value_num',
    5050                '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;
    6055                    }
     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 );
    6162                },
    6263            ),
     
    247248];
    248249
    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 ) {
     250function 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
     284add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'itt_globes_add_itt_globe_dotlabel_post_type', 10, 2 );
     285function itt_globes_add_itt_globe_dotlabel_post_type( $post_types ) {
    251286    $post_types[] = 'itt_globe_dotlabel';
    252287    return $post_types;
    253288}
    254289
    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 ) {
     290add_filter( 'itt_globes/render/post_setup_meta', 'itt_globes_add_dotlabel_to_shortcode', 10, 2 );
     291function itt_globes_add_dotlabel_to_shortcode( $globe_meta, $globe_id ) {
    257292
    258293    if ( $globe_id === 0 ) {
  • interactive-globes/tags/1.4.8/src/models/02-globe-point.php

    r3269027 r3274550  
    99$public_cpts           = isset( $options['public_cpts'] ) && $options['public_cpts'] ? true : false;
    1010
    11 
    1211$points = [
    1312    'active'       => true,
     
    1514    'name'         => 'itt_globe_point',
    1615    'features'     => [
    17         'quick_edit'    => true,
    18         'single_export' => true,
    1916        'duplicate'     => array(
    2017            'label'      => __( 'Clone Point', 'interactive-globes' ),
    2118            'attr_title' => __( 'Create a copy of this point', 'interactive-globes' ),
    2219        ),
     20        'single_export' => array(
     21            'label' => __( 'Download Points Export File', 'interactive-globes' ),
     22        ),
    2323        'admin_filters' => array(
    2424            '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(
    3233            'title',
    3334            'id'       => array(
     
    4344                    global $post;
    4445                    $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;
    5248                    }
     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 );
    5355                },
    5456            ),
     
    239241];
    240242
    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 ) {
     243function 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
     277add_filter( 'itt_globes/meta/remove_meta_box_post_types', 'itt_globes_add_itt_globe_point_post_type', 10, 2 );
     278function itt_globes_add_itt_globe_point_post_type( $post_types ) {
    243279    $post_types[] = 'itt_globe_point';
    244280    return $post_types;
    245281}
    246282
    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 ) {
     283add_filter( 'itt_globes/render/post_setup_meta', 'itt_globes_add_point_to_shortcode', 10, 2 );
     284function itt_globes_add_point_to_shortcode( $globe_meta, $globe_id ) {
    249285
    250286    if ( $globe_id === 0 ) {
     
    330366}
    331367
    332 
    333368$points = apply_filters( 'itt_globes/point/model', $points );
    334369return $points;
  • interactive-globes/tags/1.4.8/vendor-prefixed/autoload.php

    r3269027 r3274550  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
    2320require_once __DIR__ . '/composer/autoload_real.php';
    2421
    25 return ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f::getLoader();
     22return ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0::getLoader();
  • interactive-globes/tags/1.4.8/vendor-prefixed/composer/autoload_classmap.php

    r3263746 r3274550  
    148148    'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/Duplicate.php',
    149149    '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',
    153150    'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $vendorDir . '/saltus/framework/src/Features/Meta/CodestarMeta.php',
    154151    '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  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f
     5class ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0
    66{
    77    private static $loader;
     
    2323        }
    2424
    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);
    2826        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0', 'loadClassLoader'));
    3028
    3129        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::getInitializer($loader));
    3331
    3432        $loader->setClassMapAuthoritative(true);
  • interactive-globes/tags/1.4.8/vendor-prefixed/composer/autoload_static.php

    r3269027 r3274550  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f
     7class ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    173173        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/Duplicate.php',
    174174        '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',
    178175        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CodestarMeta.php',
    179176        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/Meta.php',
     
    306303    {
    307304        return \Closure::bind(function () use ($loader) {
    308             $loader->prefixLengthsPsr4 = ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f::$prefixLengthsPsr4;
    309             $loader->prefixDirsPsr4 = ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f::$prefixDirsPsr4;
    310             $loader->classMap = ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f::$classMap;
     305            $loader->prefixLengthsPsr4 = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$prefixLengthsPsr4;
     306            $loader->prefixDirsPsr4 = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$prefixDirsPsr4;
     307            $loader->classMap = ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0::$classMap;
    311308
    312309        }, null, ClassLoader::class);
  • interactive-globes/tags/1.4.8/vendor-prefixed/composer/installed.json

    r3263746 r3274550  
    7373                "type": "git",
    7474                "url": "https://github.com/SaltusDev/saltus-framework.git",
    75                 "reference": "930112677d90dbf2c783698d800d8234594fa836"
     75                "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56"
    7676            },
    7777            "dist": {
    7878                "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",
    8181                "shasum": ""
    8282            },
    8383            "require": {
    84                 "hassankhan/config": "^3.1.0",
     84                "hassankhan/config": "^3.2.0",
    8585                "php": ">=7.2"
    8686            },
    8787            "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"
    9099            },
    91             "time": "2025-02-18T13:11:29+00:00",
     100            "time": "2025-04-16T08:50:13+00:00",
    92101            "type": "project",
    93102            "installation-source": "dist",
     
    107116            "scripts": {
    108117                "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"
    110125                ]
    111126            },
  • interactive-globes/tags/1.4.8/vendor-prefixed/hassankhan/config/src/Config.php

    r3263746 r3274550  
    88use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface;
    99use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface;
    10 
    1110/**
    1211 * Configuration reader and writer for PHP.
     
    2625     * @var array
    2726     */
    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'];
    3828    /**
    3929     * All formats supported by Config.
     
    4131     * @var array
    4232     */
    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'];
    5234    /**
    5335     * Static method for loading a Config instance.
     
    6345        return new static($values, $parser, $string);
    6446    }
    65 
    6647    /**
    6748     * Loads a Config instance.
     
    7859            $this->loadFromFile($values, $parser);
    7960        }
    80 
    8161        parent::__construct($this->data);
    8262    }
    83 
    8463    /**
    8564     * Loads configuration from file.
     
    9271    protected function loadFromFile($path, ?ParserInterface $parser = null)
    9372    {
    94         $paths      = $this->getValidPath($path);
     73        $paths = $this->getValidPath($path);
    9574        $this->data = [];
    96 
    9775        foreach ($paths as $path) {
    9876            if ($parser === null) {
    9977                // Get file information
    100                 $info      = pathinfo($path);
    101                 $parts     = explode('.', $info['basename']);
     78                $info = pathinfo($path);
     79                $parts = explode('.', $info['basename']);
    10280                $extension = array_pop($parts);
    103 
    10481                // Skip the `dist` extension
    10582                if ($extension === 'dist') {
    10683                    $extension = array_pop($parts);
    10784                }
    108 
    10985                // Get file parser
    11086                $parser = $this->getParser($extension);
    111 
    11287                // Try to load file
    11388                $this->data = array_replace_recursive($this->data, $parser->parseFile($path));
    114 
    11589                // Clean parser
    11690                $parser = null;
     
    12195        }
    12296    }
    123 
    12497    /**
    12598     * Writes configuration to file.
     
    134107        if ($writer === null) {
    135108            // Get file information
    136             $info      = pathinfo($filename);
    137             $parts     = explode('.', $info['basename']);
     109            $info = pathinfo($filename);
     110            $parts = explode('.', $info['basename']);
    138111            $extension = array_pop($parts);
    139 
    140112            // Skip the `dist` extension
    141113            if ($extension === 'dist') {
    142114                $extension = array_pop($parts);
    143115            }
    144 
    145116            // Get file writer
    146117            $writer = $this->getWriter($extension);
    147 
    148118            // Try to save file
    149119            $writer->toFile($this->all(), $filename);
    150 
    151120            // Clean writer
    152121            $writer = null;
     
    156125        }
    157126    }
    158 
    159127    /**
    160128     * Loads configuration from string.
     
    166134    {
    167135        $this->data = [];
    168 
    169136        // Try to parse string
    170137        $this->data = array_replace_recursive($this->data, $parser->parseString($configuration));
    171138    }
    172 
    173139    /**
    174140     * Writes configuration to string.
     
    181147        return $writer->toString($this->all(), $pretty);
    182148    }
    183 
    184149    /**
    185150     * Gets a parser for a given file extension.
     
    187152     * @param  string $extension
    188153     *
    189      * @return Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface
     154     * @return \Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Parser\ParserInterface
    190155     *
    191156     * @throws UnsupportedFormatException If `$extension` is an unsupported file format
     
    198163            }
    199164        }
    200 
    201165        // If none exist, then throw an exception
    202166        throw new UnsupportedFormatException('Unsupported configuration format');
    203167    }
    204 
    205168    /**
    206169     * Gets a writer for a given file extension.
     
    208171     * @param  string $extension
    209172     *
    210      * @return Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface
     173     * @return \Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\Writer\WriterInterface
    211174     *
    212175     * @throws UnsupportedFormatException If `$extension` is an unsupported file format
     
    219182            }
    220183        }
    221 
    222184        // 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    }
    226187    /**
    227188     * Gets an array of paths
     
    236197    {
    237198        $paths = [];
    238 
    239199        foreach ($path as $unverifiedPath) {
    240200            try {
     
    246206                    continue;
    247207                }
    248 
    249208                $optionalPath = ltrim($unverifiedPath, '?');
    250209                $paths = array_merge($paths, $this->getValidPath($optionalPath));
     
    254213                    continue;
    255214                }
    256 
    257215                // Otherwise rethrow the exception
    258216                throw $e;
    259217            }
    260218        }
    261 
    262219        return $paths;
    263220    }
    264 
    265221    /**
    266222     * Checks `$path` to see if it is either an array, a directory, or a file.
     
    280236            return $this->getPathFromArray($path);
    281237        }
    282 
    283238        // If `$path` is a directory
    284239        if (is_dir($path)) {
    285240            $paths = glob($path . '/*.*');
    286241            if (empty($paths)) {
    287                 throw new EmptyDirectoryException("Configuration directory: [$path] is empty");
    288             }
    289 
     242                throw new EmptyDirectoryException("Configuration directory: [{$path}] is empty");
     243            }
    290244            return $paths;
    291245        }
    292 
    293246        // If `$path` is not a file, throw an exception
    294247        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        }
    298250        return [$path];
    299251    }
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Core.php

    r3263746 r3274550  
    3838
    3939    // Prefixes to use.
    40     const HOOK_PREFIX    = '';
     40    const HOOK_PREFIX    = 'saltus/framework/';
    4141    const SERVICE_PREFIX = '';
    4242
     
    109109        $this->modeler = new Modeler( $model_factory );
    110110        $project_path  = $this->project['path'];
     111        /** @deprecated 1.2.0 */
    111112        $priority = apply_filters( 'saltus_modeler_priority', 1 );
     113        $priority = apply_filters( 'saltus/framework/modeler/priority', 1 );
    112114        add_action(
    113115            'init',
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminCols/AdminCols.php

    r3263746 r3274550  
    2626     */
    2727    public static function make( $name, $project, $args ) {
    28         return new SaltusAdminCols( $name, $project, $args );
     28        return new SaltusAdminCols( $name, $args );
    2929    }
    3030
     
    4141        return is_admin();
    4242    }
    43 
    4443}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php

    r3263746 r3274550  
    1515 * Enable custom administration columns
    1616 *
    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
    1819 */
    1920final class SaltusAdminCols implements Processable {
    2021
     22    /**
     23     * @var string $name The name of the custom post type (CPT)
     24     */
    2125    private $name;
    22     private $project;
     26
     27    /**
     28     * @var array $args List of columns
     29     */
    2330    private $args;
    2431
     
    2633     * @var array Default columns
    2734     */
    28     private $default_columns;
    29 
    30     /**
    31      * @var array Managed columsn
    32      */
    33     private $managed_columns = null;
     35    private $default_columns = null;
     36
     37    /**
     38     * @var array Managed columns
     39     */
     40    private ?array $managed_columns = null;
    3441
    3542    /**
    3643     * Instantiate this Service object.
    3744     *
    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;
    4351    }
    4452
     
    5260        add_filter( 'manage_posts_columns',                       [ $this, 'log_default_cols' ], 0 );
    5361        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
    5773        add_action( 'load-edit.php',                              [ $this, 'default_sort' ] );
    5874        add_filter( 'pre_get_posts',                              [ $this, 'maybe_sort_by_fields' ] );
     
    7389
    7490    /**
    75      * Adds our custom 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.
    7995     */
    8096    public function sortables( array $cols ): array {
     
    99115     * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-columns
    100116     *
    101      * @param array $cols Associative array of columns
    102      * @return array Updated array of columns
     117     * @param array<string,string> $cols Associative array of columns
     118     * @return array<string,string> Updated array of columns
    103119     */
    104120    public function manage_columns( array $cols ): array {
     
    121137        }
    122138
    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 ) {
    125144            if ( is_string( $col ) && isset( $cols[ $col ] ) ) {
    126145                # Existing (ie. built-in) column with id as the value
     
    137156                    $k = 'author';
    138157                }
    139                 $new_cols[ $k ] = esc_html__( 'Author', 'extended-cpts' );
     158                $new_cols[ $k ] = esc_html__( 'Author', 'saltus-framework' );
    140159            } elseif ( is_array( $col ) ) {
    141160                if ( isset( $col['cap'] ) && ! current_user_can( $col['cap'] ) ) {
     
    146165                    $new_cols[ $id ] = call_user_func( $col['title_cb'], $col );
    147166                } else {
    148                     $title = esc_html( $col['title'] ?? $this->get_item_title( $col ) ?? $id );
     167                    $title = esc_html( $this->get_item_title( $col, $id ) );
    149168
    150169                    if ( isset( $col['title_icon'] ) ) {
     
    172191     * Returns a sensible title for the current item (usually the arguments array for a column)
    173192     *
    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'] ) ) {
    179202            $tax = get_taxonomy( $item['taxonomy'] );
    180203            if ( $tax ) {
     
    201224            ) ) );
    202225        }
    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 {
    212236        # Shorthand:
    213237        $c = $this->args;
    214238
    215         # We're only interested in our custom columns:
     239        # We're only interested in the custom columns:
    216240        $custom_cols = array_filter( array_keys( $c ) );
    217241
     
    221245
    222246        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 ) {
    223252            return;
    224253        }
     
    229258
    230259        if ( isset( $c[ $col ]['function'] ) ) {
    231             call_user_func( $c[ $col ]['function'] );
     260            call_user_func( $c[ $col ]['function'], $post );
    232261        } 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 ] );
    234263        } 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 ] );
    236265        } 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 ] );
    238267        } 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 ] );
    240269        }
    241270    }
     
    244273     * Outputs column data for a post meta field.
    245274     *
    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 );
    251281        $echo = [];
    252282
     
    257287                $args['date_format'] = get_option( 'date_format' );
    258288            }
    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'] );
    273290        } else {
    274291            foreach ( $vals as $val ) {
    275 
    276292                if ( ! empty( $val ) || ( $val === '0' ) ) {
    277293                    $echo[] = $val;
     
    286302        }
    287303    }
     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    }
    288333
    289334    /**
    290335     * Outputs column data for a taxonomy's term names.
    291336     *
    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 );
    301348        if ( is_wp_error( $terms ) ) {
    302349            echo esc_html( $terms->get_error_message() );
    303350            return;
    304351        }
    305 
    306352        if ( empty( $terms ) ) {
    307353            printf(
     
    316362        foreach ( $terms as $term ) {
    317363            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 );
    363365            } else {
    364366                $out[] = esc_html( $term->name );
     
    368370        echo implode( ', ', $out );
    369371    }
    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    }
    371429    /**
    372430     * Outputs column data for a post field.
    373431     *
    374      * @param string $field The post field
    375      * @param array  $args  Array of arguments for this field
    376      */
    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 {
    379437        switch ( $field ) {
    380438
     
    414472                echo esc_html( get_post_field( $field, $post ) );
    415473                break;
    416 
    417474        }
    418475    }
     
    421478     * Outputs column data for a post's featured image.
    422479     *
    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 {
    427485        if ( ! function_exists( 'has_post_thumbnail' ) ) {
    428486            return;
     
    495553     * Sets the relevant query vars for sorting posts by our admin sortables.
    496554     *
    497      * @param WP_Query $wp_query The current `WP_Query` object.
     555     * @param \WP_Query $wp_query The current `WP_Query` object.
    498556     */
    499557    public function maybe_sort_by_fields( \WP_Query $wp_query ) {
     
    514572
    515573    /**
    516      * Filters the query's SQL clauses so we can sort posts by 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
    521579     */
    522580    public function maybe_sort_by_taxonomy( array $clauses, \WP_Query $wp_query ): array {
     
    538596     * sort it by the requested orderby field.
    539597     *
    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` or
    542      *                         `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.
    544602     */
    545603    public static function get_sort_field_vars( array $vars, array $sortables ): array {
     
    556614        }
    557615
    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'] ) {
    565623            return [];
    566624        }
     
    568626        $return = [];
    569627
    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'];
    572630            $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'] );
    576636            $return['orderby'] = $field;
    577637        }
     
    588648     * sort it by the requested orderby field.
    589649     *
    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` or
    593      *                         `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.
    595655     */
    596656    public static function get_sort_taxonomy_clauses( array $clauses, array $vars, array $sortables ): array {
     
    609669        }
    610670
    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'] ) ) {
    622682            return [];
    623683        }
     
    632692            ON ( ext_cpts_tt.term_id = ext_cpts_t.term_id )
    633693        ";
    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'] );
    635695        $clauses['groupby']  = 'ext_cpts_tr.object_id';
    636696        $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  
    2626     */
    2727    public static function make( $name, $project, $args ) {
    28         return new SaltusAdminFilters( $name, $project, $args );
     28        return new SaltusAdminFilters( $name, $args );
    2929    }
    3030
     
    4141        return is_admin();
    4242    }
    43 
    4443}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php

    r3263746 r3274550  
    99 * Enable custom administration filters
    1010 *
    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
    1214 */
    1315final class SaltusAdminFilters implements Processable {
    1416
     17    /**
     18     * @var string $name The name of the custom post type (CPT)
     19     */
    1520    private $name;
    16     private $project;
     21
     22    /**
     23     * @var array $args List of filters
     24     */
    1725    private $args;
    1826
    19     public $site_filters;
     27    /**
     28     * @var array $site_filters List of filters
     29     */
     30    public $site_filters = [];
    2031
    2132    /**
    2233     * Instantiate this Service object.
    2334     *
    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     */
    3250    public function process() {
    33 
    3451        add_action( 'load-edit.php',         [ $this, 'default_filter' ] );
    3552        add_filter( 'pre_get_posts',         [ $this, 'maybe_filter' ] );
     
    4865        # Loop over our filters to find the default filter (if there is one):
    4966        foreach ( $this->args as $id => $filter ) {
    50             if ( isset( $_GET[ $id ] ) && '' !== $_GET[ $id ] ) {
     67            // phpcs:ignore WordPress.Security.NonceVerification
     68            if ( empty( $_GET[ $id ] ) ) {
    5169                continue;
    5270            }
     
    6280     * Filters posts by our custom admin filters.
    6381     *
    64      * @param WP_Query $wp_query A `WP_Query` object
     82     * @param \WP_Query $wp_query A `WP_Query` object
    6583     */
    6684    public function maybe_filter( \WP_Query $wp_query ) {
     
    95113     *                          `site_filters` argument when registering an extended post type).
    96114     * @param string $post_type The post type name.
     115     *
    97116     * @return array The list of private query vars to apply to the query.
    98117     */
    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 {
    100119        $return = [];
    101120
     
    104123            $date_query = [];
    105124
    106             if ( ! isset( $query[ $filter_key ] ) || ( '' === $query[ $filter_key ] ) ) {
     125            if ( ! isset( $query[ $filter_key ] ) || ( $query[ $filter_key ] === '' ) ) {
    107126                continue;
    108127            }
     
    112131            }
    113132
     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
    114148            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
    119153            } 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          = [
    123156                    'compare' => 'LIKE',
    124157                ];
     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
    125162            } elseif ( isset( $filter['meta_key_exists'] ) ) {
    126                 $meta_query = [
    127                     'key'     => wp_unslash( $query[ $filter_key ] ),
     163                // default to EXISTS
     164                $meta_query        = [
    128165                    'compare' => 'EXISTS',
    129166                ];
     167                $meta_query        = array_merge( $meta_query, $filter );
     168                $meta_query['key'] = wp_unslash( $query[ $filter_key ] );
     169
    130170            } elseif ( isset( $filter['meta_exists'] ) ) {
    131                 $meta_query = [
    132                     'key'     => wp_unslash( $query[ $filter_key ] ),
     171                // default to NOT IN
     172                $meta_query          = [
    133173                    'compare' => 'NOT IN',
    134                     'value'   => [ '', '0', 'false', 'null' ],
    135174                ];
     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
    136179            } elseif ( isset( $filter['post_date'] ) ) {
    137180                $date_query = [
     
    164207
    165208    /**
    166      * Add our filter 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 {
    172215        $filters = array_keys( $this->site_filters );
    173216
     
    180223     * @return string The post type name.
    181224     */
    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' ) {
    184229            return get_current_screen()->post_type;
    185         } else {
    186             return '';
    187         }
     230        }
     231        return '';
    188232    }
    189233
     
    193237     * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-filters
    194238     */
    195     public function filters() {
     239    public function filters(): void {
    196240        global $wpdb;
    197241
     
    202246        $pto = get_post_type_object( $this->name );
    203247
    204         foreach ( $this->args as $filter_key => $filter ) {
     248        foreach ( $this->args as $filter_id => $filter ) {
    205249            if ( isset( $filter['cap'] ) && ! current_user_can( $filter['cap'] ) ) {
    206250                continue;
    207251            }
    208252
    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}";
    212259
    213260            if ( has_action( $hook ) ) {
     
    215262                 * Allows a filter's output to be overridden.
    216263                 *
    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.
    222267                 */
     268                // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    223269                do_action( $hook, $this, $filter, $id );
    224270                continue;
     
    232278                }
    233279
    234                 $walker = new WalkerTaxonomyDropdown( [
    235                     'field' => 'slug',
    236                 ] );
     280                $walker = new WalkerTaxonomyDropdown(
     281                    [
     282                        'field' => 'slug',
     283                    ]
     284                );
    237285
    238286                # If we haven't specified a title, use the all_items label from the taxonomy:
     
    264312                # If we haven't specified a title, generate one from the meta key:
    265313                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                    );
    270322                    $filter['title'] = ucwords( $filter['title'] ) . 's';
    271323                    $filter['title'] = sprintf( 'All %s', $filter['title'] );
     
    274326                # If we haven't specified a label, generate one from the meta key:
    275327                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                    );
    280336                    $filter['label'] = ucwords( $filter['label'] );
    281337                    $filter['label'] = sprintf( 'Filter by %s', $filter['label'] );
     
    284340                if ( ! isset( $filter['options'] ) ) {
    285341                    # 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                    );
    295355                } elseif ( is_callable( $filter['options'] ) ) {
    296356                    $filter['options'] = call_user_func( $filter['options'] );
     
    302362
    303363                $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                        }
    311371                    }
    312372                }
     
    335395                # If we haven't specified a title, generate one from the meta key:
    336396                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                    );
    341405                    $filter['title'] = ucwords( $filter['title'] );
    342406                }
     
    357421                $fields   = $filter['meta_exists'] ?? $filter['meta_key_exists'];
    358422
    359                 if ( 1 === count( $fields ) ) {
     423                if ( count( $fields ) === 1 ) {
    360424                    # Output a checkbox:
    361425                    foreach ( $fields as $v => $t ) {
     
    402466
    403467                if ( ! isset( $filter['title'] ) ) {
    404                     $filter['title'] = __( 'All Authors', 'extended-cpts' );
     468                    $filter['title'] = __( 'All Authors', 'saltus-framework' );
    405469                }
    406470
    407471                if ( ! isset( $filter['label'] ) ) {
    408                     $filter['label'] = __( 'Author', 'extended-cpts' );
     472                    $filter['label'] = __( 'Author', 'saltus-framework' );
    409473                }
    410474
     
    417481                if ( ! isset( $filter['options'] ) ) {
    418482                    # 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                    );
    424493                } elseif ( is_callable( $filter['options'] ) ) {
    425494                    $filter['options'] = call_user_func( $filter['options'] );
     
    431500
    432501                # 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    }
    445515}
    446 
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php

    r3263746 r3274550  
    1111
    1212    /**
    13      * @var string
     13     * @var string $tree_type The type of tree structure being used (e.g., 'category').
    1414     */
    1515    public $tree_type = 'category';
    1616
    1717    /**
    18      * @var array
     18     * @var array<string> $db_fields Database fields used for parent/child relationships and term IDs.
    1919     */
    2020    public $db_fields = [
     
    3131     * Class constructor.
    3232     *
    33      * @param array $args Optional arguments.
     33     * @param array|null $args Optional arguments.
     34     *                         - 'field': The field to use for the dropdown value.
    3435     */
    3536    public function __construct( $args = null ) {
     
    4344     *
    4445     * @param string $output            Passed by reference. Used to append additional content.
    45      * @param object $object            Term data object.
     46     * @param object $term_object       Term data object.
    4647     * @param int    $depth             Depth of term in reference to parents.
    4748     * @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
    4854     * @param int    $current_object_id Current object ID.
    4955     */
    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 ) {
    5157        $pad = str_repeat( '&nbsp;', $depth * 3 );
    5258        $tax = get_taxonomy( $args['taxonomy'] );
    5359
    5460        if ( $this->field ) {
    55             $value = $object->{$this->field};
     61            $value = $term_object->{$this->field};
    5662        } else {
    57             $value = $tax->hierarchical ? $object->term_id : $object->name;
     63            $value = $tax->hierarchical ? $term_object->term_id : $term_object->name;
    5864        }
    5965
    60         if ( empty( $object->term_id ) && ! $tax->hierarchical ) {
     66        if ( empty( $term_object->term_id ) && ! $tax->hierarchical ) {
    6167            $value = '';
    6268        }
    6369
    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 ) . '"';
    6674
    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 ) ) {
    6876            $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 ) ) {
    7078            $output .= ' selected="selected"';
    7179        }
     
    7583
    7684        if ( $args['show_count'] ) {
    77             $output .= '&nbsp;&nbsp;(' . esc_html( number_format_i18n( $object->count ) ) . ')';
     85            $output .= '&nbsp;&nbsp;(' . esc_html( number_format_i18n( $term_object->count ) ) . ')';
    7886        }
    7987
    8088        $output .= "</option>\n";
    8189    }
    82 
    8390}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php

    r3263746 r3274550  
    1111
    1212/**
     13 * Class DragAndDrop
     14 *
     15 * Enable an option to manage drag and drop functionality in the admin area.
    1316 */
    1417class DragAndDrop implements Service, Conditional, Actionable, Assembly {
     
    2124
    2225    /**
     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    /**
    2335     * Create a new instance of the service provider
    2436     *
     
    2638     */
    2739    public static function make( $name, $project, $args ) {
    28         return new SaltusDragAndDrop( $name, $project, $args );
     40        return new SaltusDragAndDrop( $name, $project );
    2941    }
    3042
    3143    /**
    32      * Check whether the conditional service is currently needed.
     44     * Update menu drag and drop in the database
    3345     *
    34      * @return bool Whether the conditional service is needed.
    3546     */
    36     public static function is_needed(): bool {
    37 
    38         /*
    39          * This service loads in most screens:
    40          * - admin: in the edit screen
    41          * - ajax:  while updating menu order
    42          * - front: during pre_get_posts, etc
    43          */
    44         return is_admin();
    45     }
    46 
    4747    public function add_action() {
    4848        $actions = new UpdateMenuDragAndDrop();
    4949        $actions->add_action();
    5050    }
    51 
    5251}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php

    r3263746 r3274550  
    1515     *
    1616     */
    17     public function __construct( string $name, array $project, ...$args ) {
     17    public function __construct( string $name, array $project ) {
    1818        $this->project = $project;
    1919        $this->name    = $name;
     
    7171
    7272        wp_enqueue_style( 'drag_drop_order', $this->project['root_url'] . '/Feature/DragAndDrop/order.css', array(), '1' );
    73 
    7473    }
    7574
     
    141140        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    142141        $query_result = $wpdb->query( $query_prepared );
    143 
    144142    }
    145143
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php

    r3263746 r3274550  
    77
    88/**
     9 * Class UpdateMenuDragAndDrop
     10 *
     11 * Handles the drag-and-drop functionality for updating menu order.
    912 */
    1013class UpdateMenuDragAndDrop implements Actionable {
     
    1619    public function __construct() {}
    1720
     21
     22    /**
     23     * Register the WordPress action for handling the AJAX request.
     24     */
    1825    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' ) );
    2027    }
    2128
     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     */
    2235    public function update_menu_order() {
    2336        global $wpdb;
     
    3750        // can't trust much parse_str
    3851        parse_str( $_POST['order'], $data );
    39 
    40         if ( ! is_array( $data ) ) {
    41             return false;
    42         }
    4352
    4453        $id_arr = array();
     
    7786        }
    7887
    79         do_action( 'saltus/dad/update_menu_order' );
     88        do_action( 'saltus/framework/drop_and_drop/update_menu_order' );
    8089    }
    8190}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php

    r3263746 r3274550  
    2525     */
    2626    public static function make( $name, $project, $args ) {
    27         return new SaltusDuplicate( $name, $project, $args );
     27        return new SaltusDuplicate( $name, $args );
    2828    }
    2929
     
    4343        return is_admin();
    4444    }
    45 
    4645}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php

    r3263746 r3274550  
    1313final class SaltusDuplicate implements Processable {
    1414
     15    /**
     16     * @var string $name The name of the custom post type (CPT)
     17     */
    1518    private $name;
     19
     20    /**
     21     * @var string $label The label for duplicate link.
     22     */
    1623    private $label;
     24
     25    /**
     26     * @var string $attr_title The title for the duplicate link.
     27     */
    1728    private $attr_title;
    1829
    1930    /**
    20      * Instantiate this Service object.
     31     * Constructor.
    2132     *
     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.
    2237     */
    23     public function __construct( string $name, array $project = null, array $args ) {
     38    public function __construct( string $name, array $args ) {
    2439        $this->name       = $name;
    2540        $this->label      = ! empty( $args['label'] ) ? $args['label'] : 'Duplicate';
     
    3449        add_filter( 'page_row_actions', array( $this, 'row_link' ), 10, 2 );
    3550
    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' ) );
    3752    }
    3853
    3954    /*
    4055    * 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    *
    4162    */
    4263    public function row_link( $actions, $post ) {
     
    5374            '<a href="%1$s" title="%2$s" rel="permalink">%3$s</a>',
    5475            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,
    5677                basename( __FILE__ ),
    57                 'saltus_duplicate_nonce'
     78                'saltus_framework_duplicate_nonce'
    5879            ),
    5980            esc_attr( $this->attr_title ),
     
    6687
    6788        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' );
    6990
    7091        // 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' ) );
    7397        }
    7498
    7599        // 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__ ) ) ) {
    77102            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    78103            wp_die( $error_msg );
     
    84109
    85110        // duplicate the post
     111        // @phpstan-ignore identical.alwaysFalse
    86112        if ( ! isset( $post ) || $post === null ) {
    87113            return;
     
    106132
    107133        // insert the new post
     134        // @phpstan-ignore argument.type
    108135        $new_post_id = wp_insert_post( $args );
    109136
     
    128155            return;
    129156        }
    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 )";
    132159        foreach ( $query_result as $post_meta ) {
    133160
     
    147174        $post_type = get_post_type( $post_id );
    148175
     176        /** @deprecated 1.2.0 */
    149177        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 );
    150179
    151180        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  
    1010final class CodestarMeta implements Processable {
    1111
     12    /**
     13     * @var string $name The name of the custom post type (CPT)
     14     */
    1215    private $name;
     16
     17    /**
     18     * @var array $meta The meta fields
     19     */
    1320    private $meta;
    1421
    1522    /**
    1623     * 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 ) {
    1929        $this->name = $name;
    2030        $this->meta = $meta;
    2131    }
    2232
     33    /**
     34     * Process the functionality
     35     */
    2336    public function process() {
    2437
     
    3144            }
    3245
    33             // else add just the fields
     46            // add just the fields and register rest api
    3447            $this->create_metabox( $box_id, $box );
     48            $this->register_rest_api( $box_id, $box );
    3549        }
    3650    }
     
    3953     * Create metabox
    4054     *
    41      * @param int   $box_id identifier of the metabox
    42      * @param array $box_settings paramaters for the page
    43      * @return void
     55     * @param mixed $box_id       Identifier of the metabox
     56     * @param array $box_settings Paramaters for the box
     57     *
    4458     */
    4559    private function create_metabox( $box_id, $box_settings ) {
     
    7791        }
    7892
    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 );
    85131                    }
    86132                }
    87133            }
    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     */
    109144    private function setup_restapi_fields( $fields ) {
    110145        $rest_fields = [];
    111         $rest_types  = $this->match_fields( $this->list_fields() );
     146        $rest_types  = $this->match_fields();
    112147        foreach ( $fields as $name => $attributes ) {
    113148            if ( empty( $attributes['type'] ) ) {
     
    125160        return $rest_fields;
    126161    }
     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     */
    127171    private function create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ) {
    128172
    129         $rest_types = $this->match_fields( $this->list_fields() );
     173        $rest_types = $this->match_fields();
    130174        $rest_type  = $this->get_field_type( $meta_type, $rest_types );
    131175
     
    151195    }
    152196
     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     */
    153205    private function create_meta_fields_serialized( $meta_fields, $meta_name, $post_type ) {
    154206
     
    180232    }
    181233
    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        ];
    183287
    184288        // 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 ) {
    301308        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 ];
    311316    }
    312317
     
    314319     * Create section using builtin Codestart method
    315320     *
    316      * @param string $id - identifier of the section
    317      * @param array  $section - parameters for the section
     321     * @param string $id      Identifier of the section
     322     * @param array  $section Parameters for the section
    318323     * @return void
    319324     */
     
    329334     * Prepare fields to make sure they have all necessary parameters
    330335     *
    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
    333339     */
    334340    private function prepare_fields( $fields ) {
     
    354360     * Function to sanitize meta on save
    355361     *
    356      * @param array $request with meta info
    357      * @param int $post_id
    358      * @param obj $csf class
     362     * @param $request with meta info
     363     * @param $post_id
     364     * @param $csf class
    359365     * @return array
    360366     */
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php

    r3263746 r3274550  
    99
    1010/**
     11 * Class Meta
     12 *
     13 * Enable an option to manage meta fields
    1114 */
    1215final class Meta implements Service, Conditional, Assembly {
     16
     17    /**
     18     * Instantiate this Service object.
     19     *
     20     */
     21    public function __construct() {}
    1322
    1423    /**
     
    2534
    2635    /**
    27      * Instantiate this Service object.
     36     * Create a new instance of the service provider
    2837     *
    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.
    3641     *
    3742     * @return object The new instance
    3843     */
    3944    public static function make( $name, $project, $args ) {
    40         return new CodestarMeta( $name, $project, $args );
     45        return new CodestarMeta( $name, $args );
    4146    }
    42 
    4347}
    44 
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/RememberTabs/RememberTabs.php

    r3263746 r3274550  
    99
    1010/**
     11 * Class RememberTabs
     12 *
     13 * Enable an option to remember the last active tab in the admin area.
    1114 */
    1215class RememberTabs implements Service, Conditional, Assembly {
     
    1720     */
    1821    public function __construct() {}
    19 
    20     /**
    21      * Create a new instance of the service provider
    22      *
    23      * @return object The new instance
    24      */
    25     public static function make( $name, $project, $args ) {
    26         return new SaltusRememberTabs( $name, $project, $args );
    27     }
    2822
    2923    /**
     
    4034    }
    4135
     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    }
    4248}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php

    r3263746 r3274550  
    88final class SaltusRememberTabs implements Processable {
    99
     10    /**
     11     * @var string $name The name of the custom post type (CPT)
     12     */
    1013    private $name;
     14
     15    /**
     16     * @var string $name Project information.
     17     */
    1118    private $project;
    1219
    13         /**
     20    /**
    1421     * Instantiate this Service object.
    1522     *
     23     * @param string $name The name of the custom post type (CPT)
     24     * @param array  $project Project information.
    1625     */
    17     public function __construct( string $name, array $project, array $args = null ) {
     26    public function __construct( string $name, array $project ) {
     27        $this->name    = $name;
    1828        $this->project = $project;
    19         $this->name    = $name;
    2029    }
    2130
     31    /**
     32     * Process the functionality
     33     */
    2234    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 );
    2537    }
    26 
     38    /**
     39     * Check if the script and CSS should be loaded
     40     *
     41     * @return bool
     42     */
    2743    private function check_load_script_css() {
    2844
     
    3955    }
    4056
     57    /**
     58     * Load the script and CSS
     59     */
    4160    public function load_script_css() {
    4261
     
    4564        }
    4665
    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        );
    4973    }
    5074
     
    5377     * Used to remember tab
    5478     *
    55      * @param string $link
    56      * @return string
     79     * @param string $link Admin url
     80     * @return string The url
    5781     */
    5882    public function check_remember_tab_url( $link ) {
    5983
    6084        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() ) {
    6286            return $link;
    6387        }
    6488
    65         if( isset( $_REQUEST['tab'] ) ) {
     89        if ( isset( $_REQUEST['tab'] ) ) {
    6690            $params['tab'] = absint( $_REQUEST['tab'] );
    67             $link = add_query_arg( $params, $link );
     91            $link          = add_query_arg( $params, $link );
    6892        }
    69 
    7093
    7194        return $link;
    7295    }
    73 
    7496}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Settings/CodestarSettings.php

    r3263746 r3274550  
    66};
    77
    8 final class CodestarSettings implements Processable{
     8final class CodestarSettings implements Processable {
    99
     10    /**
     11     * @var string $name The name of the custom post type (CPT)
     12     */
    1013    private $name;
     14
     15    /**
     16     * @var array $settings The settings to be used for the settings page.
     17     */
    1118    private $settings;
    1219
    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 = [] ) {
    1427        $this->name     = $name;
    1528        $this->settings = $settings;
    1629    }
    1730
     31    /**
     32     * Process the settings
     33     */
    1834    public function process() {
    1935        /**
     
    6581            }
    6682        }
    67 
    6883    }
    6984
     
    7186     * Create section using builtin Codestart method
    7287     *
    73      * @param string $id - identifier of the section
     88     * @param mixed $id - identifier of the section
    7489     * @param array  $section - parameters for the section
    7590     * @return void
    7691     */
    7792    private function create_section( $id, $section ) {
    78 
    7993        \Saltus_WP_Plugin_InteractiveGlobes_CSF::createSection( $id, $section );
    80 
    8194    }
    8295
     
    98111
    99112            if ( isset( $field['fields'] ) ) {
    100 
    101113                $field['fields'] = $this->prepare_fields( $field['fields'] );
    102 
    103114            }
    104115        }
     
    107118        return array_values( $fields );
    108119    }
    109 
    110 
    111120}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/Settings/Settings.php

    r3263746 r3274550  
    99
    1010/**
     11 * Class Settings
     12 *
     13 * Enable an option to create Settings page
    1114 */
    1215final class Settings implements Service, Conditional, Assembly {
     16
     17    /**
     18     * Instantiate this Service object.
     19     *
     20     */
     21    public function __construct() {}
    1322
    1423    /**
     
    1827     */
    1928    public static function is_needed(): bool {
     29
    2030        /*
    2131         * Only load this sample service on the admin backend.
    22          * If this conditional returns false, the service is never even
    23          * instantiated.
    2432         */
    2533        return \is_admin();
     
    2735
    2836    /**
    29      * Instantiate this Service object.
     37     * Create a new instance of the service provider
    3038     *
    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.
    3842     *
    3943     * @return object The new instance
    4044     */
    4145    public static function make( $name, $project, $args ) {
    42         return new CodestarSettings( $name, $project, $args );
     46        return new CodestarSettings( $name, $args );
    4347    }
    44 
    4548}
    46 
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php

    r3263746 r3274550  
    77
    88/**
     9 * Class SaltusSingleExport
     10 *
    911 * Enable an option to export single entry
    1012 *
     
    1315final class SaltusSingleExport implements Processable {
    1416
     17    /**
     18     * @var string $name The name of the custom post type (CPT) to export.
     19     */
    1520    private $name;
     21
     22    /**
     23     * @var string $label The label for the export link.
     24     */
    1625    private $label;
    1726
    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     */
    1931    const FAKE_DATE = '1970-01-05'; // Y-m-d
    2032
    2133    /**
    22      * Instantiate this Service object.
     34     * Constructor.
    2335     *
     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.
    2439     */
    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';
    2843    }
    2944
     45    /**
     46     * Process the export functionality by hooking into WordPress actions.
     47     */
    3048    public function process() {
    3149        add_action( 'init', array( $this, 'init' ) );
     
    3452    /**
    3553     * Get hooked in: Part II
     54     * Initialize the export functionality.
     55     *
     56     * Hooks into WordPress filters and actions to enable single entry export.
    3657     *
    3758     */
     
    4566        add_filter( 'query', array( $this, 'query' ) );
    4667        add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ) );
     68    }
    4769
    48     }
    4970    /**
    5071     * Insert our action link into the submit box
     72     *
     73     * @param \WP_Post $post The current post object.
    5174     *
    5275     */
     
    5477
    5578        // 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 ) {
    5780            return;
    5881        }
     
    6487            color: #82878c;
    6588            font: normal 20px/1 dashicons;
    66             speak: none;
    6789            display: inline-block;
    6890            padding: 0 3px 0 0;
     
    89111
    90112    /**
    91      * Modify export arguments
    92      * except if normal export
     113     * Modify export arguments.
    93114     *
    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.
    96120     */
    97121    public function export_args( $args ) {
     
    116140
    117141    /**
    118      * Filter query
    119      * Look for 'tagged' query, replace with one matching the needs
     142     * Filter the SQL query for single entry export.
    120143     *
    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.
    123149     */
    124150    public function query( $query ) {
     
    158184        return $query;
    159185    }
    160 
    161186}
    162187
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Features/SingleExport/SingleExport.php

    r3263746 r3274550  
    88};
    99
    10 
    1110/**
     11 * Class SingleExport
     12 *
     13 * Enable an option to export single entry
    1214 */
    1315class SingleExport implements Service, Conditional, Assembly {
     
    1820     */
    1921    public function __construct() {}
    20 
    21     /**
    22      * Create a new instance of the service provider
    23      *
    24      * @return object The new instance
    25      */
    26     public static function make( $name, $project, $args ) {
    27         return new SaltusSingleExport( $name, $project, $args );
    28     }
    2922
    3023    /**
     
    4134    }
    4235
     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    }
    4348}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/CanRegister.php

    r3263746 r3274550  
    1313     * @return void
    1414     */
    15     public function register( string $id, string $class, array $dependencies );
     15    public function register( string $id, string $service_class, array $dependencies );
    1616}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php

    r3263746 r3274550  
    1111        return new GenericContainer();
    1212    }
    13 
    1413}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php

    r3263746 r3274550  
    66use RuntimeException;
    77
    8 class FailedToMakeInstance
     8final class FailedToMakeInstance
    99    extends RuntimeException
    1010    implements SaltusFrameworkThrowable {
     
    3434        );
    3535
    36         return new static( $message, static::CIRCULAR_REFERENCE );
     36        return new self( $message, self::CIRCULAR_REFERENCE );
    3737    }
    3838
     
    5151        );
    5252
    53         return new static( $message, static::UNRESOLVED_INTERFACE );
     53        return new self( $message, self::UNRESOLVED_INTERFACE );
    5454    }
    5555
     
    6969        );
    7070
    71         return new static( $message, static::UNREFLECTABLE_CLASS );
     71        return new self( $message, self::UNREFLECTABLE_CLASS );
    7272    }
    7373
     
    7878     * @param string $argument_name Name of the argument that could not be
    7979     *                              resolved.
    80      * @param string $class        Class that had the argument in its
     80     * @param string $service_class Class that had the argument in its
    8181     *                              constructor.
    8282     * @return static
    8383     */
    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 ) {
    8585        $message = \sprintf(
    8686            'Could not resolve the argument "%s" while trying to instantiate the class "%s".',
    8787            $argument_name,
    88             $class
     88            $service_class
    8989        );
    9090
    91         return new static( $message, static::UNRESOLVED_ARGUMENT );
     91        return new self( $message, self::UNRESOLVED_ARGUMENT );
    9292    }
    9393
     
    9696     * reused but was not yet instantiated.
    9797     *
    98      * @param string $class Class that was not yet instantiated.
     98     * @param string $service_class Class that was not yet instantiated.
    9999     *
    100100     * @return static
    101101     */
    102     public static function for_uninstantiated_shared_instance( string $class ) {
     102    public static function for_uninstantiated_shared_instance( string $service_class ) {
    103103        $message = \sprintf(
    104104            'Could not retrieve the shared instance for "%s" as it was not instantiated yet.',
    105             $class
     105            $service_class
    106106        );
    107107
    108         return new static( $message, static::UNINSTANTIATED_SHARED_INSTANCE );
     108        return new self( $message, self::UNINSTANTIATED_SHARED_INSTANCE );
    109109    }
    110110
     
    113113     * for a class that doesn't have one.
    114114     *
    115      * @param string $class Class for which there is no delegate.
     115     * @param string $service_class Class for which there is no delegate.
    116116     *
    117117     * @return static
    118118     */
    119     public static function for_invalid_delegate( string $class ) {
     119    public static function for_invalid_delegate( string $service_class ) {
    120120        $message = \sprintf(
    121121            'Could not retrieve a delegate for "%s", none was defined.',
    122             $class
     122            $service_class
    123123        );
    124124
    125         return new static( $message, static::INVALID_DELEGATE );
     125        return new self( $message, self::INVALID_DELEGATE );
    126126    }
    127127}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/GenericContainer.php

    r3263746 r3274550  
    1414
    1515/**
     16 * Class GenericContainer
     17 *
    1618 * A simplified implementation of a service container.
    1719 *
    18  * Extend ArrayObject to have default implementations for iterators and
     20 * Extends ArrayObject to have default implementations for iterators and
    1921 * array access.
    2022 */
     
    2426
    2527    /**
    26      * Instanciates Services
     28     * @var Instantiator $instantiator Instantiates services.
    2729     */
    2830    protected $instantiator;
    2931
    3032    /**
    31      * Service Container
     33     * Constructor.
     34     *
     35     * Initializes the container with a fallback instantiator.
    3236     */
    3337    public function __construct() {
     
    5559
    5660    /**
    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.
    5962     *
    6063     * @param string $id Identifier of the service to look for.
    6164     *
    62      * @return bool
     65     * @return bool True if the service exists, false otherwise.
    6366     */
    6467    public function has( string $id ): bool {
     
    6972     * Put a service into the container for later retrieval.
    7073     *
    71      * @param string  $id      Identifier of the service to put into the
    72      *                         container.
     74     * @param string  $id      Identifier of the service.
    7375     * @param Service $service Service to put into the container.
    7476     */
     
    7880
    7981    /**
    80      * Register a single service, and adds it to the container
     82     * Register a single service, and add it to the container
    8183     *
    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.
    8487     */
    85     public function register( string $id, string $class, array $dependencies = null ) {
     88    public function register( string $id, string $service_class, ?array $dependencies = null ) {
    8689
    8790        // 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() ) {
    9093            return;
    9194        }
    9295
    93         $service = $this->instantiate( $class );
     96        $service = $this->instantiate( $service_class );
    9497
    9598        $this->put( $id, $service );
    96 
    9799    }
    98100
     
    101103     * Instantiate a single service.
    102104     *
    103      * @param string $class Service class to instantiate.
     105     * @param string $service_class Service class to instantiate.
    104106     *
    105107     * @throws Invalid If the service could not be properly instantiated.
     
    107109     * @return Service Instantiated service.
    108110     */
    109     private function instantiate( $class ): Service {
     111    private function instantiate( $service_class ): Service {
    110112
    111113        // The service needs to be registered, so instantiate right away.
    112         $service = $this->make( $class );
     114        $service = $this->make( $service_class );
    113115
    114116        if ( ! $service instanceof Service ) {
     
    122124     * Make an object instance out of an interface or class.
    123125     *
    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.
    129128     * @return object Instantiated object.
    130129     */
    131     private function make( string $interface_or_class, array $arguments = [] ) {
     130    private function make( string $interface_or_class, ?array $dependencies = [] ) {
    132131
    133132        $reflection = $this->get_class_reflection( $interface_or_class );
    134133        $this->ensure_is_instantiable( $reflection );
    135 
    136         $dependencies = [];
    137134
    138135        $object = $this->instantiator->instantiate( $interface_or_class, $dependencies );
     
    142139
    143140    /**
    144      * Get the reflection for a class or throw an exception.
     141     * Get the reflection for a class.
    145142     *
    146      * @param string $class Class to get the reflection for.
    147      * @return ReflectionClass Class reflection.
     143     * @param string $service_class Class name
    148144     * @throws FailedToMakeInstance If the class could not be reflected.
     145     * @return ReflectionClass      Class reflection.
    149146     */
    150     private function get_class_reflection( string $class ): ReflectionClass {
     147    private function get_class_reflection( string $service_class ): ReflectionClass {
    151148        try {
    152             return new ReflectionClass( $class );
     149            return new ReflectionClass( $service_class );
    153150        } catch ( SaltusFrameworkThrowable $exception ) {
    154             throw FailedToMakeInstance::for_unreflectable_class( $class );
     151            throw FailedToMakeInstance::for_unreflectable_class( $service_class );
    155152        }
    156153    }
     
    161158     *
    162159     * @param ReflectionClass $reflection Reflected class to check.
    163      * @return void
     160     *
    164161     * @throws FailedToMakeInstance If the interface could not be resolved.
    165162     */
     
    171168
    172169    /**
    173      * Get a fallback instantiator in case none was provided.
     170     * Get a fallback instantiator
    174171     *
    175172     * @return Instantiator Simplistic fallback instantiator.
     
    181178             * Make an object instance out of an interface or class.
    182179             *
    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             *
    185183             * @return object Instantiated object.
    186184             */
    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 );
    189187            }
    190188        };
    191 
    192189    }
    193190}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/Invalid.php

    r3263746 r3274550  
    55use InvalidArgumentException;
    66
    7 class Invalid
     7final class Invalid
    88    extends InvalidArgumentException
    99    implements SaltusFrameworkThrowable {
     
    2626        );
    2727
    28         return new static( $message );
     28        return new self( $message );
    2929    }
    3030
     
    4444        );
    4545
    46         return new static( $message );
     46        return new self( $message );
    4747    }
    4848}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Container/ServiceContainer.php

    r3263746 r3274550  
    9191     *
    9292     * @param string $id
    93      * @param string $class
    94      */
    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 ) {
    9696
    9797        // 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() ) {
    100100            return;
    101101        }
    102102
    103         $service = $this->instantiate( $class, $dependencies );
     103        $service = $this->instantiate( $service_class, $dependencies );
    104104
    105105        $this->put( $id, $service );
     
    111111        if ( $service instanceof Actionable ) {
    112112            $priority = 1;
    113             $filter = 'init';
     113            $filter   = 'init';
    114114            if ( method_exists( $service, 'priority' ) ) {
    115115                $priority = $service->priority();
     
    131131     * Instantiate a single service.
    132132     *
    133      * @param string $class Service class to instantiate.
     133     * @param string $service_class Service class to instantiate.
    134134     *
    135135     * @throws Invalid If the service could not be properly instantiated.
     
    137137     * @return Service Instantiated service.
    138138     */
    139     private function instantiate( $class, array $dependencies ): Service {
     139    private function instantiate( $service_class, array $dependencies ): Service {
    140140
    141141        // The service needs to be registered, so instantiate right away.
    142         $service = $this->make( $class, $dependencies );
     142        $service = $this->make( $service_class, $dependencies );
    143143
    144144        if ( ! $service instanceof Service ) {
     
    154154     * @param string $interface_or_class Interface or class to make an object
    155155     *                                   instance out of.
    156      * @param array  $arguments          Optional. Additional arguments to pass
     156     * @param array  $dependencies       Optional. Additional arguments to pass
    157157     *                                   to the constructor. Defaults to an
    158158     *                                   empty array.
     
    172172     * Get the reflection for a class or throw an exception.
    173173     *
    174      * @param string $class Class to get the reflection for.
     174     * @param string $service_class Class to get the reflection for.
    175175     * @return ReflectionClass Class reflection.
    176176     * @throws FailedToMakeInstance If the class could not be reflected.
    177177     */
    178     private function get_class_reflection( string $class ): ReflectionClass {
     178    private function get_class_reflection( string $service_class ): ReflectionClass {
    179179        try {
    180             return new ReflectionClass( $class );
     180            return new ReflectionClass( $service_class );
    181181        } catch ( SaltusFrameworkThrowable $exception ) {
    182             throw FailedToMakeInstance::for_unreflectable_class( $class );
     182            throw FailedToMakeInstance::for_unreflectable_class( $service_class );
    183183        }
    184184    }
     
    209209             * Make an object instance out of an interface or class.
    210210             *
    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.
    212212             * @param array  $dependencies Optional. Dependencies of the class.
    213213             * @return object Instantiated object.
    214214             */
    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 );
    217217            }
    218218        };
    219 
    220219    }
    221220}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Infrastructure/Service/Actionable.php

    r3263746 r3274550  
    1515
    1616    /**
    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.
    2018     */
    2119    public function add_action();
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Modeler.php

    r3263746 r3274550  
    1919        $this->model_factory = $model_factory;
    2020        // should contain a list of loaded models
    21 
    2221    }
    2322
     
    3736        $path = $project_path . '/src/models/';
    3837        if ( has_filter( 'saltus_models_path' ) ) {
     38            /** @deprecated 1.2.0 */
    3939            $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 );
    4043        }
    4144
     
    8184        // check for models added with filters
    8285        if ( has_filter( 'saltus_models' ) ) {
    83             $model  = apply_filters( 'saltus_models', [] );
     86            /** @deprecated 1.2.0 */
     87            $model = apply_filters( 'saltus_models', [] );
    8488            ( ! 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 ) :
    86105                    $this->create( $model )
    87106                );
     
    126145        $this->model_list[ $model->get_type() ] = $model;
    127146    }
    128 
    129147}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/BaseModel.php

    r3263746 r3274550  
    5656    protected $ui_labels;
    5757
     58    /**
     59     * Constructor.
     60     *
     61     * @param AbstractConfig $config_data The configuration data for the model.
     62     */
    5863    public function __construct( AbstractConfig $config_data ) {
    5964        $this->data   = $config_data->all();
     
    7479        // set messages to override
    7580        $this->set_messages( $config_data );
    76 
    7781    }
    7882
     
    9397     *
    9498     * Required to register post type
     99     *
     100     * @param string $name The name of the post type.
    95101     */
    96102    protected function set_name( string $name ) {
     
    102108     *
    103109     * Based on labels.overrides.ui values
     110     *
     111     * @param AbstractConfig $config The configuration labels for the model.
    104112     */
    105113    protected function set_ui_label_overrides( AbstractConfig $config ) {
     
    111119     *
    112120     * Based on labels.overrides.messages and label.overrides.bulk_messages values
     121     *
     122     * @param AbstractConfig $config The configuration labels for the model.
    113123     */
    114124    protected function set_messages( AbstractConfig $config ) {
     
    121131     *
    122132     * Based on name, or keys labels.has-one and labels.has-many
     133     *
     134     * @param AbstractConfig $config The configuration labels for the model.
    123135     */
    124136    protected function set_name_labels( AbstractConfig $config ) {
     
    146158     *
    147159     * Merge and/or replace defaults with user config
     160     *
     161     * @param array $options User defined options
    148162     */
    149163    protected function set_options( array $options ) {
     
    152166            return;
    153167        }
    154         if ( $this->data['options'] ) {
    155             $options = array_replace( $options, $this->data['options'] );
    156         }
     168
     169        $options = array_replace( $options, $this->data['options'] );
     170
    157171        $this->options = $options;
    158172    }
     
    162176     *
    163177     * If key labels.overrides exists, add to or replace label defaults
     178     *
     179     * @param array $labels User defined labels
    164180     */
    165181    protected function set_labels( array $labels ) {
     
    189205     *  10 => "Post draft updated. {Preview post}"
    190206     *
    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 {
    195212        global $post;
    196213
     
    229246                ( isset( $this->messages['post_updated_short'] ) ? str_replace( $search, $replace, $this->messages['post_updated_short'] ) :
    230247                    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 )
    234251                    )
    235252                ) :
     
    292309     * @param array[] $messages An array of bulk post updated message arrays keyed by post type.
    293310     * @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 {
    297315        $messages[ $this->name ] = [
    298316            'updated'   => isset( $this->bulk_messages['updated_singular'] ) && isset( $this->bulk_messages['updated_plural'] ) ?
     
    347365     * @param string $plural The text that will be used if $number is not 1
    348366     * @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;
    353372    }
    354373}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/Model.php

    r3263746 r3274550  
    1717     */
    1818    public function get_type();
    19 
    2019}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/ModelFactory.php

    r3263746 r3274550  
    22
    33namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models;
    4 use Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Infrastructure\Plugin\{
    5     Registerable
    6 };
    74
    85use Saltus\WP\Plugin\InteractiveGlobes\Noodlehaus\AbstractConfig;
     
    1411    protected $project;
    1512
     13    /**
     14     * Constructor.
     15     *
     16     * @param object $app     The application instance.
     17     * @param string $project The project data.
     18     */
    1619    public function __construct( $app, $project ) {
    1720        $this->app     = $app;
     
    2023
    2124    /**
    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.
    2330     */
    2431    public function create( AbstractConfig $config ) {
     
    3744                if ( $config->has( $service_name ) && $this->app->has( $service_name ) ) {
    3845
    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 );
    4249
    43                 if ( $service_imp instanceof Processable ) {
    44                     $service_imp->process();
     50                    if ( $service_imp instanceof Processable ) {
     51                        $service_imp->process();
     52                    }
    4553                }
    46             }
    4754            }
    4855
     
    6471
    6572                    // make sure $args is an array
    66                     if( ! is_array( $args ) ){
     73                    if ( ! is_array( $args ) ) {
    6774                        $args = [];
    6875                    }
    6976
    70                     $service = $this->app->get( $normalized_feature_name );
     77                    $service     = $this->app->get( $normalized_feature_name );
    7178                    $service_imp = $service->make( $cpt->name, $this->project, $args );
    7279
     
    7986            // disable block editor only if 'block_editor' is false
    8087            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 );
    8289            }
    8390            return $cpt;
     
    9198
    9299        return false;
    93 
    94100    }
    95101}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/PostType.php

    r3263746 r3274550  
    22namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models;
    33
     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 */
    411class PostType extends BaseModel implements Model {
    512
     
    2835     * Get default Options
    2936     *
    30      * Turn it public, change menu position and add `supports` list.
    3137     *
    3238     * @return array The list of options settings
     
    5056
    5157    /**
    52      *
    53      *
     58     * Set the meta fields
    5459     */
    5560    protected function set_meta() {
     
    120125    /**
    121126     * Register Post Type
    122      *
    123      * @return void
    124127     */
    125128    protected function register() {
     
    140143     * Adds filters to change post update messages
    141144     * TODO: accept overrides
    142      *
    143      * @return void
    144145     */
    145146    protected function set_updated_messages() {
    146 
    147147        add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ], 1 );
    148148        add_filter( 'bulk_post_updated_messages', [ $this, 'bulk_post_updated_messages' ], 1, 2 );
    149 
    150149    }
    151150
     
    154153     *
    155154     * @param array $ui_labels
    156      * @return void
    157155     */
    158156    protected function set_ui_labels( array $ui_labels ) {
     
    183181     * Sets the placeholder text for the title field for this post type.
    184182     *
    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.
    188187     */
    189     public function enter_title_here( string $title, \WP_Post $post ) : string {
     188    public function enter_title_here( string $title, \WP_Post $post ): string {
    190189        if ( $this->name !== $post->post_type ) {
    191190            return $title;
     
    194193        return $this->ui_labels['enter_title_here'];
    195194    }
    196 
    197195}
  • interactive-globes/tags/1.4.8/vendor-prefixed/saltus/framework/src/Models/Taxonomy.php

    r3263746 r3274550  
    22namespace Saltus\WP\Plugin\InteractiveGlobes\Saltus\WP\Framework\Models;
    33
     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 */
    411class Taxonomy extends BaseModel implements Model {
    512
    613    // data req for register_taxonomy()
    7     private $links = 'post';
    814    private $associations;
    915
     
    107113
    108114    /**
    109      *
    110      *
     115     * Set meta fields
    111116     */
    112117    private function set_meta() {
  • interactive-globes/tags/1.4.8/vendor/autoload.php

    r3269027 r3274550  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit25dbc9f91dd60cec63ebce8f5ddfa9d1::getLoader();
     25return ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48::getLoader();
  • interactive-globes/tags/1.4.8/vendor/composer/autoload_classmap.php

    r3269027 r3274550  
    6666    'CSF_Welcome' => $vendorDir . '/saltus/framework/lib/codestar-framework/views/welcome.php',
    6767    'CSF_Widget' => $vendorDir . '/saltus/framework/lib/codestar-framework/classes/widget-options.class.php',
    68     'ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f' => $baseDir . '/../vendor-prefixed/composer/autoload_real.php',
     68    'ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0' => $baseDir . '/../vendor-prefixed/composer/autoload_real.php',
    6969    'Composer\\Autoload\\ClassLoader' => $baseDir . '/../vendor-prefixed/composer/ClassLoader.php',
    70     'Composer\\Autoload\\ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f' => $baseDir . '/../vendor-prefixed/composer/autoload_static.php',
     70    'Composer\\Autoload\\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0' => $baseDir . '/../vendor-prefixed/composer/autoload_static.php',
    7171    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    7272    'Noodlehaus\\AbstractConfig' => $vendorDir . '/hassankhan/config/src/AbstractConfig.php',
     
    109109    'Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $vendorDir . '/saltus/framework/src/Features/Duplicate/Duplicate.php',
    110110    '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',
    114111    'Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $vendorDir . '/saltus/framework/src/Features/Meta/CodestarMeta.php',
    115112    'Saltus\\WP\\Framework\\Features\\Meta\\Meta' => $vendorDir . '/saltus/framework/src/Features/Meta/Meta.php',
     
    226223    'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php',
    227224    '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',
    231225    'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => $baseDir . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php',
    232226    '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  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit25dbc9f91dd60cec63ebce8f5ddfa9d1
     5class ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit25dbc9f91dd60cec63ebce8f5ddfa9d1', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit25dbc9f91dd60cec63ebce8f5ddfa9d1', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit8e95e7c0c8eb839c868084f0a65f7f48', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInit25dbc9f91dd60cec63ebce8f5ddfa9d1::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • interactive-globes/tags/1.4.8/vendor/composer/autoload_static.php

    r3269027 r3274550  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit25dbc9f91dd60cec63ebce8f5ddfa9d1
     7class ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    9494        'CSF_Welcome' => __DIR__ . '/..' . '/saltus/framework/lib/codestar-framework/views/welcome.php',
    9595        'CSF_Widget' => __DIR__ . '/..' . '/saltus/framework/lib/codestar-framework/classes/widget-options.class.php',
    96         'ComposerAutoloaderInit063318fd13e99c35a4f3e7f801033e0f' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_real.php',
     96        'ComposerAutoloaderInitea41969c1c9cec97bde3f37efc3919a0' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_real.php',
    9797        'Composer\\Autoload\\ClassLoader' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/ClassLoader.php',
    98         'Composer\\Autoload\\ComposerStaticInit063318fd13e99c35a4f3e7f801033e0f' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_static.php',
     98        'Composer\\Autoload\\ComposerStaticInitea41969c1c9cec97bde3f37efc3919a0' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/composer/autoload_static.php',
    9999        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    100100        'Noodlehaus\\AbstractConfig' => __DIR__ . '/..' . '/hassankhan/config/src/AbstractConfig.php',
     
    137137        'Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/..' . '/saltus/framework/src/Features/Duplicate/Duplicate.php',
    138138        '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',
    142139        'Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/CodestarMeta.php',
    143140        'Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/..' . '/saltus/framework/src/Features/Meta/Meta.php',
     
    254251        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Duplicate\\Duplicate' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Duplicate/Duplicate.php',
    255252        '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',
    259253        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\CodestarMeta' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Meta/CodestarMeta.php',
    260254        'Saltus\\WP\\Plugin\\InteractiveGlobes\\Saltus\\WP\\Framework\\Features\\Meta\\Meta' => __DIR__ . '/../..'.'/build' . '/../vendor-prefixed/saltus/framework/src/Features/Meta/Meta.php',
     
    387381    {
    388382        return \Closure::bind(function () use ($loader) {
    389             $loader->prefixLengthsPsr4 = ComposerStaticInit25dbc9f91dd60cec63ebce8f5ddfa9d1::$prefixLengthsPsr4;
    390             $loader->prefixDirsPsr4 = ComposerStaticInit25dbc9f91dd60cec63ebce8f5ddfa9d1::$prefixDirsPsr4;
    391             $loader->classMap = ComposerStaticInit25dbc9f91dd60cec63ebce8f5ddfa9d1::$classMap;
     383            $loader->prefixLengthsPsr4 = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$prefixLengthsPsr4;
     384            $loader->prefixDirsPsr4 = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$prefixDirsPsr4;
     385            $loader->classMap = ComposerStaticInit8e95e7c0c8eb839c868084f0a65f7f48::$classMap;
    392386
    393387        }, null, ClassLoader::class);
  • interactive-globes/tags/1.4.8/vendor/composer/installed.json

    r3269027 r3274550  
    8585                "type": "git",
    8686                "url": "https://github.com/SaltusDev/saltus-framework.git",
    87                 "reference": "930112677d90dbf2c783698d800d8234594fa836"
     87                "reference": "25a9204d7af6d3224aa6c98d2263ae76c05d7b56"
    8888            },
    8989            "dist": {
    9090                "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",
    9393                "shasum": ""
    9494            },
    9595            "require": {
    96                 "hassankhan/config": "^3.1.0",
     96                "hassankhan/config": "^3.2.0",
    9797                "php": ">=7.2"
    9898            },
    9999            "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"
    102111            },
    103             "time": "2025-02-18T13:11:29+00:00",
     112            "time": "2025-04-16T08:50:13+00:00",
    104113            "type": "project",
    105114            "installation-source": "dist",
     
    119128            "scripts": {
    120129                "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"
    122137                ]
    123138            },
  • interactive-globes/tags/1.4.8/vendor/composer/installed.php

    r3269027 r3274550  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'e725ce4ae9f4b95d08ef2e49e4172fa0342dc235',
     6        'reference' => '8775aa6c21c922ad232acdde2c27edddc93221e1',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../build',
     
    3232            'pretty_version' => 'dev-dev',
    3333            'version' => 'dev-dev',
    34             'reference' => '930112677d90dbf2c783698d800d8234594fa836',
     34            'reference' => '25a9204d7af6d3224aa6c98d2263ae76c05d7b56',
    3535            'type' => 'project',
    3636            'install_path' => __DIR__ . '/../saltus/framework',
     
    4141            'pretty_version' => 'dev-main',
    4242            'version' => 'dev-main',
    43             'reference' => 'e725ce4ae9f4b95d08ef2e49e4172fa0342dc235',
     43            'reference' => '8775aa6c21c922ad232acdde2c27edddc93221e1',
    4444            'type' => 'wordpress-plugin',
    4545            'install_path' => __DIR__ . '/../../build',
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/CHANGELOG.md

    r3269027 r3274550  
    55
    66
     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
    729## [1.1.4] - 2025-02-18
    830
    931### Changed
    10     Move loading codestar from files to classmap
     32    - Move loading codestar from files to classmap
    1133
    1234## [1.1.3] - 2025-01-28
    1335
    1436### Added
    15     Add changelog
     37    - Add changelog
    1638
    1739## [1.1.2] - 2024-12-10
    1840
    1941### Fixed
    20     Load models by ascending filename order
     42    - Load models by ascending filename order
    2143
    2244## [1.1.1] - 2024-12-10
    2345
    2446### Fixed
    25     Correct Media meta field type
    26     Rename drag and drop action
    27     Allow settings meta boxes to have any number of sections
     47    - Correct Media meta field type
     48    - Rename drag and drop action
     49    - Allow settings meta boxes to have any number of sections
    2850
    2951## [1.1.0] - 2024-11-28
    3052
    3153### Added
    32     Items as CPTs
     54    - Items as CPTs
    3355### Changed
    34     Updated Codestar
    35     Updated dependencies
     56    - Updated Codestar
     57    - Updated dependencies
    3658### Fixed
    37     Save linebreaks on save meta
    38     interfaces usage
     59    - Save linebreaks on save meta
     60    - interfaces usage
    3961### Removed
    40     p2p integration
     62    - p2p integration
    4163
    4264
     
    4466
    4567### Added
    46 remember tabs
     68    - Remember tabs
    4769### Fixed
    48 Fix missing properties
    49 Update features to be Processable
     70    - Fix missing properties
     71    - Update features to be Processable
    5072
    5173
     
    5375
    5476### Added
    55 Meta feature
    56 Settings feature
    57 Drag and drop feature
    58 Duplicate feature
    59 Export feature
    60 Admin Cols and Admin Filters features
     77    - Meta feature
     78    - Settings feature
     79    - Drag and drop feature
     80    - Duplicate feature
     81    - Export feature
     82    - Admin Cols and Admin Filters features
    6183
    6284## [1.0.0] - 2019-04-23
    63 Initial Release
     85    - Initial Release
    6486
    6587
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/README.md

    r3269027 r3274550  
    55
    66## Version
    7 ## [1.1.4] - 2025-02-18
     7
     8## [1.2.0] - 2025-04-08
    89See [change log file](CHANGELOG.md) for full details.
    910
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/assets/Feature/DragAndDrop/order.js

    r3207680 r3274550  
    77        'update': function (e, ui) {
    88            $.post( drag_drop_object.ajaxurl, {
    9                 action: 'saltus-dad-update-menu-order',
     9                action: 'saltus-framework-drop-and-drag-update-menu-order',
    1010                order: $('#the-list').sortable('serialize'),
    1111                nonce: drag_drop_object.nonce,
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/composer.json

    r3269027 r3274550  
    3636    "require": {
    3737        "php": ">=7.2",
    38         "hassankhan/config": "^3.1.0"
     38        "hassankhan/config": "^3.2.0"
    3939    },
    4040    "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"
    4352    },
    4453    "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"
    4857    },
    4958    "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    }
    5167}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Core.php

    r3207680 r3274550  
    3838
    3939    // Prefixes to use.
    40     const HOOK_PREFIX    = '';
     40    const HOOK_PREFIX    = 'saltus/framework/';
    4141    const SERVICE_PREFIX = '';
    4242
     
    109109        $this->modeler = new Modeler( $model_factory );
    110110        $project_path  = $this->project['path'];
     111        /** @deprecated 1.2.0 */
    111112        $priority = apply_filters( 'saltus_modeler_priority', 1 );
     113        $priority = apply_filters( 'saltus/framework/modeler/priority', 1 );
    112114        add_action(
    113115            'init',
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminCols/AdminCols.php

    r2986425 r3274550  
    2626     */
    2727    public static function make( $name, $project, $args ) {
    28         return new SaltusAdminCols( $name, $project, $args );
     28        return new SaltusAdminCols( $name, $args );
    2929    }
    3030
     
    4141        return is_admin();
    4242    }
    43 
    4443}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminCols/SaltusAdminCols.php

    r3098987 r3274550  
    1515 * Enable custom administration columns
    1616 *
    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
    1819 */
    1920final class SaltusAdminCols implements Processable {
    2021
     22    /**
     23     * @var string $name The name of the custom post type (CPT)
     24     */
    2125    private $name;
    22     private $project;
     26
     27    /**
     28     * @var array $args List of columns
     29     */
    2330    private $args;
    2431
     
    2633     * @var array Default columns
    2734     */
    28     private $default_columns;
    29 
    30     /**
    31      * @var array Managed columsn
    32      */
    33     private $managed_columns = null;
     35    private $default_columns = null;
     36
     37    /**
     38     * @var array Managed columns
     39     */
     40    private ?array $managed_columns = null;
    3441
    3542    /**
    3643     * Instantiate this Service object.
    3744     *
    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;
    4351    }
    4452
     
    5260        add_filter( 'manage_posts_columns',                       [ $this, 'log_default_cols' ], 0 );
    5361        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
    5773        add_action( 'load-edit.php',                              [ $this, 'default_sort' ] );
    5874        add_filter( 'pre_get_posts',                              [ $this, 'maybe_sort_by_fields' ] );
     
    7389
    7490    /**
    75      * Adds our custom 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.
    7995     */
    8096    public function sortables( array $cols ): array {
     
    99115     * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-columns
    100116     *
    101      * @param array $cols Associative array of columns
    102      * @return array Updated array of columns
     117     * @param array<string,string> $cols Associative array of columns
     118     * @return array<string,string> Updated array of columns
    103119     */
    104120    public function manage_columns( array $cols ): array {
     
    121137        }
    122138
    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 ) {
    125144            if ( is_string( $col ) && isset( $cols[ $col ] ) ) {
    126145                # Existing (ie. built-in) column with id as the value
     
    137156                    $k = 'author';
    138157                }
    139                 $new_cols[ $k ] = esc_html__( 'Author', 'extended-cpts' );
     158                $new_cols[ $k ] = esc_html__( 'Author', 'saltus-framework' );
    140159            } elseif ( is_array( $col ) ) {
    141160                if ( isset( $col['cap'] ) && ! current_user_can( $col['cap'] ) ) {
     
    146165                    $new_cols[ $id ] = call_user_func( $col['title_cb'], $col );
    147166                } else {
    148                     $title = esc_html( $col['title'] ?? $this->get_item_title( $col ) ?? $id );
     167                    $title = esc_html( $this->get_item_title( $col, $id ) );
    149168
    150169                    if ( isset( $col['title_icon'] ) ) {
     
    172191     * Returns a sensible title for the current item (usually the arguments array for a column)
    173192     *
    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'] ) ) {
    179202            $tax = get_taxonomy( $item['taxonomy'] );
    180203            if ( $tax ) {
     
    201224            ) ) );
    202225        }
    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 {
    212236        # Shorthand:
    213237        $c = $this->args;
    214238
    215         # We're only interested in our custom columns:
     239        # We're only interested in the custom columns:
    216240        $custom_cols = array_filter( array_keys( $c ) );
    217241
     
    221245
    222246        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 ) {
    223252            return;
    224253        }
     
    229258
    230259        if ( isset( $c[ $col ]['function'] ) ) {
    231             call_user_func( $c[ $col ]['function'] );
     260            call_user_func( $c[ $col ]['function'], $post );
    232261        } 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 ] );
    234263        } 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 ] );
    236265        } 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 ] );
    238267        } 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 ] );
    240269        }
    241270    }
     
    244273     * Outputs column data for a post meta field.
    245274     *
    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 );
    251281        $echo = [];
    252282
     
    257287                $args['date_format'] = get_option( 'date_format' );
    258288            }
    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'] );
    273290        } else {
    274291            foreach ( $vals as $val ) {
    275 
    276292                if ( ! empty( $val ) || ( $val === '0' ) ) {
    277293                    $echo[] = $val;
     
    286302        }
    287303    }
     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    }
    288333
    289334    /**
    290335     * Outputs column data for a taxonomy's term names.
    291336     *
    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 );
    301348        if ( is_wp_error( $terms ) ) {
    302349            echo esc_html( $terms->get_error_message() );
    303350            return;
    304351        }
    305 
    306352        if ( empty( $terms ) ) {
    307353            printf(
     
    316362        foreach ( $terms as $term ) {
    317363            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 );
    363365            } else {
    364366                $out[] = esc_html( $term->name );
     
    368370        echo implode( ', ', $out );
    369371    }
    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    }
    371429    /**
    372430     * Outputs column data for a post field.
    373431     *
    374      * @param string $field The post field
    375      * @param array  $args  Array of arguments for this field
    376      */
    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 {
    379437        switch ( $field ) {
    380438
     
    414472                echo esc_html( get_post_field( $field, $post ) );
    415473                break;
    416 
    417474        }
    418475    }
     
    421478     * Outputs column data for a post's featured image.
    422479     *
    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 {
    427485        if ( ! function_exists( 'has_post_thumbnail' ) ) {
    428486            return;
     
    495553     * Sets the relevant query vars for sorting posts by our admin sortables.
    496554     *
    497      * @param WP_Query $wp_query The current `WP_Query` object.
     555     * @param \WP_Query $wp_query The current `WP_Query` object.
    498556     */
    499557    public function maybe_sort_by_fields( \WP_Query $wp_query ) {
     
    514572
    515573    /**
    516      * Filters the query's SQL clauses so we can sort posts by 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
    521579     */
    522580    public function maybe_sort_by_taxonomy( array $clauses, \WP_Query $wp_query ): array {
     
    538596     * sort it by the requested orderby field.
    539597     *
    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` or
    542      *                         `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.
    544602     */
    545603    public static function get_sort_field_vars( array $vars, array $sortables ): array {
     
    556614        }
    557615
    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'] ) {
    565623            return [];
    566624        }
     
    568626        $return = [];
    569627
    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'];
    572630            $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'] );
    576636            $return['orderby'] = $field;
    577637        }
     
    588648     * sort it by the requested orderby field.
    589649     *
    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` or
    593      *                         `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.
    595655     */
    596656    public static function get_sort_taxonomy_clauses( array $clauses, array $vars, array $sortables ): array {
     
    609669        }
    610670
    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'] ) ) {
    622682            return [];
    623683        }
     
    632692            ON ( ext_cpts_tt.term_id = ext_cpts_t.term_id )
    633693        ";
    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'] );
    635695        $clauses['groupby']  = 'ext_cpts_tr.object_id';
    636696        $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  
    2626     */
    2727    public static function make( $name, $project, $args ) {
    28         return new SaltusAdminFilters( $name, $project, $args );
     28        return new SaltusAdminFilters( $name, $args );
    2929    }
    3030
     
    4141        return is_admin();
    4242    }
    43 
    4443}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminFilters/SaltusAdminFilters.php

    r3098987 r3274550  
    99 * Enable custom administration filters
    1010 *
    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
    1214 */
    1315final class SaltusAdminFilters implements Processable {
    1416
     17    /**
     18     * @var string $name The name of the custom post type (CPT)
     19     */
    1520    private $name;
    16     private $project;
     21
     22    /**
     23     * @var array $args List of filters
     24     */
    1725    private $args;
    1826
    19     public $site_filters;
     27    /**
     28     * @var array $site_filters List of filters
     29     */
     30    public $site_filters = [];
    2031
    2132    /**
    2233     * Instantiate this Service object.
    2334     *
    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     */
    3250    public function process() {
    33 
    3451        add_action( 'load-edit.php',         [ $this, 'default_filter' ] );
    3552        add_filter( 'pre_get_posts',         [ $this, 'maybe_filter' ] );
     
    4865        # Loop over our filters to find the default filter (if there is one):
    4966        foreach ( $this->args as $id => $filter ) {
    50             if ( isset( $_GET[ $id ] ) && '' !== $_GET[ $id ] ) {
     67            // phpcs:ignore WordPress.Security.NonceVerification
     68            if ( empty( $_GET[ $id ] ) ) {
    5169                continue;
    5270            }
     
    6280     * Filters posts by our custom admin filters.
    6381     *
    64      * @param WP_Query $wp_query A `WP_Query` object
     82     * @param \WP_Query $wp_query A `WP_Query` object
    6583     */
    6684    public function maybe_filter( \WP_Query $wp_query ) {
     
    95113     *                          `site_filters` argument when registering an extended post type).
    96114     * @param string $post_type The post type name.
     115     *
    97116     * @return array The list of private query vars to apply to the query.
    98117     */
    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 {
    100119        $return = [];
    101120
     
    104123            $date_query = [];
    105124
    106             if ( ! isset( $query[ $filter_key ] ) || ( '' === $query[ $filter_key ] ) ) {
     125            if ( ! isset( $query[ $filter_key ] ) || ( $query[ $filter_key ] === '' ) ) {
    107126                continue;
    108127            }
     
    112131            }
    113132
     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
    114148            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
    119153            } 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          = [
    123156                    'compare' => 'LIKE',
    124157                ];
     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
    125162            } elseif ( isset( $filter['meta_key_exists'] ) ) {
    126                 $meta_query = [
    127                     'key'     => wp_unslash( $query[ $filter_key ] ),
     163                // default to EXISTS
     164                $meta_query        = [
    128165                    'compare' => 'EXISTS',
    129166                ];
     167                $meta_query        = array_merge( $meta_query, $filter );
     168                $meta_query['key'] = wp_unslash( $query[ $filter_key ] );
     169
    130170            } elseif ( isset( $filter['meta_exists'] ) ) {
    131                 $meta_query = [
    132                     'key'     => wp_unslash( $query[ $filter_key ] ),
     171                // default to NOT IN
     172                $meta_query          = [
    133173                    'compare' => 'NOT IN',
    134                     'value'   => [ '', '0', 'false', 'null' ],
    135174                ];
     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
    136179            } elseif ( isset( $filter['post_date'] ) ) {
    137180                $date_query = [
     
    164207
    165208    /**
    166      * Add our filter 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 {
    172215        $filters = array_keys( $this->site_filters );
    173216
     
    180223     * @return string The post type name.
    181224     */
    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' ) {
    184229            return get_current_screen()->post_type;
    185         } else {
    186             return '';
    187         }
     230        }
     231        return '';
    188232    }
    189233
     
    193237     * @link https://github.com/johnbillion/extended-cpts/wiki/Admin-filters
    194238     */
    195     public function filters() {
     239    public function filters(): void {
    196240        global $wpdb;
    197241
     
    202246        $pto = get_post_type_object( $this->name );
    203247
    204         foreach ( $this->args as $filter_key => $filter ) {
     248        foreach ( $this->args as $filter_id => $filter ) {
    205249            if ( isset( $filter['cap'] ) && ! current_user_can( $filter['cap'] ) ) {
    206250                continue;
    207251            }
    208252
    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}";
    212259
    213260            if ( has_action( $hook ) ) {
     
    215262                 * Allows a filter's output to be overridden.
    216263                 *
    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.
    222267                 */
     268                // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    223269                do_action( $hook, $this, $filter, $id );
    224270                continue;
     
    232278                }
    233279
    234                 $walker = new WalkerTaxonomyDropdown( [
    235                     'field' => 'slug',
    236                 ] );
     280                $walker = new WalkerTaxonomyDropdown(
     281                    [
     282                        'field' => 'slug',
     283                    ]
     284                );
    237285
    238286                # If we haven't specified a title, use the all_items label from the taxonomy:
     
    264312                # If we haven't specified a title, generate one from the meta key:
    265313                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                    );
    270322                    $filter['title'] = ucwords( $filter['title'] ) . 's';
    271323                    $filter['title'] = sprintf( 'All %s', $filter['title'] );
     
    274326                # If we haven't specified a label, generate one from the meta key:
    275327                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                    );
    280336                    $filter['label'] = ucwords( $filter['label'] );
    281337                    $filter['label'] = sprintf( 'Filter by %s', $filter['label'] );
     
    284340                if ( ! isset( $filter['options'] ) ) {
    285341                    # 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                    );
    295355                } elseif ( is_callable( $filter['options'] ) ) {
    296356                    $filter['options'] = call_user_func( $filter['options'] );
     
    302362
    303363                $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                        }
    311371                    }
    312372                }
     
    335395                # If we haven't specified a title, generate one from the meta key:
    336396                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                    );
    341405                    $filter['title'] = ucwords( $filter['title'] );
    342406                }
     
    357421                $fields   = $filter['meta_exists'] ?? $filter['meta_key_exists'];
    358422
    359                 if ( 1 === count( $fields ) ) {
     423                if ( count( $fields ) === 1 ) {
    360424                    # Output a checkbox:
    361425                    foreach ( $fields as $v => $t ) {
     
    402466
    403467                if ( ! isset( $filter['title'] ) ) {
    404                     $filter['title'] = __( 'All Authors', 'extended-cpts' );
     468                    $filter['title'] = __( 'All Authors', 'saltus-framework' );
    405469                }
    406470
    407471                if ( ! isset( $filter['label'] ) ) {
    408                     $filter['label'] = __( 'Author', 'extended-cpts' );
     472                    $filter['label'] = __( 'Author', 'saltus-framework' );
    409473                }
    410474
     
    417481                if ( ! isset( $filter['options'] ) ) {
    418482                    # 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                    );
    424493                } elseif ( is_callable( $filter['options'] ) ) {
    425494                    $filter['options'] = call_user_func( $filter['options'] );
     
    431500
    432501                # 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    }
    445515}
    446 
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/AdminFilters/WalkerTaxonomyDropdown.php

    r2986425 r3274550  
    1111
    1212    /**
    13      * @var string
     13     * @var string $tree_type The type of tree structure being used (e.g., 'category').
    1414     */
    1515    public $tree_type = 'category';
    1616
    1717    /**
    18      * @var array
     18     * @var array<string> $db_fields Database fields used for parent/child relationships and term IDs.
    1919     */
    2020    public $db_fields = [
     
    3131     * Class constructor.
    3232     *
    33      * @param array $args Optional arguments.
     33     * @param array|null $args Optional arguments.
     34     *                         - 'field': The field to use for the dropdown value.
    3435     */
    3536    public function __construct( $args = null ) {
     
    4344     *
    4445     * @param string $output            Passed by reference. Used to append additional content.
    45      * @param object $object            Term data object.
     46     * @param object $term_object       Term data object.
    4647     * @param int    $depth             Depth of term in reference to parents.
    4748     * @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
    4854     * @param int    $current_object_id Current object ID.
    4955     */
    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 ) {
    5157        $pad = str_repeat( '&nbsp;', $depth * 3 );
    5258        $tax = get_taxonomy( $args['taxonomy'] );
    5359
    5460        if ( $this->field ) {
    55             $value = $object->{$this->field};
     61            $value = $term_object->{$this->field};
    5662        } else {
    57             $value = $tax->hierarchical ? $object->term_id : $object->name;
     63            $value = $tax->hierarchical ? $term_object->term_id : $term_object->name;
    5864        }
    5965
    60         if ( empty( $object->term_id ) && ! $tax->hierarchical ) {
     66        if ( empty( $term_object->term_id ) && ! $tax->hierarchical ) {
    6167            $value = '';
    6268        }
    6369
    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 ) . '"';
    6674
    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 ) ) {
    6876            $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 ) ) {
    7078            $output .= ' selected="selected"';
    7179        }
     
    7583
    7684        if ( $args['show_count'] ) {
    77             $output .= '&nbsp;&nbsp;(' . esc_html( number_format_i18n( $object->count ) ) . ')';
     85            $output .= '&nbsp;&nbsp;(' . esc_html( number_format_i18n( $term_object->count ) ) . ')';
    7886        }
    7987
    8088        $output .= "</option>\n";
    8189    }
    82 
    8390}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/DragAndDrop.php

    r2986425 r3274550  
    1111
    1212/**
     13 * Class DragAndDrop
     14 *
     15 * Enable an option to manage drag and drop functionality in the admin area.
    1316 */
    1417class DragAndDrop implements Service, Conditional, Actionable, Assembly {
     
    2124
    2225    /**
     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    /**
    2335     * Create a new instance of the service provider
    2436     *
     
    2638     */
    2739    public static function make( $name, $project, $args ) {
    28         return new SaltusDragAndDrop( $name, $project, $args );
     40        return new SaltusDragAndDrop( $name, $project );
    2941    }
    3042
    3143    /**
    32      * Check whether the conditional service is currently needed.
     44     * Update menu drag and drop in the database
    3345     *
    34      * @return bool Whether the conditional service is needed.
    3546     */
    36     public static function is_needed(): bool {
    37 
    38         /*
    39          * This service loads in most screens:
    40          * - admin: in the edit screen
    41          * - ajax:  while updating menu order
    42          * - front: during pre_get_posts, etc
    43          */
    44         return is_admin();
    45     }
    46 
    4747    public function add_action() {
    4848        $actions = new UpdateMenuDragAndDrop();
    4949        $actions->add_action();
    5050    }
    51 
    5251}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/SaltusDragAndDrop.php

    r2986425 r3274550  
    1515     *
    1616     */
    17     public function __construct( string $name, array $project, ...$args ) {
     17    public function __construct( string $name, array $project ) {
    1818        $this->project = $project;
    1919        $this->name    = $name;
     
    7171
    7272        wp_enqueue_style( 'drag_drop_order', $this->project['root_url'] . '/Feature/DragAndDrop/order.css', array(), '1' );
    73 
    7473    }
    7574
     
    141140        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    142141        $query_result = $wpdb->query( $query_prepared );
    143 
    144142    }
    145143
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/DragAndDrop/UpdateMenuDragAndDrop.php

    r3207680 r3274550  
    77
    88/**
     9 * Class UpdateMenuDragAndDrop
     10 *
     11 * Handles the drag-and-drop functionality for updating menu order.
    912 */
    1013class UpdateMenuDragAndDrop implements Actionable {
     
    1619    public function __construct() {}
    1720
     21
     22    /**
     23     * Register the WordPress action for handling the AJAX request.
     24     */
    1825    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' ) );
    2027    }
    2128
     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     */
    2235    public function update_menu_order() {
    2336        global $wpdb;
     
    3750        // can't trust much parse_str
    3851        parse_str( $_POST['order'], $data );
    39 
    40         if ( ! is_array( $data ) ) {
    41             return false;
    42         }
    4352
    4453        $id_arr = array();
     
    7786        }
    7887
    79         do_action( 'saltus/dad/update_menu_order' );
     88        do_action( 'saltus/framework/drop_and_drop/update_menu_order' );
    8089    }
    8190}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Duplicate/Duplicate.php

    r2986425 r3274550  
    2525     */
    2626    public static function make( $name, $project, $args ) {
    27         return new SaltusDuplicate( $name, $project, $args );
     27        return new SaltusDuplicate( $name, $args );
    2828    }
    2929
     
    4343        return is_admin();
    4444    }
    45 
    4645}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Duplicate/SaltusDuplicate.php

    r3207680 r3274550  
    1313final class SaltusDuplicate implements Processable {
    1414
     15    /**
     16     * @var string $name The name of the custom post type (CPT)
     17     */
    1518    private $name;
     19
     20    /**
     21     * @var string $label The label for duplicate link.
     22     */
    1623    private $label;
     24
     25    /**
     26     * @var string $attr_title The title for the duplicate link.
     27     */
    1728    private $attr_title;
    1829
    1930    /**
    20      * Instantiate this Service object.
     31     * Constructor.
    2132     *
     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.
    2237     */
    23     public function __construct( string $name, array $project = null, array $args ) {
     38    public function __construct( string $name, array $args ) {
    2439        $this->name       = $name;
    2540        $this->label      = ! empty( $args['label'] ) ? $args['label'] : 'Duplicate';
     
    3449        add_filter( 'page_row_actions', array( $this, 'row_link' ), 10, 2 );
    3550
    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' ) );
    3752    }
    3853
    3954    /*
    4055    * 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    *
    4162    */
    4263    public function row_link( $actions, $post ) {
     
    5374            '<a href="%1$s" title="%2$s" rel="permalink">%3$s</a>',
    5475            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,
    5677                basename( __FILE__ ),
    57                 'saltus_duplicate_nonce'
     78                'saltus_framework_duplicate_nonce'
    5879            ),
    5980            esc_attr( $this->attr_title ),
     
    6687
    6788        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' );
    6990
    7091        // 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' ) );
    7397        }
    7498
    7599        // 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__ ) ) ) {
    77102            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    78103            wp_die( $error_msg );
     
    84109
    85110        // duplicate the post
     111        // @phpstan-ignore identical.alwaysFalse
    86112        if ( ! isset( $post ) || $post === null ) {
    87113            return;
     
    106132
    107133        // insert the new post
     134        // @phpstan-ignore argument.type
    108135        $new_post_id = wp_insert_post( $args );
    109136
     
    128155            return;
    129156        }
    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 )";
    132159        foreach ( $query_result as $post_meta ) {
    133160
     
    147174        $post_type = get_post_type( $post_id );
    148175
     176        /** @deprecated 1.2.0 */
    149177        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 );
    150179
    151180        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  
    1010final class CodestarMeta implements Processable {
    1111
     12    /**
     13     * @var string $name The name of the custom post type (CPT)
     14     */
    1215    private $name;
     16
     17    /**
     18     * @var array $meta The meta fields
     19     */
    1320    private $meta;
    1421
    1522    /**
    1623     * 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 ) {
    1929        $this->name = $name;
    2030        $this->meta = $meta;
    2131    }
    2232
     33    /**
     34     * Process the functionality
     35     */
    2336    public function process() {
    2437
     
    3144            }
    3245
    33             // else add just the fields
     46            // add just the fields and register rest api
    3447            $this->create_metabox( $box_id, $box );
     48            $this->register_rest_api( $box_id, $box );
    3549        }
    3650    }
     
    3953     * Create metabox
    4054     *
    41      * @param int   $box_id identifier of the metabox
    42      * @param array $box_settings paramaters for the page
    43      * @return void
     55     * @param mixed $box_id       Identifier of the metabox
     56     * @param array $box_settings Paramaters for the box
     57     *
    4458     */
    4559    private function create_metabox( $box_id, $box_settings ) {
     
    7791        }
    7892
    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 );
    85131                    }
    86132                }
    87133            }
    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     */
    109144    private function setup_restapi_fields( $fields ) {
    110145        $rest_fields = [];
    111         $rest_types  = $this->match_fields( $this->list_fields() );
     146        $rest_types  = $this->match_fields();
    112147        foreach ( $fields as $name => $attributes ) {
    113148            if ( empty( $attributes['type'] ) ) {
     
    125160        return $rest_fields;
    126161    }
     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     */
    127171    private function create_meta_fields_not_serialized( $meta_name, $meta_type, $post_type ) {
    128172
    129         $rest_types = $this->match_fields( $this->list_fields() );
     173        $rest_types = $this->match_fields();
    130174        $rest_type  = $this->get_field_type( $meta_type, $rest_types );
    131175
     
    151195    }
    152196
     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     */
    153205    private function create_meta_fields_serialized( $meta_fields, $meta_name, $post_type ) {
    154206
     
    180232    }
    181233
    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        ];
    183287
    184288        // 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 ) {
    301308        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 ];
    311316    }
    312317
     
    314319     * Create section using builtin Codestart method
    315320     *
    316      * @param string $id - identifier of the section
    317      * @param array  $section - parameters for the section
     321     * @param string $id      Identifier of the section
     322     * @param array  $section Parameters for the section
    318323     * @return void
    319324     */
     
    329334     * Prepare fields to make sure they have all necessary parameters
    330335     *
    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
    333339     */
    334340    private function prepare_fields( $fields ) {
     
    354360     * Function to sanitize meta on save
    355361     *
    356      * @param array $request with meta info
    357      * @param int $post_id
    358      * @param obj $csf class
     362     * @param $request with meta info
     363     * @param $post_id
     364     * @param $csf class
    359365     * @return array
    360366     */
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Meta/Meta.php

    r3115164 r3274550  
    99
    1010/**
     11 * Class Meta
     12 *
     13 * Enable an option to manage meta fields
    1114 */
    1215final class Meta implements Service, Conditional, Assembly {
     16
     17    /**
     18     * Instantiate this Service object.
     19     *
     20     */
     21    public function __construct() {}
    1322
    1423    /**
     
    2534
    2635    /**
    27      * Instantiate this Service object.
     36     * Create a new instance of the service provider
    2837     *
    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.
    3641     *
    3742     * @return object The new instance
    3843     */
    3944    public static function make( $name, $project, $args ) {
    40         return new CodestarMeta( $name, $project, $args );
     45        return new CodestarMeta( $name, $args );
    4146    }
    42 
    4347}
    44 
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/RememberTabs/RememberTabs.php

    r2986425 r3274550  
    99
    1010/**
     11 * Class RememberTabs
     12 *
     13 * Enable an option to remember the last active tab in the admin area.
    1114 */
    1215class RememberTabs implements Service, Conditional, Assembly {
     
    1720     */
    1821    public function __construct() {}
    19 
    20     /**
    21      * Create a new instance of the service provider
    22      *
    23      * @return object The new instance
    24      */
    25     public static function make( $name, $project, $args ) {
    26         return new SaltusRememberTabs( $name, $project, $args );
    27     }
    2822
    2923    /**
     
    4034    }
    4135
     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    }
    4248}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/RememberTabs/SaltusRememberTabs.php

    r2986425 r3274550  
    88final class SaltusRememberTabs implements Processable {
    99
     10    /**
     11     * @var string $name The name of the custom post type (CPT)
     12     */
    1013    private $name;
     14
     15    /**
     16     * @var string $name Project information.
     17     */
    1118    private $project;
    1219
    13         /**
     20    /**
    1421     * Instantiate this Service object.
    1522     *
     23     * @param string $name The name of the custom post type (CPT)
     24     * @param array  $project Project information.
    1625     */
    17     public function __construct( string $name, array $project, array $args = null ) {
     26    public function __construct( string $name, array $project ) {
     27        $this->name    = $name;
    1828        $this->project = $project;
    19         $this->name    = $name;
    2029    }
    2130
     31    /**
     32     * Process the functionality
     33     */
    2234    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 );
    2537    }
    26 
     38    /**
     39     * Check if the script and CSS should be loaded
     40     *
     41     * @return bool
     42     */
    2743    private function check_load_script_css() {
    2844
     
    3955    }
    4056
     57    /**
     58     * Load the script and CSS
     59     */
    4160    public function load_script_css() {
    4261
     
    4564        }
    4665
    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        );
    4973    }
    5074
     
    5377     * Used to remember tab
    5478     *
    55      * @param string $link
    56      * @return string
     79     * @param string $link Admin url
     80     * @return string The url
    5781     */
    5882    public function check_remember_tab_url( $link ) {
    5983
    6084        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() ) {
    6286            return $link;
    6387        }
    6488
    65         if( isset( $_REQUEST['tab'] ) ) {
     89        if ( isset( $_REQUEST['tab'] ) ) {
    6690            $params['tab'] = absint( $_REQUEST['tab'] );
    67             $link = add_query_arg( $params, $link );
     91            $link          = add_query_arg( $params, $link );
    6892        }
    69 
    7093
    7194        return $link;
    7295    }
    73 
    7496}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Settings/CodestarSettings.php

    r2986425 r3274550  
    66};
    77
    8 final class CodestarSettings implements Processable{
     8final class CodestarSettings implements Processable {
    99
     10    /**
     11     * @var string $name The name of the custom post type (CPT)
     12     */
    1013    private $name;
     14
     15    /**
     16     * @var array $settings The settings to be used for the settings page.
     17     */
    1118    private $settings;
    1219
    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 = [] ) {
    1427        $this->name     = $name;
    1528        $this->settings = $settings;
    1629    }
    1730
     31    /**
     32     * Process the settings
     33     */
    1834    public function process() {
    1935        /**
     
    6581            }
    6682        }
    67 
    6883    }
    6984
     
    7186     * Create section using builtin Codestart method
    7287     *
    73      * @param string $id - identifier of the section
     88     * @param mixed $id - identifier of the section
    7489     * @param array  $section - parameters for the section
    7590     * @return void
    7691     */
    7792    private function create_section( $id, $section ) {
    78 
    7993        \CSF::createSection( $id, $section );
    80 
    8194    }
    8295
     
    98111
    99112            if ( isset( $field['fields'] ) ) {
    100 
    101113                $field['fields'] = $this->prepare_fields( $field['fields'] );
    102 
    103114            }
    104115        }
     
    107118        return array_values( $fields );
    108119    }
    109 
    110 
    111120}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/Settings/Settings.php

    r2986425 r3274550  
    99
    1010/**
     11 * Class Settings
     12 *
     13 * Enable an option to create Settings page
    1114 */
    1215final class Settings implements Service, Conditional, Assembly {
     16
     17    /**
     18     * Instantiate this Service object.
     19     *
     20     */
     21    public function __construct() {}
    1322
    1423    /**
     
    1827     */
    1928    public static function is_needed(): bool {
     29
    2030        /*
    2131         * Only load this sample service on the admin backend.
    22          * If this conditional returns false, the service is never even
    23          * instantiated.
    2432         */
    2533        return \is_admin();
     
    2735
    2836    /**
    29      * Instantiate this Service object.
     37     * Create a new instance of the service provider
    3038     *
    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.
    3842     *
    3943     * @return object The new instance
    4044     */
    4145    public static function make( $name, $project, $args ) {
    42         return new CodestarSettings( $name, $project, $args );
     46        return new CodestarSettings( $name, $args );
    4347    }
    44 
    4548}
    46 
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/SingleExport/SaltusSingleExport.php

    r2986425 r3274550  
    77
    88/**
     9 * Class SaltusSingleExport
     10 *
    911 * Enable an option to export single entry
    1012 *
     
    1315final class SaltusSingleExport implements Processable {
    1416
     17    /**
     18     * @var string $name The name of the custom post type (CPT) to export.
     19     */
    1520    private $name;
     21
     22    /**
     23     * @var string $label The label for the export link.
     24     */
    1625    private $label;
    1726
    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     */
    1931    const FAKE_DATE = '1970-01-05'; // Y-m-d
    2032
    2133    /**
    22      * Instantiate this Service object.
     34     * Constructor.
    2335     *
     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.
    2439     */
    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';
    2843    }
    2944
     45    /**
     46     * Process the export functionality by hooking into WordPress actions.
     47     */
    3048    public function process() {
    3149        add_action( 'init', array( $this, 'init' ) );
     
    3452    /**
    3553     * Get hooked in: Part II
     54     * Initialize the export functionality.
     55     *
     56     * Hooks into WordPress filters and actions to enable single entry export.
    3657     *
    3758     */
     
    4566        add_filter( 'query', array( $this, 'query' ) );
    4667        add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ) );
     68    }
    4769
    48     }
    4970    /**
    5071     * Insert our action link into the submit box
     72     *
     73     * @param \WP_Post $post The current post object.
    5174     *
    5275     */
     
    5477
    5578        // 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 ) {
    5780            return;
    5881        }
     
    6487            color: #82878c;
    6588            font: normal 20px/1 dashicons;
    66             speak: none;
    6789            display: inline-block;
    6890            padding: 0 3px 0 0;
     
    89111
    90112    /**
    91      * Modify export arguments
    92      * except if normal export
     113     * Modify export arguments.
    93114     *
    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.
    96120     */
    97121    public function export_args( $args ) {
     
    116140
    117141    /**
    118      * Filter query
    119      * Look for 'tagged' query, replace with one matching the needs
     142     * Filter the SQL query for single entry export.
    120143     *
    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.
    123149     */
    124150    public function query( $query ) {
     
    158184        return $query;
    159185    }
    160 
    161186}
    162187
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Features/SingleExport/SingleExport.php

    r2986425 r3274550  
    88};
    99
    10 
    1110/**
     11 * Class SingleExport
     12 *
     13 * Enable an option to export single entry
    1214 */
    1315class SingleExport implements Service, Conditional, Assembly {
     
    1820     */
    1921    public function __construct() {}
    20 
    21     /**
    22      * Create a new instance of the service provider
    23      *
    24      * @return object The new instance
    25      */
    26     public static function make( $name, $project, $args ) {
    27         return new SaltusSingleExport( $name, $project, $args );
    28     }
    2922
    3023    /**
     
    4134    }
    4235
     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    }
    4348}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/CanRegister.php

    r2986425 r3274550  
    1313     * @return void
    1414     */
    15     public function register( string $id, string $class, array $dependencies );
     15    public function register( string $id, string $service_class, array $dependencies );
    1616}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/ContainerAssembler.php

    r2986425 r3274550  
    1111        return new GenericContainer();
    1212    }
    13 
    1413}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/FailedToMakeInstance.php

    r2986425 r3274550  
    66use RuntimeException;
    77
    8 class FailedToMakeInstance
     8final class FailedToMakeInstance
    99    extends RuntimeException
    1010    implements SaltusFrameworkThrowable {
     
    3434        );
    3535
    36         return new static( $message, static::CIRCULAR_REFERENCE );
     36        return new self( $message, self::CIRCULAR_REFERENCE );
    3737    }
    3838
     
    5151        );
    5252
    53         return new static( $message, static::UNRESOLVED_INTERFACE );
     53        return new self( $message, self::UNRESOLVED_INTERFACE );
    5454    }
    5555
     
    6969        );
    7070
    71         return new static( $message, static::UNREFLECTABLE_CLASS );
     71        return new self( $message, self::UNREFLECTABLE_CLASS );
    7272    }
    7373
     
    7878     * @param string $argument_name Name of the argument that could not be
    7979     *                              resolved.
    80      * @param string $class        Class that had the argument in its
     80     * @param string $service_class Class that had the argument in its
    8181     *                              constructor.
    8282     * @return static
    8383     */
    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 ) {
    8585        $message = \sprintf(
    8686            'Could not resolve the argument "%s" while trying to instantiate the class "%s".',
    8787            $argument_name,
    88             $class
     88            $service_class
    8989        );
    9090
    91         return new static( $message, static::UNRESOLVED_ARGUMENT );
     91        return new self( $message, self::UNRESOLVED_ARGUMENT );
    9292    }
    9393
     
    9696     * reused but was not yet instantiated.
    9797     *
    98      * @param string $class Class that was not yet instantiated.
     98     * @param string $service_class Class that was not yet instantiated.
    9999     *
    100100     * @return static
    101101     */
    102     public static function for_uninstantiated_shared_instance( string $class ) {
     102    public static function for_uninstantiated_shared_instance( string $service_class ) {
    103103        $message = \sprintf(
    104104            'Could not retrieve the shared instance for "%s" as it was not instantiated yet.',
    105             $class
     105            $service_class
    106106        );
    107107
    108         return new static( $message, static::UNINSTANTIATED_SHARED_INSTANCE );
     108        return new self( $message, self::UNINSTANTIATED_SHARED_INSTANCE );
    109109    }
    110110
     
    113113     * for a class that doesn't have one.
    114114     *
    115      * @param string $class Class for which there is no delegate.
     115     * @param string $service_class Class for which there is no delegate.
    116116     *
    117117     * @return static
    118118     */
    119     public static function for_invalid_delegate( string $class ) {
     119    public static function for_invalid_delegate( string $service_class ) {
    120120        $message = \sprintf(
    121121            'Could not retrieve a delegate for "%s", none was defined.',
    122             $class
     122            $service_class
    123123        );
    124124
    125         return new static( $message, static::INVALID_DELEGATE );
     125        return new self( $message, self::INVALID_DELEGATE );
    126126    }
    127127}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/GenericContainer.php

    r2986425 r3274550  
    1414
    1515/**
     16 * Class GenericContainer
     17 *
    1618 * A simplified implementation of a service container.
    1719 *
    18  * Extend ArrayObject to have default implementations for iterators and
     20 * Extends ArrayObject to have default implementations for iterators and
    1921 * array access.
    2022 */
     
    2426
    2527    /**
    26      * Instanciates Services
     28     * @var Instantiator $instantiator Instantiates services.
    2729     */
    2830    protected $instantiator;
    2931
    3032    /**
    31      * Service Container
     33     * Constructor.
     34     *
     35     * Initializes the container with a fallback instantiator.
    3236     */
    3337    public function __construct() {
     
    5559
    5660    /**
    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.
    5962     *
    6063     * @param string $id Identifier of the service to look for.
    6164     *
    62      * @return bool
     65     * @return bool True if the service exists, false otherwise.
    6366     */
    6467    public function has( string $id ): bool {
     
    6972     * Put a service into the container for later retrieval.
    7073     *
    71      * @param string  $id      Identifier of the service to put into the
    72      *                         container.
     74     * @param string  $id      Identifier of the service.
    7375     * @param Service $service Service to put into the container.
    7476     */
     
    7880
    7981    /**
    80      * Register a single service, and adds it to the container
     82     * Register a single service, and add it to the container
    8183     *
    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.
    8487     */
    85     public function register( string $id, string $class, array $dependencies = null ) {
     88    public function register( string $id, string $service_class, ?array $dependencies = null ) {
    8689
    8790        // 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() ) {
    9093            return;
    9194        }
    9295
    93         $service = $this->instantiate( $class );
     96        $service = $this->instantiate( $service_class );
    9497
    9598        $this->put( $id, $service );
    96 
    9799    }
    98100
     
    101103     * Instantiate a single service.
    102104     *
    103      * @param string $class Service class to instantiate.
     105     * @param string $service_class Service class to instantiate.
    104106     *
    105107     * @throws Invalid If the service could not be properly instantiated.
     
    107109     * @return Service Instantiated service.
    108110     */
    109     private function instantiate( $class ): Service {
     111    private function instantiate( $service_class ): Service {
    110112
    111113        // The service needs to be registered, so instantiate right away.
    112         $service = $this->make( $class );
     114        $service = $this->make( $service_class );
    113115
    114116        if ( ! $service instanceof Service ) {
     
    122124     * Make an object instance out of an interface or class.
    123125     *
    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.
    129128     * @return object Instantiated object.
    130129     */
    131     private function make( string $interface_or_class, array $arguments = [] ) {
     130    private function make( string $interface_or_class, ?array $dependencies = [] ) {
    132131
    133132        $reflection = $this->get_class_reflection( $interface_or_class );
    134133        $this->ensure_is_instantiable( $reflection );
    135 
    136         $dependencies = [];
    137134
    138135        $object = $this->instantiator->instantiate( $interface_or_class, $dependencies );
     
    142139
    143140    /**
    144      * Get the reflection for a class or throw an exception.
     141     * Get the reflection for a class.
    145142     *
    146      * @param string $class Class to get the reflection for.
    147      * @return ReflectionClass Class reflection.
     143     * @param string $service_class Class name
    148144     * @throws FailedToMakeInstance If the class could not be reflected.
     145     * @return ReflectionClass      Class reflection.
    149146     */
    150     private function get_class_reflection( string $class ): ReflectionClass {
     147    private function get_class_reflection( string $service_class ): ReflectionClass {
    151148        try {
    152             return new ReflectionClass( $class );
     149            return new ReflectionClass( $service_class );
    153150        } catch ( SaltusFrameworkThrowable $exception ) {
    154             throw FailedToMakeInstance::for_unreflectable_class( $class );
     151            throw FailedToMakeInstance::for_unreflectable_class( $service_class );
    155152        }
    156153    }
     
    161158     *
    162159     * @param ReflectionClass $reflection Reflected class to check.
    163      * @return void
     160     *
    164161     * @throws FailedToMakeInstance If the interface could not be resolved.
    165162     */
     
    171168
    172169    /**
    173      * Get a fallback instantiator in case none was provided.
     170     * Get a fallback instantiator
    174171     *
    175172     * @return Instantiator Simplistic fallback instantiator.
     
    181178             * Make an object instance out of an interface or class.
    182179             *
    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             *
    185183             * @return object Instantiated object.
    186184             */
    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 );
    189187            }
    190188        };
    191 
    192189    }
    193190}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/Invalid.php

    r2986425 r3274550  
    55use InvalidArgumentException;
    66
    7 class Invalid
     7final class Invalid
    88    extends InvalidArgumentException
    99    implements SaltusFrameworkThrowable {
     
    2626        );
    2727
    28         return new static( $message );
     28        return new self( $message );
    2929    }
    3030
     
    4444        );
    4545
    46         return new static( $message );
     46        return new self( $message );
    4747    }
    4848}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Container/ServiceContainer.php

    r3115164 r3274550  
    9191     *
    9292     * @param string $id
    93      * @param string $class
    94      */
    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 ) {
    9696
    9797        // 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() ) {
    100100            return;
    101101        }
    102102
    103         $service = $this->instantiate( $class, $dependencies );
     103        $service = $this->instantiate( $service_class, $dependencies );
    104104
    105105        $this->put( $id, $service );
     
    111111        if ( $service instanceof Actionable ) {
    112112            $priority = 1;
    113             $filter = 'init';
     113            $filter   = 'init';
    114114            if ( method_exists( $service, 'priority' ) ) {
    115115                $priority = $service->priority();
     
    131131     * Instantiate a single service.
    132132     *
    133      * @param string $class Service class to instantiate.
     133     * @param string $service_class Service class to instantiate.
    134134     *
    135135     * @throws Invalid If the service could not be properly instantiated.
     
    137137     * @return Service Instantiated service.
    138138     */
    139     private function instantiate( $class, array $dependencies ): Service {
     139    private function instantiate( $service_class, array $dependencies ): Service {
    140140
    141141        // The service needs to be registered, so instantiate right away.
    142         $service = $this->make( $class, $dependencies );
     142        $service = $this->make( $service_class, $dependencies );
    143143
    144144        if ( ! $service instanceof Service ) {
     
    154154     * @param string $interface_or_class Interface or class to make an object
    155155     *                                   instance out of.
    156      * @param array  $arguments          Optional. Additional arguments to pass
     156     * @param array  $dependencies       Optional. Additional arguments to pass
    157157     *                                   to the constructor. Defaults to an
    158158     *                                   empty array.
     
    172172     * Get the reflection for a class or throw an exception.
    173173     *
    174      * @param string $class Class to get the reflection for.
     174     * @param string $service_class Class to get the reflection for.
    175175     * @return ReflectionClass Class reflection.
    176176     * @throws FailedToMakeInstance If the class could not be reflected.
    177177     */
    178     private function get_class_reflection( string $class ): ReflectionClass {
     178    private function get_class_reflection( string $service_class ): ReflectionClass {
    179179        try {
    180             return new ReflectionClass( $class );
     180            return new ReflectionClass( $service_class );
    181181        } catch ( SaltusFrameworkThrowable $exception ) {
    182             throw FailedToMakeInstance::for_unreflectable_class( $class );
     182            throw FailedToMakeInstance::for_unreflectable_class( $service_class );
    183183        }
    184184    }
     
    209209             * Make an object instance out of an interface or class.
    210210             *
    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.
    212212             * @param array  $dependencies Optional. Dependencies of the class.
    213213             * @return object Instantiated object.
    214214             */
    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 );
    217217            }
    218218        };
    219 
    220219    }
    221220}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Infrastructure/Service/Actionable.php

    r2986425 r3274550  
    1515
    1616    /**
    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.
    2018     */
    2119    public function add_action();
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Modeler.php

    r3207680 r3274550  
    1919        $this->model_factory = $model_factory;
    2020        // should contain a list of loaded models
    21 
    2221    }
    2322
     
    3736        $path = $project_path . '/src/models/';
    3837        if ( has_filter( 'saltus_models_path' ) ) {
     38            /** @deprecated 1.2.0 */
    3939            $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 );
    4043        }
    4144
     
    8184        // check for models added with filters
    8285        if ( has_filter( 'saltus_models' ) ) {
    83             $model  = apply_filters( 'saltus_models', [] );
     86            /** @deprecated 1.2.0 */
     87            $model = apply_filters( 'saltus_models', [] );
    8488            ( ! 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 ) :
    86105                    $this->create( $model )
    87106                );
     
    126145        $this->model_list[ $model->get_type() ] = $model;
    127146    }
    128 
    129147}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/BaseModel.php

    r2986425 r3274550  
    5656    protected $ui_labels;
    5757
     58    /**
     59     * Constructor.
     60     *
     61     * @param AbstractConfig $config_data The configuration data for the model.
     62     */
    5863    public function __construct( AbstractConfig $config_data ) {
    5964        $this->data   = $config_data->all();
     
    7479        // set messages to override
    7580        $this->set_messages( $config_data );
    76 
    7781    }
    7882
     
    9397     *
    9498     * Required to register post type
     99     *
     100     * @param string $name The name of the post type.
    95101     */
    96102    protected function set_name( string $name ) {
     
    102108     *
    103109     * Based on labels.overrides.ui values
     110     *
     111     * @param AbstractConfig $config The configuration labels for the model.
    104112     */
    105113    protected function set_ui_label_overrides( AbstractConfig $config ) {
     
    111119     *
    112120     * Based on labels.overrides.messages and label.overrides.bulk_messages values
     121     *
     122     * @param AbstractConfig $config The configuration labels for the model.
    113123     */
    114124    protected function set_messages( AbstractConfig $config ) {
     
    121131     *
    122132     * Based on name, or keys labels.has-one and labels.has-many
     133     *
     134     * @param AbstractConfig $config The configuration labels for the model.
    123135     */
    124136    protected function set_name_labels( AbstractConfig $config ) {
     
    146158     *
    147159     * Merge and/or replace defaults with user config
     160     *
     161     * @param array $options User defined options
    148162     */
    149163    protected function set_options( array $options ) {
     
    152166            return;
    153167        }
    154         if ( $this->data['options'] ) {
    155             $options = array_replace( $options, $this->data['options'] );
    156         }
     168
     169        $options = array_replace( $options, $this->data['options'] );
     170
    157171        $this->options = $options;
    158172    }
     
    162176     *
    163177     * If key labels.overrides exists, add to or replace label defaults
     178     *
     179     * @param array $labels User defined labels
    164180     */
    165181    protected function set_labels( array $labels ) {
     
    189205     *  10 => "Post draft updated. {Preview post}"
    190206     *
    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 {
    195212        global $post;
    196213
     
    229246                ( isset( $this->messages['post_updated_short'] ) ? str_replace( $search, $replace, $this->messages['post_updated_short'] ) :
    230247                    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 )
    234251                    )
    235252                ) :
     
    292309     * @param array[] $messages An array of bulk post updated message arrays keyed by post type.
    293310     * @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 {
    297315        $messages[ $this->name ] = [
    298316            'updated'   => isset( $this->bulk_messages['updated_singular'] ) && isset( $this->bulk_messages['updated_plural'] ) ?
     
    347365     * @param string $plural The text that will be used if $number is not 1
    348366     * @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;
    353372    }
    354373}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/Model.php

    r2986425 r3274550  
    1717     */
    1818    public function get_type();
    19 
    2019}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/ModelFactory.php

    r3031895 r3274550  
    22
    33namespace Saltus\WP\Framework\Models;
    4 use Saltus\WP\Framework\Infrastructure\Plugin\{
    5     Registerable
    6 };
    74
    85use Noodlehaus\AbstractConfig;
     
    1411    protected $project;
    1512
     13    /**
     14     * Constructor.
     15     *
     16     * @param object $app     The application instance.
     17     * @param string $project The project data.
     18     */
    1619    public function __construct( $app, $project ) {
    1720        $this->app     = $app;
     
    2023
    2124    /**
    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.
    2330     */
    2431    public function create( AbstractConfig $config ) {
     
    3744                if ( $config->has( $service_name ) && $this->app->has( $service_name ) ) {
    3845
    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 );
    4249
    43                 if ( $service_imp instanceof Processable ) {
    44                     $service_imp->process();
     50                    if ( $service_imp instanceof Processable ) {
     51                        $service_imp->process();
     52                    }
    4553                }
    46             }
    4754            }
    4855
     
    6471
    6572                    // make sure $args is an array
    66                     if( ! is_array( $args ) ){
     73                    if ( ! is_array( $args ) ) {
    6774                        $args = [];
    6875                    }
    6976
    70                     $service = $this->app->get( $normalized_feature_name );
     77                    $service     = $this->app->get( $normalized_feature_name );
    7178                    $service_imp = $service->make( $cpt->name, $this->project, $args );
    7279
     
    7986            // disable block editor only if 'block_editor' is false
    8087            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 );
    8289            }
    8390            return $cpt;
     
    9198
    9299        return false;
    93 
    94100    }
    95101}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/PostType.php

    r3098987 r3274550  
    22namespace Saltus\WP\Framework\Models;
    33
     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 */
    411class PostType extends BaseModel implements Model {
    512
     
    2835     * Get default Options
    2936     *
    30      * Turn it public, change menu position and add `supports` list.
    3137     *
    3238     * @return array The list of options settings
     
    5056
    5157    /**
    52      *
    53      *
     58     * Set the meta fields
    5459     */
    5560    protected function set_meta() {
     
    120125    /**
    121126     * Register Post Type
    122      *
    123      * @return void
    124127     */
    125128    protected function register() {
     
    140143     * Adds filters to change post update messages
    141144     * TODO: accept overrides
    142      *
    143      * @return void
    144145     */
    145146    protected function set_updated_messages() {
    146 
    147147        add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ], 1 );
    148148        add_filter( 'bulk_post_updated_messages', [ $this, 'bulk_post_updated_messages' ], 1, 2 );
    149 
    150149    }
    151150
     
    154153     *
    155154     * @param array $ui_labels
    156      * @return void
    157155     */
    158156    protected function set_ui_labels( array $ui_labels ) {
     
    183181     * Sets the placeholder text for the title field for this post type.
    184182     *
    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.
    188187     */
    189     public function enter_title_here( string $title, \WP_Post $post ) : string {
     188    public function enter_title_here( string $title, \WP_Post $post ): string {
    190189        if ( $this->name !== $post->post_type ) {
    191190            return $title;
     
    194193        return $this->ui_labels['enter_title_here'];
    195194    }
    196 
    197195}
  • interactive-globes/tags/1.4.8/vendor/saltus/framework/src/Models/Taxonomy.php

    r2986425 r3274550  
    22namespace Saltus\WP\Framework\Models;
    33
     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 */
    411class Taxonomy extends BaseModel implements Model {
    512
    613    // data req for register_taxonomy()
    7     private $links = 'post';
    814    private $associations;
    915
     
    107113
    108114    /**
    109      *
    110      *
     115     * Set meta fields
    111116     */
    112117    private function set_meta() {
Note: See TracChangeset for help on using the changeset viewer.