<?php
namespace NeoMotionBeta\NeoDraw; if (!defined("ABSPATH")) { die("neoWP direct access not allowed"); }




\NeoMotionBeta\NeoGlobal\add_action_hook("load-post.php",     function () { if (!\NeoMotionBeta\NeoGlobal\current_user_can__neo_draw()) { return; } \NeoMotionBeta\NeoGlobal\enqueue_css("neo-draw--pb-old-media-library-dialog.css"); });
\NeoMotionBeta\NeoGlobal\add_action_hook("load-post-new.php", function () { if (!\NeoMotionBeta\NeoGlobal\current_user_can__neo_draw()) { return; } \NeoMotionBeta\NeoGlobal\enqueue_css("neo-draw--pb-old-media-library-dialog.css"); });


\NeoMotionBeta\NeoGlobal\add_filter_hook("media_upload_tabs:200", function ($tabs) { if (!\NeoMotionBeta\NeoGlobal\current_user_can__neo_draw()) { return $tabs; } return array_merge($tabs, ["neodraw" => \NeoMotionBeta\NeoGlobal\neo__("Create with neoDraw", "Mit neoDraw erstellen")]); });
\NeoMotionBeta\NeoGlobal\add_action_hook("media_upload_neodraw", function () {
    if (!\NeoMotionBeta\NeoGlobal\current_user_can__neo_draw()) { return; }
    \NeoMotionBeta\NeoGlobal\enqueue_js("neo-draw--pb-old-media-library-dialog.js");
    \NeoMotionBeta\NeoGlobal\enqueue_css("neo-draw--pb-old-media-library-dialog.css");
    return wp_iframe(__NAMESPACE__ . "\\draw_pagebuilder_init");
});
