Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -6,10 +6,10 @@ use MailPoet\Subscription;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class Pages {
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
function init() {
|
||||
public function init() {
|
||||
WPFunctions::get()->registerPostType('mailpoet_page', [
|
||||
'labels' => [
|
||||
'name' => WPFunctions::get()->__('MailPoet Page', 'mailpoet'),
|
||||
@ -27,7 +27,7 @@ class Pages {
|
||||
]);
|
||||
}
|
||||
|
||||
static function createMailPoetPage() {
|
||||
public static function createMailPoetPage() {
|
||||
WPFunctions::get()->removeAllActions('pre_post_update');
|
||||
WPFunctions::get()->removeAllActions('save_post');
|
||||
WPFunctions::get()->removeAllActions('wp_insert_post');
|
||||
@ -44,7 +44,7 @@ class Pages {
|
||||
return ((int)$id > 0) ? (int)$id : false;
|
||||
}
|
||||
|
||||
static function getMailPoetPages() {
|
||||
public static function getMailPoetPages() {
|
||||
return WPFunctions::get()->getPosts([
|
||||
'post_type' => 'mailpoet_page',
|
||||
]);
|
||||
@ -55,7 +55,7 @@ class Pages {
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
static function isMailpoetPage($id) {
|
||||
public static function isMailpoetPage($id) {
|
||||
$mailpoetPages = static::getMailPoetPages();
|
||||
foreach ($mailpoetPages as $mailpoetPage) {
|
||||
if ($mailpoetPage->ID === $id) {
|
||||
@ -65,7 +65,7 @@ class Pages {
|
||||
return false;
|
||||
}
|
||||
|
||||
static function getAll() {
|
||||
public static function getAll() {
|
||||
$all_pages = array_merge(
|
||||
static::getMailPoetPages(),
|
||||
WPFunctions::get()->getPages()
|
||||
@ -79,7 +79,7 @@ class Pages {
|
||||
return $pages;
|
||||
}
|
||||
|
||||
static function getPageData($page) {
|
||||
public static function getPageData($page) {
|
||||
$subscription_url_factory = Subscription\SubscriptionUrlFactory::getInstance();
|
||||
return [
|
||||
'id' => $page->ID,
|
||||
|
Reference in New Issue
Block a user