-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve usability of the mshot field type #2
Comments
The mshot2 field will be stored as serialised post meta data.
There will be functions following oik-theme's style for displaying fields in forms and the front end. |
There are currently situations where the image that's saved is just the default .gif. We should avoid saving this image since some themes automatically select the first item that's attached to the post for the featured image. |
In bobbingwide.com, the post for the attached image is being created with an incorrect post_type 'portfolio' rather than 'attachment'. This leads to (rather useless) "Missing Attachment" messages from wp_get_attachment_link(). Explanation
Workaround
Potential solution
|
Current logic
When a field of type mshot is displayed using [bw_fields] then the screenshot is not actually saved in the website, it's just displayed as part of the page. The processing is such that the image the user sees initially is a default gif
https://s0.wp.com/wp-content/plugins/mshots/default.gif
the page has to be refreshed for the actual screenshot to appear.
Proposed logic - first thoughts
The screenshot should be captured when the post is being saved. An attachment should be created for the screenshot and it should be saved as the featured image. The oik custom image link URL field ( see oik-nivo-slider) could be used to store the same value as the mshot field.
When the mshot field is being displayed, the logic should first check to see if it should simply display the featured image.
Proposed logic - second thoughts
Rather than save the information in the featured image, the post ID of the attachment that contains the screenshot should be saved as part of the data for the mshot field type.
It might be a good idea to create a new field type( 'mshot2' ) to allow for transition.
The text was updated successfully, but these errors were encountered: