unit tests and cleanup
This commit is contained in:
15
lib/Settings/Charsets.php
Normal file
15
lib/Settings/Charsets.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace MailPoet\Settings;
|
||||
|
||||
class Charsets {
|
||||
static function getAll() {
|
||||
return array(
|
||||
'UTF-8', 'UTF-7', 'BIG5', 'ISO-2022-JP',
|
||||
'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3',
|
||||
'ISO-8859-4', 'ISO-8859-5', 'ISO-8859-6',
|
||||
'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9',
|
||||
'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14',
|
||||
'ISO-8859-15', 'Windows-1251', 'Windows-1252'
|
||||
);
|
||||
}
|
||||
}
|
@@ -8,14 +8,14 @@ class Pages {
|
||||
'post_type' => 'mailpoet_page'
|
||||
));
|
||||
|
||||
$pages = array_merge($mailpoet_pages, get_pages());
|
||||
|
||||
foreach($pages as $key => $page) {
|
||||
$page = (array)$page;
|
||||
$page['preview_url'] = get_permalink($page['ID']);
|
||||
$page['edit_url'] = get_edit_post_link($page['ID']);
|
||||
|
||||
$pages[$key] = $page;
|
||||
$pages = array();
|
||||
foreach(array_merge($mailpoet_pages, get_pages()) as $page) {
|
||||
$pages[] = array(
|
||||
'id' => $page->ID,
|
||||
'title' => $page->post_title,
|
||||
'preview_url' => get_permalink($page->ID),
|
||||
'edit_url' => get_edit_post_link($page->ID)
|
||||
);
|
||||
}
|
||||
|
||||
return $pages;
|
||||
|
Reference in New Issue
Block a user