-
Audio Widget – WordPress 4.8
Well, I recently write about Image Widget and Video Widget, so now it’s time for Audio Widget! This very similar to Video Widget and you may also upload or set link to audio file. Of course you may set audio to play in a loop, preload data etc. One more thing – just like in video widget you may add alternative audio source – and this is great feature.
-
Video Widget – WordPress 4.8
As I mentioned two days ago, I will let you know about new features in WordPress 4.8. Today is time for Video Widget. This one is less powerful and more powerful than image widget at once! Yeah, it is. It is less powerful, because it won’t give us a chance to use links, relations, classes etc. Well, it’s video, it may be understandable. And on the other side, we have powerful video options. We may upload video, we may use YouTube source (as I did for Traditional Taekwondo trailer). Then we may add the same video in different formats so we can be sure that every browser will display our…
-
Image Widget – WordPress 4.8
This will be a short story about new features in upcoming WordPress 4.8. Since we have Release Candidate v2 available, we may take a closer look into those features. First, widget images. Of course you may get this feature using third party plugins, now you do not need them, you have Image Widget in core. You may see this one in action in the featured image to this post. This new widget is pretty powerful. Of course you may add/edit image but that’s not all. You may also set caption, alternative text and set link and display size. Additionally you may set up advanced settings – image title attribute, image…
-
WordPress 4.8 Release Candidate
The release candidate is available to download. If everything goes well, then WordPress 4.8 will be available on June, 8th. It’s Thursday, one of my favorite days, so I’m happy twice for that date. There is a lot of changes, but most of them are small and won’t let us do amazing stuff… well, I mean new amazing stuff. Because we all do amazing stuff already, don’t we?
-
Always remember about variable type
Yes, I use the correct word. Always remember about variable type. It is not always important because PHP uses type casting, but it may lead you to hard-to-find mistakes. For example, I need to get some variable value. There are only three allowed states: 0, basic, advanced. As you may see, 0 is easily recognizable as integer and two others are strings. If variable (it is post_meta to be exact) is not set, it should use default value – 0. So, it is pretty easy: [crayon-6785f1b83737d285288010/] I do not need to filter it more, because I translate this variable once more later. So, let’s jump to this ‘later’: [crayon-6785f1b837383064349009/] Yes,…
-
Using jQuery UI CSS in admin screen
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-6785f1b838181306886591/] 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…
-
WordPress 4.7.2
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.
-
Using gulp to make your WordPress site runs faster
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…
-
Photography source
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…
-
How to modify footer in admin screen
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-6785f1b8385eb517706772/] 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-6785f1b8385f2596841246/] You may notice, that the footer string is in…