Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #234 from xwp/feature/customize-direct-manipulatio…
Browse files Browse the repository at this point in the history
…n-integration

Disable edit-post-links module in customize-direct-manipulation plugin
  • Loading branch information
westonruter authored Aug 31, 2016
2 parents 805bf0c + 371420b commit 0caaf65
Showing 1 changed file with 43 additions and 0 deletions.
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;
}
}

0 comments on commit 0caaf65

Please sign in to comment.