This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shortcode | |
[recent_products per_page="6" columns="6" orderby="rand" order="rand"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.module.ts | |
import { LOCALE_ID } from '@angular/core'; | |
import { registerLocaleData } from '@angular/common'; | |
import localeDe from '@angular/common/locales/de'; | |
registerLocaleData(localeDe); | |
providers: [ | |
[{ provide: LOCALE_ID, useValue: 'de-DE'}] | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// html | |
<button (click)="methodName()">Btn text</button> | |
<p>{{ newPost }}</p> | |
// ts | |
export class className { | |
newPost=''; | |
methodName() { | |
this.newPost = 'some text'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// html | |
<textarea rows="6" [value]="newPost"></textarea> // property is element property written in [] | |
<button (click)="methodName()">Btn text</button> | |
// ts | |
export class className { | |
newPost='predefined text for textarea'; | |
methodName() { | |
// do something |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// model | |
// ts | |
export interface Post { | |
// some data for example | |
title: string; | |
content: string; | |
} | |
// service | |
// ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'product', | |
'product_cat' => 'klaviere', | |
'posts_per_page' => 3, | |
'orderby' => 'date', | |
'order' => 'DESC' | |
); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()) : $loop->the_post(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place in template | |
do_action( 'tuttner_show_payment_options' ); | |
// place in functions.php | |
add_action( 'tuttner_show_payment_options', 'woocommerce_checkout_payment', 20 ); | |
// this example is for custom placing a payment options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var overviewPageUrl = '@Model.Content.Url'; | |
var overviewPageUrl = '@Model.Content.Parent.Url'; | |
var detailPageUrl = '@Model.Content.Children.SingleOrDefault(node => node.DocumentTypeAlias == "MDArticleLocalDetailPage").Url'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#saveNewTasklist').on("click", function () { | |
const nestedQuery = '.nested-sortable'; | |
const identifier = 'taskId'; | |
const root = document.getElementById('tasks'); | |
function serialize(tasks) { | |
var serialized = []; | |
var children = [].slice.call(tasks.children); // children == document property | |
/** | |
* [].slice.call() == Array.prototype.slice.call() | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<p>{{ text }}</p> | |
</template> | |
<script setup> | |
import { ref } from 'vue' | |
const text = ref('juhu') | |
</script> |