Skip to content

Commit

Permalink
Increase template count get from 10 to 100, and sort alphabetically(?…
Browse files Browse the repository at this point in the history
…) by name, to ease finding templates
  • Loading branch information
benlk committed May 2, 2019
1 parent adf3909 commit 080e306
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions inc/admin/class-mailchimp-post-type-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public function render_settings_page() {
$lists = $this->api->get( 'lists' );
$segments = array();
$groups = array();
$templates = $this->api->get( 'templates', [
'type' => 'user',
'count' => 100,
'sort_field' => 'name'
]);

foreach ( $lists['lists'] as $list ) {
$list_segments = $this->api->get( 'lists/' . $list['id'] . '/segments' );
Expand All @@ -74,9 +79,7 @@ public function render_settings_page() {
'lists' => $lists,
'segments' => $segments,
'groups' => $groups,
'templates' => $this->api->get( 'templates', [
'type' => 'user',
]),
'templates' => $templates,
'post_type_obj' => $this->post_type_obj,
'settings_key' => $this->settings_key,
'saved_settings' => get_option( $this->settings_key, false ),
Expand Down

0 comments on commit 080e306

Please sign in to comment.