-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Patch posts directive #8
Conversation
Sorry for the delay. Fixing a few things with a couple other fields and then I'll publish a release. Good work! |
Added 12+ new helper directives: `@istrue, @isFalse, @IsNull, @isnotnull, @instanceof, @typeof, @repeat, @Style, @script, @js, @inline, @fa` Added 6 new WordPress directives: `@author, @authorurl, @published, @Modified, @wpautop, @wpautokp` Refactored `@posts` allowing it to accept post IDs, `WP_Post` instances, or an array with a combination of the two (#8) Refactored source code DocBlocks and formatting of directives Improved formatting and examples for documentation Fix missing closing parenthesis in fields directive (#7) Added missing parameters to allow passing an array key to `@isfield`, `@issub`, and `@isoption`
@dawidurbanski I've pushed v1.0.4. It includes a slightly refactored version of this as well as some other goodies. Let me know if you find any bugs. |
@Log1x Wow! Huge update! Thank you very much! One issue i can see is backward compatibility with I'm actually implementing your library in my first project and I can see even some more improvements, but I'm gonna wrap it up in the end of the project at once. For example ACF gallery field is unsupported as it uses Additionaly it would be cool to use just Also
We do:
or
I'm using Including widgetizet areas (sidebars):
And also consider some of the following (to further cleanup base layouts and other partials):
After I'm done with current project, I'm gonna try to make some pull requests if welcome :) Great job once again! |
No problem! I'd appreciate the PR's. I had also thought of post thumbnails, author avatars, sidebars, and a couple other things but I'm a little backed up with work right now from having spent the past day or two on this so I wanted to at least get it rolled out. Most are pretty easy implementations, though. I think it might be about time to move the documentation to its own I can add |
In my case, I used it to apply some classes if the page is using content created by Gutenberg, or classic editor (if not I don't want any spacing inside content as it's populated from ACF flexible content and each block is responsible for adding such). <div class="container
@condition(has_blocks(), 'gutenberg-content')
@condition('' !== get_post()->post_content, 'has-content')">
@include('partials.page-header')
@include('partials.content-page')
</div> |
@dawidurbanski How are you using the
|
@intelligence I don't see any You need to create your own loop and use @hasfield('gallery')
<div class="gallery">
@foreach (get_field('gallery') as $image)
<div class="image">
@image($image)
</div>
@endforeach
</div>
@endfield |
Ah, yeah. That makes sense, thank you :) |
I made a new pull request to use patch specific branch so I can use my fork master branch as a separate package until this is merged.
All informations can be found in #6