• Plugin Author Lester Chan

    (@gamerz)


    WP-Print 3.0.0 is a total rewrite of the plugin with Claude Code to make it more modern and testable. There will be breaking changes. Please do test it https://github.com/lesterchan/wp-print/archive/refs/heads/master.zip

    WP-Print 3.0.0 requires WordPress 6.8 and PHP 8.2. A site on an older stack is simply not offered the update, so if WP-Print has stopped appearing in your updates list, that is why.

    Re-save your permalinks after updating, at WP-Admin -> Settings -> Permalinks -> Save Changes. The /print/ endpoint is unchanged, but the rewrite rules are only written out when that screen is saved.

    Settings migrate on the first admin page load. print_options becomes wp_print_options and print_db_version becomes wp_print_version. Deleting the plugin removes all four rows.

    The print icon is no longer a choice. The two bundled GIFs are one inline SVG that takes its colour from your theme, so the Print Icon setting is gone. A custom link template built around %PRINT_ICON_URL% is rewritten to %PRINT_ICON%, which inserts the glyph itself rather than a URL to an image.

    The print link is one template now, and it is on its own tab. Print Text Link For Post, Print Text Link For Page and Print Text Link Style are gone; the screen is Settings and Templates, and the template is under Templates. Your four settings are converted into a template on the first admin page load: the style you chose decides the markup, so an icon-only link stays icon-only, and the wording is carried across. Where both labels were still the shipped “Print This Post” and “Print This Page” they collapse to the new %POST_TYPE% placeholder, which resolves to Post, Page or a custom post type’s own name. Where you had customised them and the two said different things, the post wording is used for both and the page wording is lost — one template cannot hold two arbitrary strings. A link template you had already written is left exactly as it is.

    %PRINT_TEXT% is retired with the settings it drew on. It is not blanked: a template still containing it renders it on the page as written, so an install that needs editing says so rather than losing its words silently. The first two arguments to print_link() are ignored for the same reason and stay in the signature so existing theme code does not fatal.

    A right-to-left site stops calling out to Google. The mirrored stylesheet pulled a webfont from fonts.googleapis.com on every print view, so every reader printing a page announced themselves to a third party. The sheet is gone, and the printable page uses the fonts already on the reader’s device.

    If you copied print-posts.php into your theme, change its body tag to <body class="wp-print">. Every rule in the new stylesheet is scoped to that class, so without it your printable page loads a stylesheet that matches nothing. Also: print-css-rtl.css no longer exists, the plugin’s own templates moved to includes/ and its stylesheet to css/wp-print.css, and the link and script tags in the head are printed by wp_print_styles( array( ‘wp-print’ ) ) and wp_print_scripts( array( ‘wp-print’ ) ). Your copy still takes precedence; compare it against the new one to pick up this release’s fixes.

    Classes are renamed. Print_Admin, Print_Content, Print_Core, Print_Link, Print_Options and Print_Template become WP_Print_Admin, WP_Print_Content, WP_Print, WP_Print_Link, WP_Print_Options and WP_Print_Template. Print_ was far too common a prefix to leave unclaimed in the global namespace.

    Every documented template tag keeps its name, arguments and behaviour, [print_link] and [donotprint] are unchanged, and so is the /print/ URL of every printable page. The one exception is the third argument to print_link(), renamed from $echo to $display, which matters only if you were passing it by name.

    The page I need help with: [log in to see the link]

You must be logged in to reply to this topic.