(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| { | |
| "workbench.startupEditor": "newUntitledFile", | |
| "editor.fontSize": 16, | |
| "editor.lineHeight": 1.8, | |
| "javascript.suggest.autoImports": true, | |
| "javascript.updateImportsOnFileMove.enabled": "always", | |
| "editor.rulers": [ | |
| 80, | |
| 120 | |
| ], |
| <?php | |
| // Standard API query arguments | |
| $args = array( | |
| 'orderby' => 'title', | |
| 'per_page' => 3 | |
| ); | |
| // Put into the `add_query_arg();` to build a URL for use | |
| // Just an alternative to manually typing the query string | |
| $url = add_query_arg( $args, rest_url('wp/v2/posts') ); |
| <?php | |
| // in the loop | |
| $category = get_the_category(); | |
| $currentcat = $category[0]->cat_ID; | |
| $currentcatname = $category[0]->cat_name; | |
| $currentcatslug = $category[0]->slug; | |
| // outside the loop | |
| global $post; | |
| $categories = get_the_category($post->ID); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <?php | |
| if ($diretorio = opendir("./")) | |
| { | |
| while(false !== ($pasta = readdir($diretorio))) | |
| { | |
| if(is_dir($pasta) and ($pasta != ".") and ($pasta != "..")) | |
| { | |
| echo "<a href='$pasta'>$pasta</a><br>"; | |
| } | |
| } |