Skip to content

Commit

Permalink
v2.0.1rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed Sep 23, 2019
1 parent 4d28a12 commit da9dbf8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
14 changes: 6 additions & 8 deletions admin/partials/reorder-post-within-categories-admin-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
$term_selected = '';
?>
<div class="wrap">
<div class="icon32 icon32-posts-<?= $post_type_detail->name; ?>" id="icon-edit"><br></div>
<h2><?= sprintf(__('Manually rank your "%s"', 'reorder-post-within-categories'), $post_type_detail->labels->menu_name); ?></h2>
<div class="icon32 icon32-posts-<?= $post_type_detail->name;?>" id="icon-edit"><br></div>
<h2><?= sprintf(__('Manually rank your "%s"', 'reorder-post-within-categories'), $post_type_detail->labels->menu_name);?></h2>
<p>
<?= sprintf(__('Select a taxonomy to sort <b>%s</b>.', 'reorder-post-within-categories'), $post_type_detail->labels->name); ?>
<?= sprintf(__('Select a taxonomy to sort <b>%s</b>.', 'reorder-post-within-categories'), $post_type_detail->labels->name);?>
</p>

<form method="post" id="chooseTaxomieForm">
Expand Down Expand Up @@ -64,8 +64,7 @@
<?php if ($catDisabled):?>
<br/><span class="description"><?= __('Greyed-out categories contain too few posts and aren’t available for sorting.', "reorder-post-within-categories")?></span>
<?php endif;
$valueTaxonomyField = (isset($taxonomySubmitted) ? $taxonomySubmitted : '');
?>
$valueTaxonomyField = (isset($taxonomySubmitted) ? $taxonomySubmitted : '');?>
<input type="hidden" id="taxonomyHiddenField" name="taxonomy" value="<?=$valueTaxonomyField?>"/>
<?php endif;//if (count($listCategories) > 0).?>
</form>
Expand All @@ -85,8 +84,7 @@
if (isset($tax_options[$cat_to_retrieve_post]) && $tax_options[$cat_to_retrieve_post] == 'true') {
$checkedRadio1 = $checkedRadio2;
$checkedRadio2 = '';
}
?>
}?>
<label for="yes">
<input type="radio"<?=$checkedRadio1?> class="option_order" id="yes" value="true" name="useForThisCat"/>
<span><?=__('Yes', 'reorder-post-within-categories')?></span>
Expand Down Expand Up @@ -134,7 +132,7 @@
</div>
</div>
</div>
<?php endif; ?>
<?php endif;?>
</form>
<div id="debug"></div>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*Display admin notice*/
?>
?>
<div class="updated re_order">
<p><?= sprintf(__('First of all, you need to <a href="%s">save your settings for <em>ReOrder Posts in Categories</em></a>.', 'reorder-post-within-categories'), admin_url('options-general.php?page=reorder-posts-within-categories.php')); ?></p>
<p><?= sprintf(__('First of all, you need to <a href="%s">save your settings for <em>ReOrder Posts in Categories</em></a>.', 'reorder-post-within-categories'), admin_url('options-general.php?page=reorder-posts-within-categories.php'));?></p>
</div>
35 changes: 16 additions & 19 deletions admin/partials/reorder-post-within-categories-settings-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,42 @@
$this->_delete_custom_table();
}
switch(true):
case $delete_data:
?>
case $delete_data:?>
<div class="updated">
<p>
<strong><?= __("Data reset complete.", "reorder-post-within-categories"); ?></strong> <?= __("All manually ranked order data has been deleted inclusing settings options.", "reorder-post-within-categories"); ?>
<strong><?= __("Data reset complete.", "reorder-post-within-categories");?></strong> <?= __("All manually ranked order data has been deleted inclusing settings options.", "reorder-post-within-categories");?>
</p>
</div>
<?php
break;
case $delete_table:
?>
case $delete_table:?>
<div class="updated">
<p>
<strong><?= __("Old custom table deleted.", "reorder-post-within-categories"); ?></strong> <?= __("The previous version 1.x custom table used for storing manually ranked orders has been deleted.", "reorder-post-within-categories"); ?>
<strong><?= __("Old custom table deleted.", "reorder-post-within-categories");?></strong> <?= __("The previous version 1.x custom table used for storing manually ranked orders has been deleted.", "reorder-post-within-categories");?>
</p>
</div>
<?php
break;
default:
?>
default:?>
<div class="updated">
<p>
<strong><?= __("Options saved.", "reorder-post-within-categories"); ?></strong> <?= __("A sub-menu is now placed under each post type menu in your dashboard to access the sorting page.", "reorder-post-within-categories"); ?>
<strong><?= __("Options saved.", "reorder-post-within-categories");?></strong> <?= __("A sub-menu is now placed under each post type menu in your dashboard to access the sorting page.", "reorder-post-within-categories");?>
</p>
</div>
<?php
break;
endswitch;
endif;
$settingsOptions = $this->get_admin_options(); ?>
$settingsOptions = $this->get_admin_options();?>
<div class="wrap">
<div class="icon32" id="icon-options-general"><br/></div>
<h2><?= __('Re-Order Posts within category', 'reorder-post-within-categories'); ?></h2>
<form method="post" action="<?= $_SERVER["REQUEST_URI"]; ?>">
<?php wp_nonce_field('updateOptionSettings', 'nounceUpdateOptionReorder'); ?>
<h2><?= __('Re-Order Posts within category', 'reorder-post-within-categories');?></h2>
<form method="post" action="<?= $_SERVER["REQUEST_URI"];?>">
<?php wp_nonce_field('updateOptionSettings', 'nounceUpdateOptionReorder');?>
<p>
<?= __("Select the categories you want to manually sort the items. Once you have checked and confirmed this information, a sub-menu will appear under each post type menu.", "reorder-post-within-categories"); ?>
<?= __("Select the categories you want to manually sort the items. Once you have checked and confirmed this information, a sub-menu will appear under each post type menu.", "reorder-post-within-categories");?>
</p>
<h3><?= __("Post Types available:", "reorder-post-within-categories"); ?></h3>
<h3><?= __("Post Types available:", "reorder-post-within-categories");?></h3>
<?php
// On liste tout les post_types
//$post_types = get_post_types( array( 'show_in_nav_menus' => true,'public'=>true, 'show_ui'=>true, 'hierarchical' => false ), 'object' );
Expand Down Expand Up @@ -85,7 +82,7 @@
}?>
<p>&nbsp;&nbsp;
<label>
<input type="checkbox"<?=$ischecked?> value="<?=$taxonomie->name?>" name="selection[<?=$post_type->name?>][]"><?= $taxonomie->labels->name ?>
<input type="checkbox"<?=$ischecked?> value="<?=$taxonomie->name?>" name="selection[<?=$post_type->name?>][]"><?= $taxonomie->labels->name?>
</label>
</p>
<?php
Expand All @@ -108,7 +105,7 @@
</p>
<?php
$settings = get_option(self::$settings_option_name, array());
if(isset($settings['upgraded']) && $settings['upgraded']): ?>
if(isset($settings['upgraded']) && $settings['upgraded']):?>
<h3><?=__('Delete old custom table from plugin v1.x', 'reorder-post-within-categories')?></h3>
<p class="delete-table submit">
<label>
Expand All @@ -121,7 +118,7 @@
</script>
<input id="delete-table" class="button" type="submit" value="<?=__('Delete table', 'reorder-post-within-categories')?>" name="delete_table" disabled="disabled"/>
</p>
<?php endif; ?>
<?php endif; ?>
<?php endif;?>
<?php endif;?>
</form>
</div>

0 comments on commit da9dbf8

Please sign in to comment.