Skip to content

Commit

Permalink
Fix code style (SP -> TAB)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Jan 18, 2021
1 parent e999042 commit 60a3de9
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 73 deletions.
10 changes: 5 additions & 5 deletions src/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,11 @@ public function setup_nav_menu_item( $item ) {
*/
public function hide_menu_items() {
?>
<style type="text/css">
.ssc-hide {
display: none !important;
}
</style>
<style type="text/css">
.ssc-hide {
display: none !important;
}
</style>
<?php
}

Expand Down
36 changes: 18 additions & 18 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,31 +160,31 @@ public function publishing_actions() {
global $post;
if ( $post && $post->post_type == $mg_post_type ) {
echo '<style type="text/css">
.misc-pub-section.misc-pub-visibility,
.misc-pub-section.curtime
{
display:none;
}
</style>';
.misc-pub-section.misc-pub-visibility,
.misc-pub-section.curtime
{
display:none;
}
</style>';
} ?>

<!-- SSC TinyMCE Shortcode Plugin -->
<script type='text/javascript'>
var sscContentGroups = [];
sscContentGroups.push({
text: 'Vyberte skupinu',
value: ''
});
<!-- SSC TinyMCE Shortcode Plugin -->
<script type='text/javascript'>
var sscContentGroups = [];
sscContentGroups.push({
text: 'Vyberte skupinu',
value: ''
});
<?php
$group = new Group();
$groups = $group->get_groups();
foreach ($groups as $key => $group) { ?>
sscContentGroups.push({
text: '<?php echo $group; ?>',
value: '<?php echo $key; ?>'
});
sscContentGroups.push({
text: '<?php echo $group; ?>',
value: '<?php echo $key; ?>'
});
<?php } ?>
</script>
</script>

<?php

Expand Down
76 changes: 38 additions & 38 deletions src/Metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,59 +177,59 @@ public function render_user_profile_groups( $user ) {
$groups = $ssc_group->get_groups();
$membership = new Membership( $user->ID );
$access = $this->loader->get_access(); ?>
<style type="text/css">
#simpleshop__groups th {
padding: 15px 10px;
}
</style>
<table id="custom_user_field_table" class="form-table">
<tr id="simpleshop__groups">
<th>
<label for="custom_field"><?php _e( 'Simpleshop Groups', 'simpleshop-cz' ); ?></label>
</th>
<td>
<table>
<thead>
<tr>
<th><?php _e( 'Group name', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Is member', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Membership from', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Membership to', 'simpleshop-cz' ); ?></th>
<style type="text/css">
#simpleshop__groups th {
padding: 15px 10px;
}
</style>
<table id="custom_user_field_table" class="form-table">
<tr id="simpleshop__groups">
<th>
<label for="custom_field"><?php _e( 'Simpleshop Groups', 'simpleshop-cz' ); ?></label>
</th>
<td>
<table>
<thead>
<tr>
<th><?php _e( 'Group name', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Is member', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Membership from', 'simpleshop-cz' ); ?></th>
<th><?php _e( 'Membership to', 'simpleshop-cz' ); ?></th>

</tr>
</thead>
<tbody>
</tr>
</thead>
<tbody>
<?php foreach ( $groups as $group_id => $group_name ) { ?>
<tr>
<td><?php echo $group_name; ?></td>
<td>
<tr>
<td><?php echo $group_name; ?></td>
<td>
<?php if ( $access->user_is_admin() ) { ?>
<input type="checkbox" name="ssc_groups[<?php echo $group_id ?>][is_member]" value="on" <?php checked( array_key_exists( $group_id, $membership->groups ), true ); ?>/>
<input type="checkbox" name="ssc_groups[<?php echo $group_id ?>][is_member]" value="on" <?php checked( array_key_exists( $group_id, $membership->groups ), true ); ?>/>
<?php } else {
echo array_key_exists( $group_id, $membership->groups ) ? __( 'Yes', 'simpleshop-cz' ) : __( 'No', 'simpleshop-cz' );
} ?>
</td>
<td>
</td>
<td>
<?php if ( $access->user_is_admin() ) { ?>
<input type="text" name="ssc_groups[<?php echo $group_id ?>][subscription_date]" value="<?php echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_date_' . $group_id, true ) ?>"/>
<input type="text" name="ssc_groups[<?php echo $group_id ?>][subscription_date]" value="<?php echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_date_' . $group_id, true ) ?>"/>
<?php } else {
echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_date_' . $group_id, true );
} ?>
</td>
<td>
</td>
<td>
<?php if ( $access->user_is_admin() ) { ?>
<input type="text" name="ssc_groups[<?php echo $group_id ?>][subscription_valid_to]" value="<?php echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_valid_to_' . $group_id, true ) ?>"/>
<input type="text" name="ssc_groups[<?php echo $group_id ?>][subscription_valid_to]" value="<?php echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_valid_to_' . $group_id, true ) ?>"/>
<?php } else {
echo get_user_meta( $user->ID, $this->prefix . 'group_subscription_valid_to_' . $group_id, true );
} ?>
</td>
</tr>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</td>
</tr>
</table>
</tbody>
</table>
</td>
</tr>
</table>
<?php
}

Expand Down
24 changes: 12 additions & 12 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function field_type_disconnect_button(
$field_type_object
) {
echo '<a href="' . admin_url( 'admin.php?page=ssc_options&disconnect_simpleshop=1' ) . '">'
. _e( 'Disconnect Simple Shop', 'simpleshop-cz' )
. '</a>';
. _e( 'Disconnect Simple Shop', 'simpleshop-cz' )
. '</a>';
}

/**
Expand Down Expand Up @@ -128,10 +128,10 @@ public function add_options_page() {
*/
public function admin_page_display() {
?>
<div class="wrap cmb2-options-page <?php echo $this->key; ?>">
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
<div class="wrap cmb2-options-page <?php echo $this->key; ?>">
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>
</div>
</div>
<?php
}

Expand Down Expand Up @@ -198,13 +198,13 @@ public function add_options_page_metabox() {
[
'name' => __( 'Email message', 'simpleshop-cz' ),
'desc' => __( '<u>Povolené zástupné znaky:</u><br/>'
. '<div style="font-style:normal;"><b>{login}</b> = login<br/>'
. '<b>{password}</b> = heslo<br/>'
. '<b>{login_url}</b> = adresa, na které je možné se přihlásit<br/>'
. '<b>{pages}</b> = seznam stránek, do kterých má uživatel zakoupený přístup<br/>'
. '<b>{mail}</b> = e-mail uživatele (většinou stejný jako login)<br/>'
. '</div>'
. '', 'simpleshop-cz' ),
. '<div style="font-style:normal;"><b>{login}</b> = login<br/>'
. '<b>{password}</b> = heslo<br/>'
. '<b>{login_url}</b> = adresa, na které je možné se přihlásit<br/>'
. '<b>{pages}</b> = seznam stránek, do kterých má uživatel zakoupený přístup<br/>'
. '<b>{mail}</b> = e-mail uživatele (většinou stejný jako login)<br/>'
. '</div>'
. '', 'simpleshop-cz' ),
'id' => 'ssc_email_text',
'type' => 'wysiwyg',
'classes_cb' => [ $this, 'hide_when_invalid_keys' ],
Expand Down

0 comments on commit 60a3de9

Please sign in to comment.