Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ETH Escape Headspace
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WP Plugins
ETH Escape Headspace
Commits
9fa65125
Commit
9fa65125
authored
9 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Defer to HeadSpace2 when active
parent
9566c1f5
No related branches found
No related tags found
1 merge request
!6
Defer to HeadSpace2 when active
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
eth-escape-headspace.php
+14
-1
14 additions, 1 deletion
eth-escape-headspace.php
with
14 additions
and
1 deletion
eth-escape-headspace.php
+
14
−
1
View file @
9fa65125
...
...
@@ -67,11 +67,24 @@ class ETH_Escape_HeadSpace2 {
);
/**
* Register plugin's hooks
* Defer plugin hook additions until all plugins are loaded
* Allows plugin to defer to HeadSpace2 when active
*
* @return null
*/
private
function
__construct
()
{
add_action
(
'plugins_loaded'
,
array
(
$this
,
'maybe_add_hooks'
)
);
}
/**
* Conditionally register plugin's hooks
*/
public
function
maybe_add_hooks
()
{
// Defer to HeadSpace2 when active
if
(
class_exists
(
'HeadSpace_Plugin'
)
)
{
return
;
}
add_filter
(
'pre_get_document_title'
,
array
(
$this
,
'filter_pre_get_document_title'
)
);
add_filter
(
'wp_title'
,
array
(
$this
,
'filter_wp_title'
),
10
,
3
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment