This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from xwp/feature/customize-direct-manipulatio…
…n-integration Disable edit-post-links module in customize-direct-manipulation plugin
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
php/plugin-support/class-customize-posts-direct-manipulation-support.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Integration of Customize Posts with the Customize Direct Manipulation plugin. | ||
* | ||
* @package WordPress | ||
* @subpackage Customize | ||
*/ | ||
|
||
/** | ||
* Class Customize_Posts_Direct_Manipulation_Support | ||
*/ | ||
class Customize_Posts_Direct_Manipulation_Support extends Customize_Posts_Plugin_Support { | ||
|
||
/** | ||
* Plugin slug. | ||
* | ||
* @access public | ||
* @var string | ||
*/ | ||
public $slug = 'customize-direct-manipulation/customize-direct-manipulation.php'; | ||
|
||
/** | ||
* Add plugin support. | ||
* | ||
* @access public | ||
*/ | ||
public function add_support() { | ||
add_filter( 'customize_direct_manipulation_disabled_modules', array( $this, 'filter_disabled_modules' ) ); | ||
} | ||
|
||
/** | ||
* Disable the edit-post-links module in Customize Direct Manipulation. | ||
* | ||
* @access public | ||
* | ||
* @param array $disabled_modules Disabled modules. | ||
* @returns array Amended disabled modules | ||
*/ | ||
public function filter_disabled_modules( $disabled_modules ) { | ||
$disabled_modules[] = 'edit-post-links'; | ||
return $disabled_modules; | ||
} | ||
} |