- IMPROVMENT: add iworks_upprev_check filter, see documentation: Filter Reference – iworks_upprev_check
Tag: filter
Is there a way I can use non-post content in this plugin?
Yes. You can use one of build-in filters:
To replace whole box:
add_filter( 'iworks_upprev_box', 'iworks_upprev_box_mycontent' ); function iworks_upprev_box_mycontent( $content ) { $value = '<div id="upprev_box">'; $value .= '<h6>My own title</h6>'; $value .= '<div class="upprev_excerpt">'; $value .= '<h5>Lorem ipsum</h5>'; $value .= '<p>Lorem ipsum dolor sit amet, consectetur '; $value .= 'adipiscing elit. Vestibulum auctor neque vitae orci '; $value .= 'ornare et vehicula eros molestie.</p>'; $value .= '</div>'; $value .= sprintf( '<a id="upprev_close" href="#" rel="close">%s</a>', __('Close', 'upprev') ); $value .= '</div>'; return $value; } |
Get code: iworks-upprev-static-content.php.zip
Where to put this code?
There are three ways:
- made a one-file-plugin and put file into
wp-content/plugins
, then turn it on - made a one-file-plugin and put file into
wp-content/mu-plugins
- put this code into
functions.php
in current theme
I recommend using option 1 or 2, but 3 is the easiest.
How to change post thumbnail to other image?
Use the iworks_upprev_get_the_post_thumbnail
filter:
<?php add_filter( 'iworks_upprev_get_the_post_thumbnail' , 'change_thumbnail' ); function change_thumbnail( $image ) { return '<img src="image.png" alt="" />'; } |
Read more: Filter Reference / iworks upprev get the post thumbnail
Where to put this code?
There are three ways:
- made a one-file-plugin and put file into
wp-content/plugins
, then turn it on - made a one-file-plugin and put file into
wp-content/mu-plugins
- put this code into
functions.php
in current theme
I recommend using option 1 or 2, but 3 is the easiest.
3.2
- IMPROVMENT: added action iworks_upprev_image – you can add own code to produce icon, when them don’t support post-thumbnails
- IMPROVMENT: added thumbnail filter iworks_upprev_get_the_post_thumbnail – now you can easy change thumbnail
- IMPROVMENT: added purging transient cache entries from $wpdb->options table when turn off this cache forum
- IMPROVMENT: add check _gaq object exist
- CHECK: checked compatybility to WordPress 3.3
- IMPROVMENT: updated IworksOptionClass to version 1.0.1
3.1.1
- IMPROVMENT: added ability to turn off “remove_all_filters” function
3.0
- BUGFIX: fixed end date filter for imported posts
- BUGFIX: fixed javascript conflict on edit post screen
- BUGFIX: fixed problem with unchecking ‘Excerpts’. forum thx benjamin
- BUGFIX: fixed sticky posts display loop
- BUGFIX: fixed thumbnail display problem
- IMPROVMENT: added filter ‘iworks_upprev_box_item’ for any item excerpt YARPPs
- IMPROVMENT: added GA track: view box and click link
- IMPROVMENT: added option ignore sticky posts
- IMPROVMENT: added sanitize function for offset
- IMPROVMENT: added thumbnail preview on posts/pages list
- IMPROVMENT: cleaning empty styles from custom css field
- REFACTORING: option managment
2.3
- IMPROVMENT: added filter iworks_upprev_box
- IMPROVMENT: added tabed options (based on Breadcrumb NavXT plugin
- IMPROVMENT: added prefix and suffix to urls
- IMPROVMENT: added option to allow open links in new window
- IMPROVMENT: added integration with YARPP
- BUGFIX: fixed Transients Cache Lifetime is set to wrong seconds
- BUGFIX: fixed deactivation hook option names
2.0
- IMPROVMENT: added to use transient cache
- IMPROVMENT: added thumbnail width (height depent of theme thumbnail)
- IMPROVMENT: added prevent some options if active theme dosen’t support it
- IMPROVMENT: added activation & deactivation hooks (to setup defaults and remove config )
- BUGFIX: remove all filters the_content for post in upPrev box
- BUGFIX: fixed display upPrev box in case of an equal height of the window and the document