New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accommodate IDs stored in shortcodes #654

Closed
danielbachhuber opened this Issue Jan 21, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@danielbachhuber
Copy link
Collaborator

danielbachhuber commented Jan 21, 2016

WordPress can store User, Post, Comment, and Term ids as shortcode attributes. For instance, here's a gallery shortcode where the gallery comprises attachments 2,3,4:

[gallery ids="2,3,4"]

Should the IDs change in the future, VersionPress should be able to handle the change gracefully.

@borekb borekb added this to the 3.0 milestone Jan 21, 2016

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Jan 21, 2016

Oops we missed this, and my initial reaction is that this will be a tough nut to crack. Thanks for reporting it.

@danielbachhuber

This comment has been minimized.

Copy link
Collaborator

danielbachhuber commented Jan 21, 2016

my initial reaction is that this will be a tough nut to crack

That's why they pay you the big bucks :)

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Jan 21, 2016

Who? Where? I want to see them :)

@pavelevap

This comment has been minimized.

Copy link
Contributor

pavelevap commented Feb 12, 2016

Support for shortcodes is very important, they are used very often (especially by premium themes with Visual Composer).

Many plugins also use their own placeholders instead of shortcodes, for example {{ID}} or id--ID
(NextGEN Gallery).

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Feb 12, 2016

Thinking what we can realistically do in v3.. The way I see it we should ideally support:

  1. Core shortcodes. We only need to worry about plugins with IDs - is it gallery and playlist only?
  2. Plugin-provided shortcodes – will technically be practically the same as 1 but it might be easier for us to only support core shortcodes in v3 and add some format for external plugins in v4.
  3. Pseudo-shortcodes like @pavelevap mentioned, e.g., {{ID}} or id--ID. I think this will be slightly harder.

I think we should do 1 for v3, perhaps also 2 but not necessarily. 3 can be left for some future release.

@JanVoracek JanVoracek referenced this issue Feb 23, 2016

Merged

Accommodate IDs stored in shortcodes #737

2 of 2 tasks complete

@JanVoracek JanVoracek added in review and removed in progress labels Feb 23, 2016

borekb added a commit that referenced this issue Mar 7, 2016

octopuss added a commit that referenced this issue Mar 8, 2016

[#654] - replaceShortcodes made private, adjusted tests to test this …
…method "indirectly" from public method were it is used

octopuss added a commit that referenced this issue Mar 8, 2016

[#654] - restoreShortcodes method made private, tests adjusted to tes…
…t public indirect use of this method (restoreShortcodesInEntity)
@JanVoracek

This comment has been minimized.

Copy link
Member

JanVoracek commented Mar 9, 2016

Running full test suite fails on Fatal error: Cannot redeclare add_shortcode() (previously declared in C:\Dev\VersionPress\versionpress\ext-libs\wordpress\wp-includes\shortcodes.php:89) in C:\wamp\www\vp01\wp-includes\shortcodes.php on line 106. Reopening.

@JanVoracek JanVoracek reopened this Mar 9, 2016

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Mar 9, 2016

Details of the technical implementation: PR #737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment