• Resolved Justin Norton

    (@designerbydesign)


    Hello,

    Thanks for the great plugin. Here is a small snippet to add the Insert Pages button into an ACF WYSIWYG:

    //---------------------------------------------------------------
    // ADD INSERT PAGES BUTTON INTO ACF WYSIWYG
    //---------------------------------------------------------------
    if (class_exists('ACF')) {
      add_filter('acf/fields/wysiwyg/toolbars', 'insert_acf_button');
      function insert_acf_button($toolbars)
      {
        $toolbars['Full'][1][] = 'wpInsertPages_button';
        return $toolbars;
      }
    }

    Although this works from functions.php it would be great to include in the plugin for a future release.

    Cheers,
    J 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paul Ryan

    (@figureone)

    Awesome! We’ll get that integrated for the next release, thanks for doing the research.

    Plugin Author Paul Ryan

    (@figureone)

    Quick question, what version of ACF are you using? We are on 5.7.7, and the Insert Page toolbar button appears correctly without the extra code.

    Plugin Author Paul Ryan

    (@figureone)

    I also confirmed it appears in ACF 4.4.12. Maybe you’re on an older version, or viewing the ACF edit metabox in a different context that we’re not thinking of?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Code snippet for ACF WYSIWYG button support’ is closed to new replies.