Lyubomir Gardev
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Sorter] Delete the plugin in myphpadminHello, if you want to manually remove the plugin data, make sure you first deactivate it. Mostly, post_sorter is writing in post_meta table with key defined in the main file:
define( 'POST_SORTER_META_KEY', 'post_sorter_order' );
So you can remove with phpMyAdmin all meta where key is
post_sorter_order
.The plugin writes in options as well, where it stores the desired behavior selected in settings screen.
The keys of the options are:
- post_sorter_custom_type
- post_sorter_enabled
- post_sorter_no_admin_sort
- post_sorter_direction
- post_sorter_enabled_roles
All the options and meta values are with prefix
post_sorter_
, followed by their ID, so you can search for such options.However, I would not suggest removing this by hand, since WordPress stores its own plugin data (for active plugins) in own options (WordPress core-specific ones), which may differ in different versions.
You can use Delete/Remove plugin after you deactivate it, this will clean you database.
Regards
Forum: Plugins
In reply to: [Post Sorter] Sorting Same Posts That Appear In Different CategoriesWork is still in progress. There is a lack of time these days in my schedule, but I will inform you as soon as I have status update.
Forum: Plugins
In reply to: [Post Sorter] Sorting Same Posts That Appear In Different CategoriesThis feature will require additional expansion of Post Sorter core. However, such core update is planned in future, main releases. I will inform you when the feature is going to be accessible.
Forum: Plugins
In reply to: [Post Sorter] Please add anon/off toggle to post list page in the backendFeel free to check the new version 1.4.1. It should have a new option which disable sorting of admin lists.
Forum: Plugins
In reply to: [Post Sorter] Sorting Same Posts That Appear In Different CategoriesHello, let me inspect your question and research any possible directions that might help. Then I will write you back.
Forum: Plugins
In reply to: [Post Sorter] Please add anon/off toggle to post list page in the backendYep, confirmation is required to implement exactly what is needed. Thank you for your reply. As soon as I get spare time I will release an update.
Forum: Plugins
In reply to: [Post Sorter] Please add anon/off toggle to post list page in the backendHello, I have not received notification about this topic. As far as I understand you do not want the plugin to integrate itself with the post lists?
Additionally, you can turn it off by the “enable” check box.
Forum: Reviews
In reply to: [Post Sorter] It worksThank you for your assessment, I am glad it helped out.
Forum: Plugins
In reply to: [Post Sorter] How can i make it as only admin can edit but not all the user?@duckmic, please check the development version of the plugin and tell me if it works for you. In case it is working fine I will roll it out to public.
It contains permissions screen where you could select roles capable of operating with plugin functionality. These roles are read from WordPress, if there are custom roles based on
WP_Role
everything should be fine.Thank you.
Forum: Plugins
In reply to: [Post Sorter] How can i make it as only admin can edit but not all the user?Well currently, as I remember it checks, if the user can edit posts, for modification on the post edit page.
I can integrate such functionality, but it will require some time to do this, because it needs to be adaptive. It will contain a permissions settings screen for different roles and interface for enabling selected roles to use it.
Forum: Plugins
In reply to: [Post Sorter] Plugin makes custom Post types dissappearI have applied a fix for this issue, since no answer and my tests show working results I assume it is working. Marking the topic as resolved.
Forum: Plugins
In reply to: [Post Sorter] Automatic position based on popularity or custom field?I will continue work in this direction. Let me know if you have any questions up to then. You could open new support topic where we could discuss problems targeted at this custom sorting.
Thanks, @3×7
Forum: Plugins
In reply to: [Post Sorter] arrow sorting buttons@oakhillman, this latest version has an option for turning off arrows. Previous method of sorting had a bug it was sorting alphabetically, no matter if these positions were numbers.
Forum: Plugins
In reply to: [Post Sorter] Automatic position based on popularity or custom field?Hello, this escaping with backslash now should be fixed, please verify with the same code.
The problem with such custom fields is that the plugin does not know about them (any possiblity may vary) and does not know how to treat them (as integer number, decimal, money, text, etc., since in database they are all texts) that is why I have left this big text boxes.
I have an idea how to make it works for post metadata, but it will require a new release with additional functionality, where you could have a lists of postmeta keys the user wants and the cast for each one which is required – how the plugin should treat them as number, monetary or alphabetically.
Actually it is possible to make such widget with these filters.
Example:
add_filter( 'post_sorter_join', 'my_price_join' ); add_filter( 'post_sorter_order', 'my_price_order' ); function my_price_join( $sql ) { $join = "LEFT JOIN wp_postmeta AS post_sorter ON (wp_posts.ID = post_sorter.post_id AND post_sorter.meta_key = 'price')"; return $join . $sql; } function my_order_join( $sql ) { $orderby = "CAST(post_sorter.meta_value AS DECIMAL(12,2)) ASC"; return $orderby . ( $sql ? ', ' . $sql : '' ); }
You could join them both (2 joins) with discount and order by both or some formula. You could take the sorting direction by external code and instead of ASC or DESC you can put that variable, for example, sorting direction retrieval from the plugin:
$direction = mb_strtoupper( get_option( 'post_sorter_direction' ) ) == 'DESC' ? ' DESC' : ''; ... $orderby = "CAST(post_sorter.meta_value AS DECIMAL(12,2)) $direction";
Unfortunately, there is no front-end interface (widgets and so on) for controlling the sorting, but it could be implemented on this base.
Please check with v1.3.1 and tell me if it is sorting by price correctly (with the previous two codes for join and order)?
Forum: Plugins
In reply to: [Post Sorter] Plugin makes custom Post types dissappearPlease tell me if v1.3 has resolved your issue?