SourceTree does not show submodules

(SourceTree is a nice Git client by Atlassian)

The Problem:

SourceTree loses track of Git submodules. The entire "submodules" sidebar section is invisible.

A "clue":

Click the "Terminal" toolbar icon and type
$ git submodule

You should see something like:
dbd34bd2657ef70f001c1d135e2e14adef7dcdb9 dbdump (heads/master)
No submodule mapping found in .gitmodules for path 'wp'

The first line is good. The second one is a "clue".
It says: "Git knows about a submodule that you defined earlier. However, it cannot find the path to it in your .gitmodules file!"

Apparently, the path to submodule is wrong, or absent.
Restore it.

...or if you do not need that submodule, issue the following command in the terminal window:
$ git rm --cached {your submodule path} 





Making a WordPress.org plugin: SVN, GitHub, PHPUnit and Travis-CI [Part 1]

This is my first experiment to publish an open-source code. It was quite a "challenge", after years of working exclusively for corporate clients and myself, to write something that can go to "the wild" :-))

WordPress version:
GitHub version:

Here is a shortened list of what's involved in making a public plugin and publish it on WordPress.org site:
  • Write a bullet-proof PHP code (mission impossible, but approach as close as you can)
  • Organize the code in a special way: names of the files, folders, special headers, screenshots, readme.txt and so on.
  • Place your plugin somewhere so that WordPress staff can check it out and approve. (Hint: GitHub is a good place for that)
  • Apply here: http://wordpress.org/plugins/add/. Note: the name of your plugin will become it's "slug" in the URL, so choose carefully!
  • Wait for the approval, and if you never used SVN before, take this time to learn the basics.
  • SVN-Commit your code once approved.
  • Wait for reviews and support request.............. :-)
  • Folders structure and readme.md on GitHub are not exactly the same as on WordPress.org
  • You can setup Travis-CI calling PHPUnit to test your code automatically. It's not an easy thing to setup - but highly recommended.
To Read:

I'll try to find time and write more details [Part 2,3,...] soon.


WordPress: How to exclude plugin/theme files from Poedit catalog

► The Problem:

I use some third-party files in my WordPress plugin (or theme). When I run Poedit to built language files, it scans the main plugin folder and puts all text strings found in the .po file, including those from the third-party.

► The Solution?

Vaclav Slavik, the author of Poedit, placed a "wontfix" resolution on that, years ago. See http://www.poedit.net/trac/ticket/359 and http://www.poedit.net/trac/ticket/253.

So, there is no official solution to this.

► So, what to do?

Separate the 3rd party files from yours.

For example, put all your .php files into the "includes" folder, and 3rd party files - into the "vendor" folder. Then, in Poedit -> Catalog -> Properties -> Sources paths tab, instead of the "." (current folder), write "includes".

Poedit will scan only the "includes" and will ignore the "vendor" folder.


List of Front and Admin WordPress Actions

Below is a list of core WordPress actions as of WP-3.9-beta1.
I obtained this list by printing the $tag parameter in both do_action() and do_action_ref_array() functions while running a front page and an admin page.
This list cannot be considered complete. Please use it for quick reference only.

Link to the spreadsheet on Google Drive: