platform-coop-toolkit / coop-library-framework

Custom Post Type utilities for the Platform Co-op Resource Library.
https://platform.coop
Other
0 stars 2 forks source link

feat: add term order field (resolves #294) #295

Closed greatislander closed 4 years ago

greatislander commented 4 years ago

Description

Adds a custom meta field to topics and goals which allows a numeric order to be assigned.

Steps to test

  1. Edit a topic or goal.

Expected behavior: Order can be customized.

Additional information

Front-end implementation will be completed in https://github.com/platform-coop-toolkit/coop-library/issues/168.

Related issues

greatislander commented 4 years ago

@jhung Found a plugin that does this better, and bypasses the issue with meta_value.

greatislander commented 4 years ago

@jhung I'd have to patch the third-party plugin to change this — do you consider it a dealbreaker?

jhung commented 4 years ago

@jhung I'd have to patch the third-party plugin to change this — do you consider it a dealbreaker?

@greatislander Not a dealbreaker if it can't be done easily.

Can the negative values be sanitized however?

greatislander commented 4 years ago

@jhung I decided it was best to fork so as to implement these changes. You'll need to trash the wp-term-order plugin from your plugins directory, then our fork will be installed.

jhung commented 4 years ago

@jhung I decided it was best to fork so as to implement these changes. You'll need to trash the wp-term-order plugin from your plugins directory, then our fork will be installed.

This would require maintaining this fork just to avoid negative numbers on the input? Not sure if the increased technical burden is justified. Do we gain anything else by using our fork? @greatislander

greatislander commented 4 years ago

@jhung I think it’s worth it, as the plugin doesn’t appear to be accepting pull requests and I already had to use a filter to fix a different issue. It uses stable APIs and I think there’s very minimal need for maintenance.