Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
a59cb80
Changed the way the Domain Mapping module is loaded to better support…
Sep 7, 2019
a958ba7
Added a comment explaining the way files are included.
Sep 7, 2019
0c7e1ba
Altered the line break point for comment lines on the root plugin fil…
Sep 7, 2019
fac5561
Added includes for the Dark Matter advanced cache module.
Sep 7, 2019
5ba4009
Removed the get() method as it is not used.
Sep 7, 2019
fb50479
Implemented the invalidate() method on Request Cache Data class.
Sep 7, 2019
4c7cdf9
Removed the variants property as it is not used.
Sep 7, 2019
d5585c1
Added a stub of the DM_Cache_Post class.
Sep 7, 2019
40774de
Added logic for the invalidate() method on DM_Cache_Post.
Sep 7, 2019
edb721f
Added the save post hook implementation.
Sep 7, 2019
590b42c
Ensured that invalidating cache entries comes before instantly caching.
Sep 7, 2019
b244e35
Ensured that the fullpage cache global group is available.
Sep 7, 2019
f96fab1
Added a cache clear when WordPress cleans the post cache data.
Sep 7, 2019
f3ee9ed
Added the RSS feed to the cache invalidation link.
Sep 7, 2019
bf423d4
Used the correct class, DM_Request_Data rather than DM_Request_Cache ...
Sep 7, 2019
7becc17
Now deleting the correct cache entries in the dark-matter-fullpage gr…
Sep 8, 2019
81fed33
Made sure the dark-matter-fullpage cache group is available for use f…
Sep 8, 2019
c31eb83
Added logic to prevent revisions, etc. from interfering with the inva…
Sep 8, 2019
8c9d925
Moved the domain mapping logic in to a separate private method.
Sep 8, 2019
1cea798
Added protocol as part of the cache key.
Sep 8, 2019
04b4b45
Make sure the homepage has a forward slash.
Sep 8, 2019
48e7412
Removed save_post as the clean_post_cache is called then too.
Sep 8, 2019
49a52ab
Merge branch 'master' into 3.0.0
Jan 1, 2020
265ffe9
Added the SSO Type disable cookie.
Jan 1, 2020
4fd3a67
Added class comments for clarification.
Jan 1, 2020
aac0ef4
Re-arranged the cookie check to a separate method.
Jan 1, 2020
00873a9
Missed instantiating the $do_cache variable in the new cookie method.
Jan 1, 2020
9d299b4
Added the ability to set a querystring as a bypass for the cache.
Jan 1, 2020
79c3230
Added hard-set checks for the Request Method and ensuring that POST i…
Jan 1, 2020
1ddab15
Added a check for script name.
Jan 1, 2020
013e194
Upped the version number to 3.0.0.
Jan 1, 2020
faaf6e2
Removed unused do_cache() method on DM_Cache_Post.
Jan 4, 2020
6ef50f5
Upped the cache to 5mins.
Jan 4, 2020
e3c7d86
Added the beginning of the Cache CLI.
Jan 4, 2020
c88a315
Changing the variant array in the DM_Request_Data to use the variant …
Jan 4, 2020
148cdb3
Updated the variant remove to use the variant key as the array key.
Jan 4, 2020
be66c13
Added more data to variant record.
Jan 4, 2020
7bff981
Changed the Request set() method to pass the TTL to the DM_Request_Da…
Jan 4, 2020
1017c42
Added a header count to the variant data.
Jan 4, 2020
b48fd35
Changed TTL, Time and Size to be indicative of what value is stored.
Jan 4, 2020
c10712b
Renamed the Cache CLI namespace to be Full Page.
Jan 4, 2020
a55484f
Added a bit of safety to the advanced-cache.php script.
Jan 4, 2020
61a0bfe
Added a constant for knowing if Dark Matter's full page caching is be…
Jan 4, 2020
c08af01
Making the advanced-cache.php optional for installations using Dark M…
Jan 4, 2020
3236a2e
Ensured the CLI continues to work for the full page caching.
Jan 4, 2020
ca4cfe1
Added the ability to retrieve the Request Cache Data to DM_Request_Data.
Jan 4, 2020
6a0cd4f
CLI fullpage stats subcommand now displays a basic table.
Jan 4, 2020
46b62c7
Fixed a bug updating the data for the variants since changing the arr…
Jan 4, 2020
7a0ea08
Added a "Remaining" column which tells CLI admins how long the varian…
Jan 4, 2020
9266a82
Added better formatting for the Time column.
Jan 4, 2020
726bea0
Ensured the Time includes the timezone and more predictable output.
Jan 4, 2020
24b12f6
Added logic to store the a friendly name for a cache variant.
Jan 5, 2020
1b6c5de
Added the logic to send the variant name for the full page caching.
Jan 5, 2020
3ac6472
Fixed a typo with the variant name being set on DM_Request_Cache.
Jan 5, 2020
a424801
Added the variant name to the stats output.
Jan 5, 2020
5c6f9ae
Changed stats subcommand to info as it is more accurate a name.
Jan 5, 2020
0a94622
Added a format argument to the info subcommand.
Jan 5, 2020
4cd80c3
Added a get_data() to the DM_Request_Cache.
Jan 5, 2020
e1b0656
Changed the info subcommand to make use of the DM_Request_Cache objec…
Jan 5, 2020
4ea9063
Fixed a few notices on the invalidate method now that the Variant rec…
Jan 5, 2020
676d06e
Added the logic for the invalidate subcommand.
Jan 5, 2020
06be7b6
Fixed a typo preventing another source using a custom variant.
Jan 5, 2020
e7d5aed
Added an optional config file include for advanced cache.
Jan 5, 2020
38bae17
Added a subcommand for updating the dropin plugin.
Jan 5, 2020
332baa5
Ensured that the advanced-cache-config.php loads for the WP CLI.
Jan 5, 2020
bdd2943
Fixed an issue where the dark-matter-fullpage-data cache group wasn't…
Jan 5, 2020
f36bc7e
Fixed issues with the invalidate() method of the DM_Request_Data.
Jan 5, 2020
3be8cda
Added the ability to invalidate a specific variant.
Jan 5, 2020
7482857
Added a pre-cache output action.
Jan 6, 2020
a16b80c
Moved the TTL in to its own method and added a filter.
Jan 6, 2020
eb4632d
Created a new Cache Info class.
Jan 11, 2020
c28f021
Added the logic for constructing Cache Info data set.
Jan 11, 2020
890f75e
Included the DM_Cache_Info file.
Jan 11, 2020
c050323
Made friendlier field names.
Jan 11, 2020
d141961
Replaced the old logic with the new DM_Cache_Info on the info subcomm…
Jan 11, 2020
dbe9c7c
Added a new class for handling the Admin UI functionality.
Jan 11, 2020
ab8158a
Added logic to determine when to add to the Admin Menu Bar.
Jan 11, 2020
69e1f7d
Added a permission check.
Jan 11, 2020
f1027c6
Added a method for getting the current URL.
Jan 11, 2020
fbe0b16
Built a get_standard() method for the Cache Info.
Jan 11, 2020
61f68db
Added a get_cache_info() method.
Jan 11, 2020
3abcbb9
Fixed an issue where checking if a cache entry can be created was too…
Jan 11, 2020
806a374
Added the logic for display a basic admin bar of the fullpage cache i…
Jan 11, 2020
36e2b84
Added a method to return the number of variants.
Jan 11, 2020
a825190
Increase the amount of information displayed for the cache details on…
Jan 11, 2020
b3b027a
Included the Admin UI class file.
Jan 11, 2020
fd14d36
Added variant name to the TTL value filter.
Jan 11, 2020
b2206ab
Added the PSR-4 autoloader to composer.
cameronterry Apr 15, 2022
4ebaf06
Created a Registerable interface.
cameronterry Apr 15, 2022
9faf6b7
Added the require for the PSR-4 autoloader.
cameronterry Apr 15, 2022
3f4e723
Merged 'develop' into 'release/3.0.0', resolved conflicts.
cameronterry May 8, 2022
eb0a317
Stopped the deletion of the vendor folder for releases (needed for au…
Oct 29, 2022
1fcbf23
Merge branch 'develop' into release/3.0.0
cameronterry Oct 29, 2022
19b4f23
Created a new class to handle the instantiation.
cameronterry May 21, 2022
df1c716
Removed the Instructions namespace from 3.0.0 branch.
Oct 29, 2022
d79f992
Added the DarkMatter class instantiation.
Oct 29, 2022
de8c944
Fix merge conflicts on cherry-pick 0135d1a473b5f644c9df846931c3ccec0f…
cameronterry Oct 29, 2022
5c36a72
Moved Registerable into the interfaces folder.
Oct 29, 2022
5e2862a
Moved the two domain mapping classes into the new folder.
Oct 29, 2022
a84695b
Converted the Domains REST controller into it's new namespace.
Oct 29, 2022
0c51c4d
Renamed Domains REST API file into a more PSR-4 friendly name.
Oct 29, 2022
2ce298c
Removed the file includes from the older domain mapping.
Oct 29, 2022
b545086
Added REST API support to the DarkMatter class register.
Oct 29, 2022
4ad8ccc
Instantiated the Domains class in the REST class register.
Oct 29, 2022
ee52397
Added REST API support to the DarkMatter class register.
Oct 29, 2022
98f05f0
Merged 'release/3.0.0' into 'feature/darkmatter-autoloader', resolved…
cameronterry Oct 29, 2022
bdf5ebf
Prepared Restricted API to the new namespacing,
Oct 29, 2022
0bb7dcf
Instantiated the new namespaced Restricted.
Oct 29, 2022
0854fde
Moved the CLI files into their new home.
Oct 29, 2022
6d56ef4
Converted the domain CLI into the new namespace.
Oct 29, 2022
d005027
Added CLI support in the class register.
Oct 29, 2022
c0e2b42
Added the logic to load CLI\Domains, and fixed the namespace.
Oct 29, 2022
45f9d8c
Removed the old file includes for domain mapping CLIs.
Oct 29, 2022
e4a0108
Moved the Dropin CLI to the new namespace.
Oct 29, 2022
97fe302
Moved Restricted CLI to the new namespace.
Oct 29, 2022
eeedd7a
Moved the database class into the new folder.
Oct 29, 2022
6ed43f8
Renamed and reworked DM_Database into the new namespace.
Oct 29, 2022
9658a9c
Hooked up the Installer class.
Oct 29, 2022
9b7bf4b
Moved DM_URL into its new namespace home.
Oct 29, 2022
97c39cc
Converted DM_URL into Mapping and adjusted to namespace.
Oct 29, 2022
4f9aacd
Updated the filename to be the new name, Mapping.
Oct 29, 2022
a3355a1
Created a new class for housing various helper functions / methods.
Oct 29, 2022
bb026cc
Replaced the Processor\Mapping with the Helper methods. Also temporar…
Oct 29, 2022
79798b0
Renamed the Processors namespace to be singular.
Oct 29, 2022
8cbd164
Renamed Helpers to singular.
Oct 29, 2022
e6ea982
Fixed the unit tests for domain mapping.
Oct 29, 2022
b003741
Moved DM_Media into it's new home.
Oct 30, 2022
2c4ddbb
Namespaced and renamed DM_Media into the Processors.
Oct 30, 2022
e6fd3fe
Moved the DM_UI to it's new home.
Oct 30, 2022
5641881
Renamed DM_UI to DomainSettings (which is more accurate name).
Oct 30, 2022
cac6b0e
Created a new AbstractAdminPage class for simplifying admin pages acr…
Oct 30, 2022
599df48
Namespaced and updated the old DM_UI to use the new Abstract class.
Oct 30, 2022
c029b31
Added the logic for including the Settings > Domains admin page.
Oct 30, 2022
4669068
Given the changes to DomainSettings from it's old class, changed the …
Oct 30, 2022
30f8ced
Created a new AbstractAdminPage class for simplifying admin pages acr…
Oct 30, 2022
8748844
Moved the Installer class instantiation to the correct place.
Oct 30, 2022
08901e4
Added the since for the DarkMatter class and methods.
Oct 30, 2022
0e4cf78
Moved DM_Domain into it's new home.
Oct 30, 2022
fe1d89f
Namespaced DM_Domain into it's new home.
Oct 30, 2022
6f97bae
Updated the references to DM_Domain to the new namespace version.
Oct 30, 2022
e849647
Fixed a few DM_Domain references in the unit tests.
Oct 30, 2022
1185cee
Moved DarkMatter_Primary to its new home.
Oct 30, 2022
3c5c9cd
Namespaced the Primary domain in its new home.
Oct 30, 2022
6778fef
Updated the references to Primary to the new namespace class.
Oct 30, 2022
8ad9323
Updated the primary domain unit tests.
Oct 30, 2022
e48f1c9
Moved Restricted to its new home.
Oct 30, 2022
b135a45
Updated Restricted to its new namespace home.
Oct 30, 2022
799f576
Updated the references to Restricted.
Oct 30, 2022
876ebd5
Updated the Restricted unit tests.
Oct 30, 2022
d1da2df
Moved Domains to its new home.
Oct 30, 2022
fae4730
Updated Domain to be namespaced.
Oct 30, 2022
3fe0291
Updated most of the references to use the new Domain manager.
Oct 30, 2022
26c8dce
Updated sunrise.php to include the autoloader and use the new Domain …
Oct 30, 2022
d4270e5
Updated the unit tests to work with the new Domains manager.
Oct 30, 2022
5df6144
Moved the Yoast compat into its new home.
Oct 30, 2022
2615bf8
Updated Yoast to its new namespace home.
Oct 30, 2022
d171c39
Moved sunrise.php to its own file.
Oct 30, 2022
caff8ad
Removed the old Yoast file.
Oct 30, 2022
9ca06f6
Created a new class for handling Sunrise logic.
Oct 30, 2022
f85cb6b
Added a new helper method for getting the FDQN.
Oct 30, 2022
800245d
Added the logic for define global cache group and a few constants.
Oct 30, 2022
9870fff
Added the logic to set the global variables.
Oct 30, 2022
cfa156f
Added a method to update the global variables if a primary domain is …
Oct 30, 2022
38fbca9
Updated the sunrise.php to use the new autoloader.
Oct 30, 2022
f0b1f8c
Removed the old sunrise.php dropin.
Oct 30, 2022
e2c9999
Created new class to house the Redirect.
Oct 30, 2022
e0c10f5
Added a stub for the can_redirect method.
Oct 30, 2022
218aeb2
Added the logic for the can_redirect() method.
Oct 30, 2022
b6c899c
Added the logic for the Redirect hook.
Oct 30, 2022
9fdf1cb
Added a new method for checking for AJAX requests.
Oct 30, 2022
46aa7be
Added a method for detecting admin requests.
Oct 30, 2022
85ada88
Added a helper method for detecting if a blog/site is public.
Oct 30, 2022
417e5fa
Switched Sunrise to use the new helper method.
Oct 30, 2022
cac1ea0
Added a check for current blog/site being public.
Oct 30, 2022
b5d5103
Ensured the slashes are removed from host name.
Oct 30, 2022
b86d63e
Added the allowed logins check and tidied up some comments.
Oct 30, 2022
bea2af6
Fixed a comment and some namespacing.
Oct 30, 2022
673acb9
Added the final redirect checks.
Oct 30, 2022
6829b38
Ensured the $original_blog in Redirect is retrieved correctly.
Oct 30, 2022
9a84ca4
Hooked up the redirect logic inside Sunrise.
Oct 30, 2022
7557ad7
Added a new is_admin() helper method.
Oct 30, 2022
88184c0
Switched redirect to is_admin() helper.
Oct 30, 2022
dd8c608
Added a get request filename helper method.
Oct 30, 2022
bf21930
Switched redirect to use the new filename helper.
Oct 30, 2022
bdbb417
Helper's admin check will now default to the current request filename…
Oct 30, 2022
45c9b66
Fixed an issue where primary domain was used for CSS / JS on login / …
Oct 30, 2022
4e6c92d
Changed Mapping processor to use the is public helper method.
Oct 30, 2022
1cdb88b
Fixed a bug with the redirect caused by moving some logic into the he…
Oct 30, 2022
e8958aa
Disengaged mapping if site is _not_ public.
Oct 30, 2022
73dffd4
Removed the old redirect file.
Oct 30, 2022
cb3df1f
Moved Health Checks to its new home.
Nov 3, 2022
607cad7
Namespaced DM_HealthChecks.
Nov 3, 2022
bef00ac
Tweaked the folder paths of the dropin health checks.
Nov 3, 2022
03d8925
Fixed the REST APIs to use the correct namespace classes.
Nov 3, 2022
d8b529f
Fixed the CLIs with the new namespaced class names.
Nov 3, 2022
26ff4c8
Haphazardly dumped some straggler logic into the register_domainmappi…
Nov 3, 2022
03bb06f
Updated all the since and package phpdocs for the domain mapping.
Nov 3, 2022
3f251b1
Merged 'develop' into 'feature/darkmatter-autoloader', resolved confl…
cameronterry Dec 18, 2022
c245b8d
Changed the package phpdoc from DarkMatter to DarkMatterPlugin.
cameronterry Dec 18, 2022
1d07a24
Fixed a typo in the phpcs disable.
cameronterry Dec 18, 2022
e57e2e0
Properly applied the PHP 8.1 fix for 3.0.0 - where the request filena…
cameronterry Dec 18, 2022
7a4e10a
PHPCS fixes and standardised to shorthand array usage.
cameronterry Dec 18, 2022
4438818
Merged '3.0.0' into 'feature/darkmatter-autoloader', resolved conflicts.
cameronterry Dec 18, 2022
a385cca
Revert "Merged '3.0.0' into 'feature/darkmatter-autoloader', resolved…
cameronterry Dec 18, 2022
1735565
Merged 'release/3.0.0' into 'feature/darkmatter-autoloader', resolved…
cameronterry Dec 18, 2022
aeb5173
Merge pull request #103 from cameronterry/feature/darkmatter-autoloader
cameronterry Dec 18, 2022
d440a8e
Added a stub class for the LocalStorage / IFrame.
cameronterry Dec 18, 2022
ba2827a
Have the beginning of a Token class created.
cameronterry Mar 12, 2023
f306947
Added a delete token method.
cameronterry Mar 12, 2023
5b626c0
Created an update method.
cameronterry Mar 12, 2023
9caf991
Added a get method to the Token class.
cameronterry Mar 12, 2023
67dbf0d
Created a stub for the Authorisation process.
cameronterry Mar 12, 2023
6f38610
Added logic for the Authorise to get the URL data.
cameronterry Mar 12, 2023
118e93a
Refactored the URL data retrieval into it's own method.
cameronterry Mar 12, 2023
a0a60ed
Added a handle method for the visitor-side request.
cameronterry Mar 12, 2023
6f30dee
Created the logic to verify an Authorisation request.
cameronterry Mar 12, 2023
400a7d1
Created the process which creates the Token.
cameronterry Mar 12, 2023
fb2774b
Reworked the way the actions are added.
cameronterry Mar 12, 2023
106c071
Fixed a few minor issues that prevented the authorise / verify from w…
cameronterry Mar 12, 2023
6c83f11
Added Token ID to the `authorised` action.
cameronterry Mar 12, 2023
ed3cac6
Put together the stub for Authenticate.
cameronterry Mar 12, 2023
4d7b232
Moved Authorise init hooks to a later priority to benefit from domain…
cameronterry Mar 12, 2023
37f6e4b
Reworked Token class so the prefix can be changed.
cameronterry Mar 14, 2023
4213f49
Changed Authorise to use the Token with the changes.
cameronterry Mar 14, 2023
d54a28a
Added the logic to prepare for a signin request.
cameronterry Mar 14, 2023
17a55c4
Added a method to get the URL data.
cameronterry Mar 14, 2023
8f85518
Ensure the Authorise token gets deleted after it's been authorised.
cameronterry Mar 14, 2023
1e182a1
Added logic to process sign in.
cameronterry Mar 14, 2023
68589c0
Storing the session token from the admin side for reuse with the mapped.
cameronterry Mar 14, 2023
6cd5ece
Created a new file for holding generic utility functions.
cameronterry Mar 18, 2023
523fd1f
Switched to the using the DMP version of verify nonce.
cameronterry Mar 18, 2023
ac72bf9
Added an explanatory comment on verify nonce.
cameronterry Mar 18, 2023
3ad18cd
Added the instantiation of SSO.
cameronterry Mar 18, 2023
095c8bf
Added a die call after the Authorise redirect.
cameronterry Mar 18, 2023
ba663f3
Remove debug code.
cameronterry Mar 18, 2023
d38ed9f
Added ability to override the cache group to the Token API.
cameronterry Mar 18, 2023
1c9a650
Changed the cache group and make it global for Authorise tokens.
cameronterry Mar 18, 2023
834da86
Added a different cache group for Authenticate tokens.
cameronterry Mar 18, 2023
0fc440f
Added a stub class for handling the JS side of SSO.
cameronterry Mar 18, 2023
ef8836c
Added some additional checks for SSO Authorise.
cameronterry Mar 19, 2023
a707add
Ensure the SSO does not load in the WP CLI.
cameronterry Mar 19, 2023
3c2311f
Added logic to pass data into localStorage.
cameronterry Mar 19, 2023
203012a
Added the iframe endpoint for SSO.
cameronterry Mar 19, 2023
ced937a
Removed code for automatic SSO.
cameronterry Mar 19, 2023
022395c
Added a new helper static method to get the check URL from Authorise.
cameronterry Mar 19, 2023
9ac276d
Created a new admin button for logging in a person to the primary dom…
cameronterry Mar 19, 2023
b946174
Forgot to switch to the variable.
cameronterry Mar 19, 2023
072ab7b
Removed the Old SSO third-party cookie idea.
cameronterry Mar 19, 2023
6b5e0ac
Added an key to the checks for authenticating.
cameronterry Apr 2, 2023
1f5b306
Merge pull request #109 from cameronterry/feature/new-sso-module
cameronterry May 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"autoload": {
"psr-4": {
"DarkMatter\\": "includes/classes/"
}
}
}
18 changes: 15 additions & 3 deletions dark-matter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@
*/
wp_cache_add_global_groups( 'dark-matter' );

require_once DM_PATH . '/dark-matter/class-dm-pluginupdate.php';
/**
* Include the PSR-4 autoloader.
*/
if ( file_exists( DM_PATH . 'vendor/autoload.php' ) ) {
require_once DM_PATH . 'vendor/autoload.php';
}

require_once DM_PATH . 'dark-matter/class-dm-pluginupdate.php';
new DM_PluginUpdate();

/**
* Domain Mapping module.
* Non-autoloader files.
*/
require_once DM_PATH . '/includes/utility/functions.php';

/**
* Let the magic - and bugs ... probably bugs! - begin.
*/
require DM_PATH . '/domain-mapping/domain-mapping.php';
\DarkMatter\DarkMatter::instance();
124 changes: 0 additions & 124 deletions domain-mapping/classes/class-dm-ui.php

This file was deleted.

53 changes: 0 additions & 53 deletions domain-mapping/domain-mapping.php

This file was deleted.

33 changes: 0 additions & 33 deletions domain-mapping/inc/compat.php

This file was deleted.

Loading