Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
civicrm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
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
plugins
civicrm
Commits
baed88e5
Verified
Commit
baed88e5
authored
5 years ago
by
Andrei Mondoc
Committed by
Kevin Cristiano
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
prevent clash with CiviCRM WP REST plugin
Signed-off-by:
Kevin Cristiano
<
kcristiano@kcristiano.com
>
parent
d04385be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
civicrm.php
+12
-6
12 additions, 6 deletions
civicrm.php
with
12 additions
and
6 deletions
civicrm.php
+
12
−
6
View file @
baed88e5
...
@@ -523,8 +523,10 @@ class CiviCRM_For_WordPress {
...
@@ -523,8 +523,10 @@ class CiviCRM_For_WordPress {
include_once
CIVICRM_PLUGIN_DIR
.
'includes/civicrm.basepage.php'
;
include_once
CIVICRM_PLUGIN_DIR
.
'includes/civicrm.basepage.php'
;
$this
->
basepage
=
new
CiviCRM_For_WordPress_Basepage
;
$this
->
basepage
=
new
CiviCRM_For_WordPress_Basepage
;
// Include REST API autoloader class
if
(
!
class_exists
(
'CiviCRM_WP_REST\Autoloader'
)
)
{
require_once
(
CIVICRM_PLUGIN_DIR
.
'wp-rest/Autoloader.php'
);
// Include REST API autoloader class
require_once
(
CIVICRM_PLUGIN_DIR
.
'wp-rest/Autoloader.php'
);
}
}
}
...
@@ -650,11 +652,15 @@ class CiviCRM_For_WordPress {
...
@@ -650,11 +652,15 @@ class CiviCRM_For_WordPress {
// Register hooks for clean URLs.
// Register hooks for clean URLs.
$this
->
register_hooks_clean_urls
();
$this
->
register_hooks_clean_urls
();
// Set up REST API.
if
(
!
class_exists
(
'CiviCRM_WP_REST\Plugin'
)
)
{
CiviCRM_WP_REST\Autoloader
::
add_source
(
$source_path
=
trailingslashit
(
CIVICRM_PLUGIN_DIR
.
'wp-rest'
)
);
// Set up REST API.
CiviCRM_WP_REST\Autoloader
::
add_source
(
$source_path
=
trailingslashit
(
CIVICRM_PLUGIN_DIR
.
'wp-rest'
)
);
// Init REST API.
// Init REST API.
new
CiviCRM_WP_REST\Plugin
;
new
CiviCRM_WP_REST\Plugin
;
}
}
}
...
...
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