I want to improve my WordPress blogging experience especially since most of the pages I link also have two extra links of the archived pages in the Wayback Machine and Archive.is.
The WordPress Press-This bookmarklet does not always cut it. It is slow too as it does a POST request to the WordPress site which then renders a new page.
It is also highly minified, so below are some links that will hopefully allow me to research it further to see if I either could improve it for my own workflow, or need to start from scratch.
- I think the
window.pt_url
parameter is the URL-Encoding of the Press-This base URL (for my blog, it is"https:\/\/wiert.wordpress.com\/wp-admin\/press-this.php?v=8"
in the JavaScript source of the bookmarklet, which – unencoded – is https://wiert.wordpress.com\/wp-admin\/press-this.php?v=8). - Potentially most recent versions in the WordPress core code:
- [Wayback/Archive.is] https://github.com/WordPress/wordpress-develop/blob/4.8/src/wp-admin/js/bookmarklet.js
- [Wayback/Archive.is] https://github.com/WordPress/wordpress-develop/blob/4.8/src/wp-admin/js/bookmarklet.min.js
- [Wayback/Archive.is] https://github.com/WordPress/wordpress-develop/tree/4.9/src/wp-admin/js WordPress 4.9 removed it, but after backlash it got into a Press This plugin, see below
- Older SVN versions via [Wayback/Archive] “pt_url” “WordPress” – Google Search
- [Wayback/Archive] Changeset 31609 – WordPress Trac
- [Wayback/Archive] Changeset 31584 – WordPress Trac
- [Wayback/Archive] Changeset 31565 – WordPress Trac
- [Wayback/Archive] Changeset 31534 – WordPress Trac
- [Wayback/Archive] bookmarklet.js in trunk/src/wp-admin/js – WordPress Trac: rev=31609
- [Wayback/Archive] bookmarklet.js in trunk/src/wp-admin/js – WordPress Trac: rev=31609&order=name
- [Wayback/Archive] trunk/src/wp-admin/js/bookmarklet.js (log) – WordPress Trac: rev=31609
- [Wayback/Archive] bookmarklet.js in trunk/src/wp-admin/js – WordPress Trac: rev=31584
- [Wayback/Archive] bookmarklet.js in trunk/src/wp-admin/js – WordPress Trac: rev=31565
- [Wayback/Archive] bookmarklet.js in trunk/src/wp-admin/js – WordPress Trac: rev=31534
- Other GitHub versions
- https://github.com/WordPress/press-this/blob/add/cs/assets/bookmarklet.js
- https://github.com/WordPress/press-this/blob/add/cs/assets/bookmarklet.min.js
- https://github.com/WordPress/press-this/commit/0f7e59d8f10477b7e8399b1ab1c8906229b799d4
- https://github.com/WordPress/press-this/pull/29 – restore bookmarklet feature
- https://github.com/WordPress/press-this/pull/29/commits/bbe42d896937bbf199c7d3e7c1df8d1dde405260 (has restored
bookmarklet.js
andbookmarklet.min.js
) - https://github.com/WordPress/press-this/pull/29/commits/557bf59f24be9a0c8f2e859f423b8c9fe009c40a (documentation including the version 4.9 remark I mentioned above)
- https://github.com/WordPress/press-this/blame/trunk/assets/bookmarklet.js – just one commit; need to figure out where the history is on core
- https://github.com/WordPress/press-this/issues/15 – restore bookmarklet issue
- https://github.com/WordPress/press-this/issues/17 – on the extraction process of Press-This from the WordPress Core into a separate plugin (that by default is included on WordPress.com blogs)
- https://github.com/WordPress/press-this/commits/trunk – main branch
- https://github.com/WordPress/press-this/commits/improve/bookmarklet – newer than main
- https://github.com/WordPress/press-this/blob/improve/bookmarklet/assets/bookmarklet.js (there is no
bookmarklet.min.js
)
- Gists
- Documentation
- https://codex.wordpress.org/Press_This (which documents the parameters)
-
Technical Note
Using this bookmarklet to publish posts does not pass the $_POST['post_type'] variable with the value of “post”.
The bookmark calls
http://example.com/wp-admin/press-this.php?u=&t=&s=&i=
u
= the url of the current paget
= the title of the current pages
= the text selection from the current pagei
= url of an image file
-
- https://codex.wordpress.org/Press_This (which documents the parameters)
- Git and GitHub related questions:
- My earlier blog posts:
I want to figure out:
- what the values of the
v=
version parameter were (I know aboutv=8
andv=4
, there are likely more) - which commits were involved
- can I get more information (like summary, first heading or first paragraph of a page too)
- what techniques are used for opening new windows/tabs
TODO: make diffs of the various versions
–jeroen