Flexible Recent Posts
Looking for maintainer. Write me to paul.annekov@gmail.com Flexible Recent Posts (FRP) plugin gives you possibility to add widget to your blog with recent posts using user-defined template. The main features are: Template for each post in widget. You can write your HTML-template or overwrite default in widget form. Shortcodes support in template. You can use built-in shortcodes to insert info related to current post in widget: title, featured image, excerpt, date, permalink, author, comments. Restrict terms from which you want to display posts. Display posts from all terms or from selected only. Number of posts to display. Set number of latest posts that will be displayed in widget. All posts links. Select option to display link near the title or/and after all posts that will open selected posts category page. Set link title or custom link URL. Useful links: Template shortcodes Feature requests Bugs Donate (Flattr) Translators: Russian (ru) – Paul Annekov Licenses Uses FatCow Icon Set licensed under Creative Commons Attribution 3.0 License. Shortcodes Plugin template system supports 5 shortcodes related to current widget post, that you can use in your template: Title [frp_title] Displays post title. Example: [frp_title] Excerpt [frp_excerpt length=””] Displays post excerpt using get_the_excerpt function. You can specify excerpt length using length attribute. If not specified – default WordPress excerpt length used. Example: [frp_excerpt] , [frp_excerpt length="15"] Date [frp_date format=”F j, Y” time_since=”0″] Displays post date. You can add format shortcode parameter to change date format. Read about format value here. Add time_since parameter with 1 as value to display amount of elapsed time: 30 seconds ago, 5 minutes ago, 12 hours ago, 3 Jun. Example: [frp_date format="Y/m/d g:i:s A"] , [frp_date time_since="1"] Link [frp_link] Displays post permalink. Example: read more Featured image [frp_thumbnail size=”32×32″] Displays featured post image. Add size shortcode parameter to change image size. You can define size using WIDTHxHEIGHT as value or size name (built-in or defined in theme). Examples: [frp_thumbnail], [frp_thumbnail size="thumbnail"], [frp_thumbnail size="128x128"], [frp_thumbnail size="full"] Author [frp_author link=”1″] Displays name of the post’s author. Set link parameter to 0 if you want to disable link (author’s site) from author name. Examples: [frp_author], [frp_author link="1"], [frp_author link="0"] Comments [frp_comments no_text=”1″] Displays the number of comments. Set no_text parameter to 1 if you want to disable comment text (just “23” instead of “23 Comments”). Examples: [frp_comments], [frp_comments no_text="1"], [frp_comments no_text="0"]
Post Author IP
This plugin records the IP address of the original post author when a post first gets created. The admin listing of posts is amended with a new “Author IP” column that shows the IP address of the author who first saved the post. The plugin is unable to provide IP address information for posts that were created prior to the use of this plugin. Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage Hooks The plugin is further customizable via four filters. Typically, code making use of filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). c2c_show_post_author_ip_column (filter) The ‘c2c_show_post_author_ip_column’ filter allows you to determine if the post author IP column should appear in the admin post listing table. Your hooking function can be sent 1 argument: Argument : $show_column (bool) Should the column be shown? Default true. Example: /** * Don't show the post author IP column except to admins. * * @param bool $show_column Should the column be shown? Default true. * @return bool */ function post_author_ip_column_admin_only( $show ) { if ( ! current_user_can( 'manage_options' ) ) { $show = false; } return $show; } add_filter( 'c2c_show_post_author_ip_column', 'post_author_ip_column_admin_only' ); c2c_get_post_author_ip (filter) The ‘c2c_get_post_author_ip’ filter allows you to customize the value stored as the post author IP address. Your hooking function can be sent 2 arguments: Arguments : $ip (string) The post author IP address. $post_id (int) The post ID. Example: /** * Store all IP addresses from local subnet IP addresses as the same IP address. * * @param string $ip The post author IP address. * @param int $post_id The post ID. * @return string */ function customize_post_author_ip( $ip, $post_id ) { if ( 0 === strpos( $ip, '192.168.' ) ) { $ip = '192.168.1.1'; } return $ip; } add_filter( 'c2c_get_post_author_ip', 'customize_post_author_ip', 10, 2 ); c2c_get_current_user_ip (filter) The ‘c2c_get_current_user_ip’ filter allows you to customize the current user’s IP address, as used by the plugin. Your hooking function can be sent 1 argument: Argument : $ip (string) The post author IP address. Example: /** * Overrides localhost IP address. * * @param string $ip The post author IP address. * @param int $post_id The post ID. * @return string */ function customize_post_author_ip( $ip, $post_id ) { if ( 0 === strpos( $ip, '192.168.' ) ) { $ip = '192.168.1.1'; } return $ip; } add_filter( 'c2c_get_post_author_ip', 'customize_post_author_ip', 10, 2 ); c2c_post_author_ip_allowed (filter) The ‘c2c_post_author_ip_allowed’ filter allows you to determine on a per-post basis if the post author IP should be stored. Your hooking function can be sent 3 arguments: Arguments : $allowed (bool) Can post author IP be saved for post? Default true. $post_id (int) The post ID. $ip (string) The post author IP address. Example: /** * Don't bother storing localhost IP addresses. * * @param bool $allowed Can post author IP be saved for post? Default true. * @param int $post_id The post ID. * @param string $ip The post author IP address. * @return string */ function disable_localhost_post_author_ips( $allowed, $post_id, $ip ) { if ( $allowed && 0 === strpos( $ip, '192.168.' ) ) { $allowed = false; } return $allowed; } add_filter( 'c2c_post_author_ip_allowed', 'disable_localhost_post_author_ips', 10, 3 );