-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into filip/prototype-yoast-integration
- Loading branch information
Showing
9 changed files
with
101 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
34 changes: 34 additions & 0 deletions
34
classes/suggested-tasks/local-tasks/providers/class-local-tasks-abstract.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,34 @@ | ||
<?php | ||
/** | ||
* Abstract class for a local task provider. | ||
* | ||
* @package Progress_Planner | ||
*/ | ||
|
||
namespace Progress_Planner\Suggested_Tasks\Local_Tasks\Providers; | ||
|
||
use Progress_Planner\Suggested_Tasks\Local_Tasks\Providers\Local_Tasks_Interface; | ||
|
||
/** | ||
* Add tasks for content updates. | ||
*/ | ||
abstract class Local_Tasks_Abstract implements Local_Tasks_Interface { | ||
|
||
/** | ||
* The capability required to perform the task. | ||
* | ||
* @var string | ||
*/ | ||
protected $capability = 'manage_options'; | ||
|
||
/** | ||
* Check if the user has the capability to perform the task. | ||
* | ||
* @return bool | ||
*/ | ||
public function capability_required() { | ||
return $this->capability | ||
? \current_user_can( $this->capability ) | ||
: true; | ||
} | ||
} |
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
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
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
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