Skip to content

Instantly share code, notes, and snippets.

View dejanmarkovic's full-sized avatar
💭
WordPress development 24/7

Dejan Markovic dejanmarkovic

💭
WordPress development 24/7
View GitHub Profile
$woocommerce = new Client(
$wmpapi_site_url,
$wmpapi_consumer_key,
$wmpapi_consumer_secret,
[
'wp_api' => true,
'version' => 'wc/v3',
//'timeout' => 400
//'query_string_auth' => false,
]
@dejanmarkovic
dejanmarkovic / Error log code
Created March 21, 2018 17:56
Error log code
error_log( print_r( 'end_date ' . $end_date, true ) );
@dejanmarkovic
dejanmarkovic / WP Query Last year
Created March 11, 2018 15:07
WP Query Last year
$lastyear = date("Ymd", strtotime("-1 year"));
$query->set('date_query', array(
array(
'column' => 'post_date_gmt',
'after' => $lastyear,
'inclusive' => true,
),
)
);
@dejanmarkovic
dejanmarkovic / Export emails from Gmail
Created February 3, 2017 16:45
Export emails from Gmail
Go here
1.https://takeout.google.com/settings/takeout
2.https://www.coolutils.com/online/MBOX-to-XLS
@dejanmarkovic
dejanmarkovic / PHP Code Sniffer with WordPress Coding Standards and PHPStorm - YouTube
Created May 10, 2016 13:44
PHP Code Sniffer with WordPress Coding Standards and PHPStorm - YouTube
https://www.youtube.com/watch?v=R4URxom9Kew&app=desktop
@dejanmarkovic
dejanmarkovic / Boostrap menu expand on hover.css
Created September 7, 2015 21:51
Boostrap menu expand on hover
@media (min-width: 979px) {
ul.nav li.dropdown:hover > ul.dropdown-menu {
display: block;
}
}
@dejanmarkovic
dejanmarkovic / Install PHP CodeSniffer on Windows Machine
Last active August 29, 2015 14:14
Install PHP CodeSniffer on Windows Machine
PhpStorm reformat code
-----------------------
PhpStorm now bundles WordPress coding style natively, starting from version 8.
Go to Project Settings > Code Style > PHP.
Select Set From... (top right of window) > Predefined Style > WordPress.
Source: https://gist.github.com/Rarst/1370155
Command:
@dejanmarkovic
dejanmarkovic / Network and Domain utilities
Created October 9, 2014 15:04
Network and Domain utilities
I. nslookup commands (in steps)
-----------------
1. nslookup
2. set type=MX
3. yourdomain.com
OR
instead of step 2
2.1 set type=ANY
II.
@dejanmarkovic
dejanmarkovic / 100+ sites to submit your WordPress themes
Created October 2, 2014 16:11
100+ sites to submit your WordPress themes
http://www.themeshock.com/sites-where-submit-wordpress-themes/
@dejanmarkovic
dejanmarkovic / 10 Free Blank WordPress Themes
Created October 2, 2014 16:10
10 Free Blank WordPress Themes
http://sixrevisions.com/wordpress/blank-wordpress-themes/