• Home
  • Portfolio
  • WordPress
    • Plugins
      • Google Analytics Head
      • Post/Page specific custom CSS
      • Queen Inspirations
    • Themes
    • Others
      • Localize JavaScript code
      • Custom bulk actions
      • Hide your login
      • Admin buttons
  • GitHub
Łukasz Nowicki

Lead PHP/WordPress Engineer

  • WordPress
  • Woocommerce
  • PHP
  • Plugin
  • Development
  • Github
  • Windows
  • Gulp
  • WordPress
  • Woocommerce
  • PHP
  • Plugin
  • Development
  • Github
  • Windows
  • Gulp

Popular posts

  • Insert new woocommerce product programmatically
  • Add woocommerce category programmatically
  • Get_terms and invalid taxonomy
  • Assign woocommerce product categories programmatically
  • WordPress 4.7
  • Development,  WordPress

    Using jQuery UI CSS in admin screen

    January 30, 2017 /

    I work on new plugin and I need jQuery UI in admin screen. Well, it’s a common situation. Besides the javascript, I also need jQuery UI stylesheet. How to include proper CSS into your WordPress? It’s not that hard. First, we need to include jQuery and jQuery UI. As an example, we will also use jQuery UI Tabs. Normally we may use Google APIs, but while we are in WordPress environment, we should use jQuery provided. So, let’s write some class: [crayon-657513cc380a7686936230/] So, what we’ve got here? This code will include jQuery, jQuery UI, jQuery UI Tabs (because those are our dependencies) and plugin.js – our main javascript file located…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Add meta boxes on Front Page only without template

    June 18, 2017

    Add theme support – basics

    September 30, 2016

    How to style widget description in admin menu?

    July 23, 2017
  • WordPress

    WordPress 4.7.2

    January 26, 2017 /

    New version of WordPress (4.7.2) is of course security release and all your WordPress instances should update automatically. This version fixes three issues. First issue is about XSS vulnerability in the posts list table. This is most important fix. Second fix is about unsafe queries (it isn’t WordPress core error but it may be exploited with some unsafe plugins). Third fix is about showing user interface for assigning taxonomies in Press This for users who has no permission to view this. Please remember, you should always have WordPress auto-update enabled. If you do, then you do not need to worry about this update, it should be already done.

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Using gulp to make your WordPress site runs faster

    January 26, 2017

    Woocommerce product category fields

    February 28, 2016

    Security release 4.4.1

    January 7, 2016
  • Development,  Windows,  WordPress

    Using gulp to make your WordPress site runs faster

    January 26, 2017 /

    First of all, what is gulp? It’s open software, a task runner build on node.js. Maybe it isn’t very descriptive, so let’s jump into an example. When I build a theme or a plugin for WordPress, I use many CSS, less, scss, javascript files. For WordPress theme it may be: /src/less/basic.less /src/less/main.less /src/css/default-wp.css /src/css/theme-a.css /src/css/theme-b.css /src/css/responsive.css Now, I need those files in my theme, so I use wp_enqueue_scripts hook and then… No, I do not use wp_enqueue_style for each file (including .less compilation somewhere). So, what do I do? I use one single file, let’s call it my-theme.min.css. Just one file, one HTTP call (it may be a bit outdated…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Country codes as PHP array

    July 1, 2018

    Programmatically create and login user into WordPress

    December 2, 2017

    Add theme support – basics

    September 30, 2016
  • Author

    Photography source

    January 25, 2017 /

    Sometimes you ask me, where do I get all those photographs I use on this site or in themes examples. Well, there are a lot of public-domain or free to use sources, but I am especially pleased with unsplash.com. Of course it is rather small source (comparing to paid sources) but it’s still enough. And quality of the photos are excellent in most cases. So, feel free to use it! PS: I am not connected with unsplash.com in any way, except for using their photos! Horizontal images gallery Vertical images gallery Note that I decreased a lot of those photographs dimensions and obviously I use only those pictures I used…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    What PHP version do you use?

    July 27, 2015

    New PHP7 release

    February 5, 2016

    Panom i Paniom z HR pod uwagę

    July 6, 2017
  • Development,  WordPress

    How to modify footer in admin screen

    January 22, 2017 /

    Sometimes you may want to add your own footer text in admin screen. I use it often to add information about my theme. Of course it is visible only in admin screen, so you do not need to worry about WordPress regulation about asking user to view any copyright notice for common users. How to do that? It’s very easy, we need to use admin_footer_text filter. [crayon-657513cc38ab3368051195/] So, this is the simplest solution. We’ve got more here. I think we should leave original WordPress copyright, because it is just fair. To do that, just preserve original $msg variable, like this: [crayon-657513cc38ab7948341426/] You may notice, that the footer string is in…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Always remember about variable type

    February 12, 2017

    Programmatically create and login user into WordPress

    December 2, 2017

    Assign woocommerce product categories programmatically

    October 5, 2016
  • Windows

    Removing same part of the file in Windows

    January 17, 2017 /

    Once upon the time… All right, it was yesterday. I had to clean up some site, than someone build long time ago. There was an image library, it contains hundreds of images. And it is ok, but all of the images contains “image_” prefix. And all of the images are in /images folder. Unnecessary redundancy I though to myself and I decided to remove “image_” prefix for all image files. And I almost open PHP editor to write short script… And then I thought – damn, we’ve got shell here, it’s Windows! So I opened Windows PowerShell and wrote something like this: PS C:\server\sites\old-site\images> get-childitem | foreach { rename-item $_…

    read more
    Łukasz Nowicki 1 Comment

    You May Also Like

    Symbolic links – test your themes and plugins

    January 5, 2017

    Using gulp to make your WordPress site runs faster

    January 26, 2017
  • Development,  WordPress

    How to add your custom css or js on admin screen?

    January 12, 2017 /

    How to add your custom CSS or JS on admin screen? Well, it’s pretty easy. We need to hook into admin_enqueue_scripts action and this is the best and only solution. So, let’s write some code: [crayon-657513cc38c22081648715/] Please note the $hook variable. Thanks to its value you may enqueue your scripts/styles depending on active admin screen. It is important, because you should not enqueue your scripts or styles where it isn’t necessary. Second thing, first conditional is_admin. It’s pretty obvious, but I have to mention it. Do not even hook into admin_enqueue when you are not on admin screen.

    read more
    Łukasz Nowicki 1 Comment

    You May Also Like

    Programmatically create and login user into WordPress

    December 2, 2017

    Get woocommerce random products

    January 10, 2017

    Assign woocommerce product categories programmatically

    October 5, 2016
  • Development,  Woocommerce,  WordPress

    Get woocommerce random products

    January 10, 2017 /

    Sometimes people asks me how to get N random products from Woocommerce plugin. Well, I heard it isn’t obvious or easy. And still I don’t know why. It is more than easy! We just need to use get_posts function. Simplest function to get N random products (default value is three as you may see in the source code) would look like that: [crayon-657513cc391e3218769988/]

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Country codes as PHP array

    July 1, 2018

    How to get rid of Open Sans and save admin bar?

    August 1, 2016

    WP_Import has a deprecated constructor in…

    January 3, 2016
  • Windows,  WordPress

    Symbolic links – test your themes and plugins

    January 5, 2017 /

    Symbolic links are great feature in Linux/Unix. Mac has this feature even in its GUI. Many of you knows that Windows can handle symbolic links too. But there are some people that doesn’t know about this feature or doesn’t care because they didn’t think about its power. Of course I’m not gonna to write about symbolic links just for symbolic links. We will use it in real life, for our projects. First of all, I will share one of my computers configuration with you. My first hard drive is 960GB SSD. I use it for my operating system (Windows 7 Pro), programs and local server. Server is stored in C:\server\.…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    Removing same part of the file in Windows

    January 17, 2017

    Using gulp to make your WordPress site runs faster

    January 26, 2017
  • Github,  Plugin,  WordPress

    Hey, admin, hide your login!

    January 3, 2017 /

    I bet, that you, as a WordPress developer, knows very well that using “admin” for your administrator account isn’t very clever. Or “administrator”. Or something like that. Once I saw “root”. Even WordPress installer will let you know that. Use something different. Maybe “top-secret-user”. It is good thing, that is true. Why we should avoid that? Because attacker may discover your administrator account login and may use it (in some top secret magical way) to attack your site. It isn’t a joke, it is a possibility. So, everybody should knows that and apply this to their sites. But… There is a small trick about that… Many sites may reveal your…

    read more
    Łukasz Nowicki 0 Comments

    You May Also Like

    WordPress: How to localize your JavaScript code?

    July 10, 2017

    WordPress plugins repository

    December 22, 2016

    Post/Page specific custom CSS

    December 16, 2016
 Older Posts

Search site:

Categories:

  • Author
  • Development
  • Github
  • Gulp
  • PHP
  • PL
  • Plugin
  • Windows
  • Woocommerce
  • WordPress

Recent posts:

  • HTML Knowledge Base
  • Using native WordPress loading icons (spinners) in your plugins
  • Did you forget to signal async completion?
  • Country codes as PHP array
  • RODO i WordPress – wydanie 4.9.6
  • Enable multisite network
  • Showing all errors and warnings

Polish Internet Trends

  • PHP Speed Test (5.2 – 8.0)

Recent comments:

  • Łukasz Nowicki on Post/Page specific custom CSS
  • Daud on Post/Page specific custom CSS
  • Wojtek on Country codes as PHP array
  • Łukasz Nowicki on Assign woocommerce product categories programmatically
  • Kil on Assign woocommerce product categories programmatically
  • Martin Piñeiro on Insert new woocommerce product programmatically
  • Łukasz Nowicki on Your password reset link appears to be invalid. Please request a new link below.

Archives

  • May 2020
  • September 2018
  • July 2018
  • May 2018
  • February 2018
  • January 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • October 2014
  • September 2014
Ashe Theme by WP Royal.