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

Commit

Permalink
No need to pass the cap section data as json. We can just output thos…
Browse files Browse the repository at this point in the history
…e since they always stay the same.
  • Loading branch information
Justin Tadlock committed Sep 10, 2015
1 parent 21bb670 commit a13ded3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 0 additions & 7 deletions admin/class-cap-section.php
Expand Up @@ -113,12 +113,5 @@ public function to_json() {
// Set up the ID and class.
$this->json['id'] = $this->section;
$this->json['class'] = 'members-tab-content' . ( $is_editable ? ' editable-role' : '' );

// Set up the labels.
$this->json['label'] = array(
'cap' => esc_html__( 'Capability', 'members' ),
'grant' => esc_html__( 'Grant', 'members' ),
'deny' => esc_html__( 'Deny', 'members' )
);
}
}
12 changes: 6 additions & 6 deletions admin/tmpl/cap-section.php
Expand Up @@ -16,17 +16,17 @@

<thead>
<tr>
<th class="column-cap">{{ data.label.cap }}</th>
<th class="column-grant">{{ data.label.grant }}</th>
<th class="column-deny">{{ data.label.deny }}</th>
<th class="column-cap"><?php esc_html_e( 'Capability', 'members' ); ?></th>
<th class="column-grant"><?php esc_html_e( 'Grant', 'members' ); ?></th>
<th class="column-deny"><?php esc_html_e( 'Deny', 'members' ); ?></th>
</tr>
</thead>

<tfoot>
<tr>
<th class="column-cap">{{ data.label.cap }}</th>
<th class="column-grant">{{ data.label.grant }}</th>
<th class="column-deny">{{ data.label.deny }}</th>
<th class="column-cap"><?php esc_html_e( 'Capability', 'members' ); ?></th>
<th class="column-grant"><?php esc_html_e( 'Grant', 'members' ); ?></th>
<th class="column-deny"><?php esc_html_e( 'Deny', 'members' ); ?></th>
</tr>
</tfoot>

Expand Down

0 comments on commit a13ded3

Please sign in to comment.