WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31637 closed defect (bug) (fixed)

Detected media should be auto-inserted when Pressing a service/domain-specific page

Reported by: stephdau Owned by: azaozz
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.2
Component: Press This Keywords: has-patch
Focuses: Cc:
PR Number:

Description (last modified by DrewAPicture)

If a user is "pressing" a page from a service we know and support, we should auto-embed said media on pageload.

Attached is a patch that does this (for embeds, for now, not images) for pages like:

Note the update to WP_Press_This::get_canonical_link() to support them if from root, instead of fully qualified.
EG: Vimeo: <link rel="canonical" href="/118458120">

Attachments (2)

31637.diff (1.6 KB) - added by stephdau 5 years ago.
31637.2.diff (1.4 KB) - added by stephdau 5 years ago.
Even simpler way to define domain/service-specific pages.

Download all attachments as: .zip

Change History (6)

@stephdau
5 years ago

@stephdau
5 years ago

Even simpler way to define domain/service-specific pages.

#1 @DrewAPicture
5 years ago

  • Description modified (diff)
  • Summary changed from Auto-insert detected media when Pressing a service/domain-specific page to Detected media should be auto-inserted when Pressing a service/domain-specific page
  • Type changed from enhancement to defect (bug)

#2 @azaozz
5 years ago

Thinking this should happen for all oEmbed sites we support. If the URL would trigger an oEmbed the same way as if pasted in the editor, we should just add it there with no other content?

#3 @azaozz
5 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 31827:

Press This: check if the URL is to embeddable content on a site that supports oEmbed. Then insert only the URL in the editor. It will trigger a wpView with the embedded content.
Fixes #31637.

#4 @azaozz
5 years ago

In 31836:

Press This: small clean-up when generating the suggested content. Ensure all keys are always set in the array that is passed through the filter.
See #31637.

Note: See TracTickets for help on using tickets.