Skip to content

Commit

Permalink
Release v2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Apr 30, 2021
2 parents e5435ec + 48f81ff commit 9f4d143
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 34 deletions.
4 changes: 2 additions & 2 deletions js/gutenberg/ss-gutenberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const withInspectorControls = createHigherOrderComponent((BlockEdit) => {
title={__('SimpleShop Settings', 'simpleshop-cz')}
initialOpen={true}
>
<p><a href="https://podpora.redbit.cz/stitek/wp-plugin/">
<p><a href="https://podpora.redbit.cz/stitek/wp-plugin/" target="_blank">
{__('Help - SimpleShop plugin', 'simpleshop-cz')}
</a>
</p>
Expand Down Expand Up @@ -235,7 +235,7 @@ const EditSimpleShop = (props) => {
}
return (
<div className={className}>
<div>SimpleShop Form {attributes.ssFormId}</div>
<div>{__('SimpleShop Form', 'simpleshop-cz')} {attributes.ssFormId}</div>

<InspectorControls key="inspector">
<PanelBody>
Expand Down
12 changes: 6 additions & 6 deletions js/tiny-mce/tiny-mce.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
var win = ed.windowManager.open({
width: 600,
height: 300,
title: 'SimpleShop Formulář',
title: 'SimpleShop formulář',
body: [
{
type: 'listbox',
Expand Down Expand Up @@ -72,21 +72,21 @@
var selectedText = ed.selection.getContent({format: 'html'});

var win = ed.windowManager.open({
width: 600,
width: 620,
height: 300,
title: 'SimpleShop zabezpečený obsah',
body: [
{
type: 'listbox',
name: 'sscContentGroupID',
label: 'Skupina',
label: 'Členská sekce',
values: sscContentGroups,
value: 'test2' // Sets the default
value: ''
},
{
type: 'listbox',
name: 'sscContentIsMember',
label: 'Je členem skupiny?',
label: 'Je členem členské sekce?',
values: [
{
text: 'Ano',
Expand Down Expand Up @@ -122,7 +122,7 @@
{
type: 'textbox',
name: 'sscContentDaysToView',
label: 'Povolit přístup po X dnech od přiřazení do skupiny',
label: 'Povolit přístup po X dnech od přiřazení do členské sekce',
minWidth: 200,
value: ''
},
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: redbitcz, simpleshopcz, jakubboucek, vasikgreif
Tags: simpleshop, simple eshop, selling form
Requires at least: 5.0.0
Tested up to: 5.6
Tested up to: 5.7
Requires PHP: 5.6.20
Stable tag: trunk
License: MIT
Expand Down
46 changes: 21 additions & 25 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,34 +154,30 @@ public function remove_quick_edit( $actions, $post ) {
public function publishing_actions() {
$mg_post_type = 'ssc_group';
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>';
} ?>

$group = new Group();
$groups = $group->get_groups();

$outputGroups = [[ 'text' => __( 'Doesn\'t matter', 'simpleshop-cz' ), 'value' => '' ]];

foreach ( $groups as $value => $text ) {
$outputGroups[] = [ 'text' => $text, 'value' => (string)$value ];
}
?>

<?php if ( $post && $post->post_type === $mg_post_type ) : ?>
<style type="text/css">
.misc-pub-section.misc-pub-visibility,
.misc-pub-section.curtime {
display: none;
}
</style>
<?php endif; ?>

<!-- SSC TinyMCE Shortcode Plugin -->
<script type='text/javascript'>
var sscContentGroups = [];
sscContentGroups.push({
text: '<?= esc_js( __( 'Doesn\'t matter', 'simpleshop-cz' ) )?>',
value: ''
});
<?php
$group = new Group();
$groups = $group->get_groups();
foreach ($groups as $key => $group) { ?>
sscContentGroups.push({
text: '<?= esc_js( $group ) ?>',
value: '<?= esc_js( $key ) ?>'
});
<?php } ?>
var sscContentGroups = <?= wp_json_encode( $outputGroups ) ?>;
</script>

<?php
}

Expand Down Expand Up @@ -319,7 +315,7 @@ public function enqueue_admin_scripts() {
wp_register_style( 'jquery-ui', 'https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css' );
wp_enqueue_style( 'jquery-ui' );

if ( $current_screen && 'profile' === $current_screen->id ) {
if ( 'profile' === $current_screen->id || 'user-edit' === $current_screen->id ) {
wp_enqueue_script( 'jquery-ui-datepicker' );
}
}
Expand Down

0 comments on commit 9f4d143

Please sign in to comment.