GithubHelp home page GithubHelp logo

jameelmoses / acf-flexible-content-extended Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 6.0 1.88 MB

Extends the ACF Flexible Content Field by transforming the layout list into a modal with image previews. Editing the fields layouts also happens in a modal for a better editing user experience.

License: Other

JavaScript 35.58% PHP 33.17% CSS 16.88% SCSS 14.37%
acf acf-addon advanced-custom-fields flexible-content flexible-content-field wordpress wordpress-plugin wp wp-plugin

acf-flexible-content-extended's People

Contributors

benvoynick avatar jameelmoses avatar romanklabal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

acf-flexible-content-extended's Issues

PHP 8.1

PHP 8.1 Issue

Thanks for awesome work team
When we update php to 8.1 it throw following error, Can you please fix this on next update?
"Warning: The magic method FCP\Singleton::__wakeup() must have public visibility"

Overlay covering layout editing modal so it cannot be edited.

Version information

  • Plugin version: 2.0.0
  • ACF version: 6.0..5
  • PHP: 8.0
  • WordPress: 6.1.1

Steps to reproduce

Try editing a layout on any page

Expected result

The modal pops up and lets you edit it

Actual result

When a layout is edited the modal pops up but cannot be edited because a dark grey overlay is covering it.

Filtering custom image path doesn't work

I can't get the custom image path to work. The default image path works fine.

  • My ACF layout is named main_content_row and my image is named main-content-row.jpg (the default path works, so it's not an issue with field/image naming)
  • The image lives at THEME/assets/images/acf-flexible-content-extended
  • Here's my filter statement:
    • add_filter( 'acf-flexible-content-extended.images_path', 'assets/images/acf-flexible-content-extended' );
  • It resorts to the default image

Version information

  • Plugin version: 2.0.0
  • ACF version: 6.1.6
  • PHP: 8.0.22
  • WordPress: 6.2

The modal feature breaks TinyMCE fields in the modal

The modal option means that the TinyMCE fields contained as subfields of the layout field aren't initialised and the content cannot be edited.

Version information

  • Plugin version: 2.0.0
  • ACF version: 6.2.3
  • PHP: 8.0
  • WordPress: 6.4.1

README update

Hey there,

I really like this plugin but unfortunately under Requirements it says "PHP 5.6+", whereas in composer.json it's ">=8.0". So I cannot install this anymore. Maybe you could update the README to erase any misunderstanding.

Best regards
Nick

Possible to add search functionality?

Version information

  • Plugin version: 2.0
  • ACF version: 6.1.4
  • PHP: 8.1
  • WordPress: 6.2

Is it possible to add search functionality to the modal popup? When you start having quite a lot of blocks it gets takes a bit of time to actually find the one you're looking for.

Only use the selection modal

Hi there

Is it possible to use only the modal for the element selection, but edit then the layout normal (aka not in the modal)?

Thanks,
Christoph

Preview missing for duplicated flexible layouts

When you create a flexible layout, duplicate it (using the built-in ACF quick action) and then keep the fields intact in the copy by just renaming them, they keep their internal key. Thats means they are being mistakenly skipped as duplicates by this retrieve_flexible_keys_from_fields() check in /classes/main.php:

if ( ! empty( $keys[ $layout_field['key'] ] ) ) {

and ignored, which means the preview for any but the most recent layouts is missing.

I have fixed it by combining the parent layout key (which does change upon duplication) with the field key so the key is really unique, like this:

if ( ! empty( $field['key'] . '-' . $layout_field['key'] ] ) ) {
	continue;
}
$keys[ $field['key'] . '-' . $layout_field['key'] ] = $layout_field['name'];

Happy to provide you with an example or with a PR if you'd like.

Add .webp support?

Only .jpg extensions are supported. Could you add some other image formats?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.