All posts by: Szabó Gábor (Gabesz)

About Szabó Gábor (Gabesz)

{lang: ‘hu’}In wordpress it’s pretty easy to add a new column to a post listing table. Let’s take a look how it works with the woocommerce orders table! function add_custom_columns_to_orders_table($columns) { $new_columns = $columns; if(!is_array($columns)) { $columns = array(); } unset( $new_columns[‘order_actions’] ); $new_columns[‘shipping_method’] = __(‘Shipping method’, ‘your-domain’); $new_columns[‘payment_method’] = __(‘Payment method’, ‘your-domain’); // We […]

{lang: ‘hu’}It took a while to figure it out how to get all the comments of an order, but finally I succeeded. So my first try looked like this: function get_all_order_comments($order_id) { $args = array( ‘post_id’ => $order_id, ‘approve’ => ‘approve’, ‘type’ => ” ); return get_comments($args); } Unfortunately it didn’t work, because – as […]

{lang: ‘hu’}I have this site that I currently work on, which contains a lot of resources to load. Of course these slow down the loading and rendering of the pages, but mostly on the home page which has two sliders, a virtual tour app and a google map. The sluggisness reached the point where I […]

{lang: ‘hu’}Yesterday I decided that I’m going to extend the functionality of my “learn words” application. With the new functionality the user will be able to listen to a given word or expression and I hope this way it will be more easier to learn the words and expressions. I didn’t know where to start […]

{lang: ‘hu’}To check dirs: <exec command=”if [ -d ‘/path/to/dir’ ]; then echo ‘true’; else echo ‘false’; fi;” outputProperty=”output.IS_DIRECTORY_EXISTS” /> <if> <equals arg1=”${output.IS_DIRECTORY_EXISTS}” arg2=”true” /> <then> <!– If dir exists –> </then> <else> <!– If dir doesn’t exist –> </else> </if> To check files: <property name=”output.IS_FILE_EXISTS” value=”false” /> <exec command=”if [ -f ‘/path/to/file’ ]; then echo […]

{lang: ‘hu’}So today I had to use the Jquery File Upload plugin which is absolutely neat, but I couldn’t find one thing in the documentation which was how can I bind the delete event to the file upload object. Therefore I dived into the code and found the solution. To make your life easier, I’m […]