• Development,  Github,  WordPress

    How to style widget description in admin menu?

    Is it ever possible to style widget description in admin menu? Well, the short answer should be no, however longer answer should be yes, of course. You must keep in mind, that this method is a bit tricky. If you may avoid that, please do. If you have to style your widget description using html, well… this article is just for you. I found myself dumbfound when I realized I need to style widget description but… it’s impossible using normal WordPress actions, filter or hooks. WordPress is using wp_sidebar_description function to show widget description in admin panel and it is located in \wp-includes\widgets.php. When you take a look into source,…

  • Development,  Github,  Plugin,  WordPress

    WordPress: How to localize your JavaScript code?

    Update (on 17th July 2017) – see the bottom of the page. In WordPress, while writing theme or plugin, you should always keep in mind localization. Maybe your theme or plugin become so popular and someone would like to translate it into another language? It’s easy for me to think about localization, because I write my themes and plugins using english language and I usually add polish translation, because I’m Pole. So it isn’t very hard to achieve. Localization in WordPress is very easy. Let’s see one example from my plugin, Google Analytics Head. Plugins requires some information in the file header, like plugin name, description, author etc. There is…

  • Author,  PL

    Panom i Paniom z HR pod uwagę

    Czytam wiele postów w których rekruterzy doradzają programistom co mówić, czego nie mówić, jak prowadzić rozmowę. Cenna rzecz, na pewno. A już szczególnie z punktu widzenia rekrutera – co, oczywiście, pośrednio może wpłynąć i na los takiego biednego programisty. W tym zalewie informacyjnym chciałbym jednak zamieścić parę słów do rekruterów właśnie. Swoją drogą, mój słownik nie zna słowa rekruter. Zna rekieter ale czy to zabawna koincydencja czy nie, zależy zapewne od czytelnika i jego osobistych doświadczeń. Otóż, kochani, jeśli obiecujecie, że zadzwonicie o godzinie ósmej, to pamiętajcie, że ta dłuższa wskazówka sterczy w górę niczym… tutaj dla każdego coś miłego, a ta mniejsza – na bałwanku. Dzwonienie o czternastej, następnego…

  • Development

    Date and Time – PHP way – part 3

    Today third and final part. Today we will talk mainly about DatePeriod class. It is very powerful tool, we can use it to iterate dates. How about iterating all Fridays? We like Fridays, because weekend starts, so… it is always good to know it’s Friday 🙂 Let’s begin… [crayon-67025c44cc636863144945/] And results: [crayon-67025c44cc63f360089668/] I think this is self explanatory code. Please remember three things. One – I used next friday as an interval. If you use last friday you’ll get your iterator iterating downwards, so you may end in the year of -9999 🙂 Two – $item is DateTime object, you may do whatever you want as it’s normal object Three…