• Resolved smolenaar

    (@smolenaar)


    First off, I’m loving this plugin and it’s working well for new pages I create.
    Problem is I’m using elementor to add some things to the pages and then the plugin won’t update the albums anymore.

    At the moment I’m getting around this by using fpf_fetch_album_content with a php code snippet plugin, but this makes it a more work to add albums to pages (I don’t mind too much, but I’m trying to hand over the admin for this page to someone else) and of course this is more resource intensive and makes my page more dependent of facebook. Daily updates would be good enough for me (I’ve got no problem creating my own cron for this)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author justin_k

    (@justin_k)

    Sorry, I’m really not familiar with elementor or what would be needed to make them work together, but if it’s a relatively small/non-impactful change & you’d like to submit a patch, I could definitely commit it to the main plugin so you don’t have to worry about it getting overwritten by future updates 🙂

    Thread Starter smolenaar

    (@smolenaar)

    It’s probably not too big, but beyond my skill level.

    Basically, when you first click on “edit with elementor” for a page it takes everything from DB::wp_posts::post_content

    And copies it to: DB::wp_postmeta::_elementor_data (WHERE post_id == wp_posts.ID) along with some other fancy stuff that elementor is adding.
    After that any changes in post_content will be ignored, even though your plugin will successfully update that bit.

    I have not found a way for Elementor to recheck post_content and tried to adapt your script to make the change in _elementor_data but that went beyond my skill level. So I ended up with adding:

    
    echo '<textarea style="width:350px;overflow:hidden;resize:none;line-height:1;font-family:inherit;font-size:inherit;" readonly="readonly" onclick="this.focus();this.select();">';
                                                            echo '$album = fpf_fetch_album_content( \'' . $album->id . '\', array() ); echo $album[\'content\'];';
                                                            echo '</textarea>';
    

    to _admin_menu.php –> search for albums so it’s an easy copy and paste to a php snippet plugin.

    Like I said, it works, but isn’t very elegant 🙂

    Plugin Author justin_k

    (@justin_k)

    Ah gotcha. Based on what you describe, it sounds like this is a question much more suited for the Elementor folks – they should provide some hook/filter that they invoke before updating, which you could then use to force their plugin to re-check post_content & pull it into elementor_data. Alternatively, if they don’t provide such a hook/filter (which I think is unlikely, but just to cover all bases) you might be able to use one of the standard core hooks that occurs before saving content to i.e. clear elemetor’s post_meta for that post, which seems like their plugin would then see as ‘blank’ and then fetch the original post_content again. Again though, this is really a question for them as it pertains to how their plugin is functioning, rather than mine 🙂

    loadedstudios

    (@loadedstudios)

    Hi, im looking to integrate this into elementor myself. Any help or ways in which you have done this would be great. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hook to elementor’ is closed to new replies.