Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][Wordpress] Wyświetlenie wtyczki w pasku menu, (nad menu)
shpaque
post 14.05.2018, 14:29:13
Post #1





Grupa: Zarejestrowani
Postów: 651
Pomógł: 3
Dołączył: 31.01.2011
Skąd: Warszawa

Ostrzeżenie: (10%)
X----


Witam serdecznie,
jak wyswietlic wtyczke nad menu (nad kokpitem) w pasku menu admina? Zeby formularz tam sie wyswietlił

  1. function run_form_test()
  2. {
  3. echo "
  4. <div id='body'>
  5. <form id='testForm' action='#' method='POST' enctype='multipart/form-data'>
  6. <input type='hidden' id='action' name='action' value='test'>
  7. <div class='row'>
  8. <div class='col-sm-12'>
  9. <div class='form-group'>
  10. <label>Number of submissions</label>
  11. <input class='form-control text-center' type='number' id='number' name='number' required />
  12. </div>
  13. </div>
  14. </div>
  15. <div class='row'>
  16. <div class='col-sm-12'>
  17. <div class='form-group'>
  18. <label>Dates to randomly select <small>(today or in the future, separated by comma)</small></label>
  19. <input class='form-control text-center' type='text' id='date' name='date' placeholder='for example: 01/28/2020, 05/05/2019, 12/24/2027' required />
  20. </div>
  21. </div>
  22. </div>
  23. <div class='row'>
  24. <div class='col-sm-12'>
  25. <button class='btn-default btn-lg' type='submit' name='submit' id='submit'>Submit</button>
  26. </div>
  27. </div>
  28. </form>
  29. </div>
  30. ";
  31. }
  32.  
  33. add_action('admin_init', 'run_form_test');
Go to the top of the page
+Quote Post
SmokAnalog
post 17.05.2018, 01:20:19
Post #2





Grupa: Zarejestrowani
Postów: 1 707
Pomógł: 266
Dołączył: 3.07.2012
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Żeby umieścić coś nad kokpitem, musisz pozmieniać style panelu admina, bo ten pasek ma na sztywno ustawione position: fixed, top: 0 i left: 0. Żadna akcja ani filter też tam nie pozwala wejść, więc pozostaje Ci wstrzyknięcie JavaScriptem zaraz przed #wpwrap, albo (lepiej) po prostu wstrzyknij to gdziekolwiek i daj position: absolute lub fixed.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.03.2024 - 01:48