You can convert easily your .po (WordPress translation files) to .mo once
just go to > http://tools.konstruktors.com/
upload your .po file and download the converted .mo
| <?php | |
| /* | |
| + If you need to include a file only for lets say, Italian stores, you can use the code below: | |
| + You can change it_IT with; | |
| - de_DE // German | |
| - fr_FR // French | |
| - bg_BG // Bulgarian | |
| - es_ES // Spanish | |
| - en_US // USA English |
| <?php // Displaying post from this week! | |
| $week = date('W'); | |
| $year = date('Y'); | |
| $args=array( | |
| 'w'=> $week, | |
| 'year'=> $year, | |
| 'post_type' => 'post', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => -1, | |
| 'caller_get_posts'=> 1 |
| <?php | |
| /* this goes into your functions.php file: */ | |
| function notld_link( $notld ) { | |
| $notld = get_permalink(); | |
| return str_replace( home_url(), "", $notld ); | |
| } | |
| // copy/paste code below where you want the url to appear: | |
| ?> |
| <?php | |
| $current_date = time(); | |
| $start_date = strtotime('2014-05-05 00:00:00'); // year-month-day hours:minutes:seconds | |
| $end_date = strtotime('2014-05-06 00:00:00'); // year-month-day hours:minutes:seconds | |
| if($current_date > $start_date && $current_date < $end_date){ | |
| // show the content you need in between these two dates | |
| } else { | |
| // show something else | |
| } |
| <?php | |
| /* | |
| * 1) open your invoice.php file | |
| * 2) comment: // $wpo_wcpdf->billing_address(); | |
| * 3) copy/pasta: the first php block you see below | |
| * 4) copy/pasta: the second php block remove what you don't need | |
| * 5) save | |
| * 6) go ham! | |
| */ | |
| ?> |
You can convert easily your .po (WordPress translation files) to .mo once
just go to > http://tools.konstruktors.com/
upload your .po file and download the converted .mo
| <?php // copy & paste the code below in your functions.php file, change the title and href and save it. | |
| function add_link_to_adminbar($wp_admin_bar){ | |
| $args = array( | |
| 'id' => 'custom-link', | |
| 'title' => 'Custom Button Title', | |
| 'href' => 'http://example.org/', | |
| 'meta' => array( | |
| 'class' => 'custom-link-class' |
| <?php | |
| // path to directory | |
| $directory = "../images/harry/legs/"; | |
| // get all image files with a .jpg extension. | |
| $images = glob($directory . "*.jpg"); | |
| // print each file name | |
| foreach($images as $image) { | |
| echo $image; |
| ! function(a, b, c) { | |
| var d = a[c.k] = { | |
| w: a, | |
| d: b, | |
| a: c, | |
| s: {}, | |
| f: function() { | |
| return { | |
| callback: [], | |
| get: function(a, b) { |
| // loading jQuery only if not available | |
| function theScript() { | |
| // Do your stuff with jQuery | |
| } | |
| if(typeof jQuery=='undefined') { | |
| var headTag = document.getElementsByTagName("head")[0]; | |
| var jqTag = document.createElement('script'); |