https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
<ion-header> | |
<ion-toolbar> | |
<ion-buttons slot="start"> | |
<ion-menu-button></ion-menu-button> | |
</ion-buttons> | |
<ion-title> | |
Demo | |
</ion-title> | |
</ion-toolbar> | |
</ion-header> |
import { Directive, ElementRef, OnInit } from '@angular/core'; | |
import { Observable, fromEvent } from 'rxjs'; | |
import { DomController } from '@ionic/angular'; | |
@Directive({ | |
selector: 'ion-textarea[autosize]' | |
}) | |
export class TextareaAutosizeDirective implements OnInit { |
import { Component, ElementRef, OnInit } from '@angular/core'; | |
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; | |
@Component({ | |
selector: 'app-home', | |
templateUrl: 'home.page.html', | |
styleUrls: ['home.page.scss'], | |
}) | |
export class HomePage implements OnInit { |
import { Injectable } from '@angular/core'; | |
import { HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/operator/mergeMap'; | |
import { AuthService } from './auth.service'; | |
@Injectable() | |
export class TokenInterceptor implements HttpInterceptor { |
/** | |
* Stop an iframe or HTML5 <video> from playing | |
* @param {Element} element The element that contains the video | |
*/ | |
var stopVideo = function ( element ) { | |
var iframe = element.querySelector( 'iframe'); | |
var video = element.querySelector( 'video' ); | |
if ( iframe ) { | |
var iframeSrc = iframe.src; | |
iframe.src = iframeSrc; |
/** | |
* Change number of products that are displayed per page (shop page) | |
*/ | |
add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 ); | |
function new_loop_shop_per_page( $cols ) { | |
// $cols contains the current number of products per page based on the value stored on Options -> Reading | |
// Return the number of products you wanna show per page. | |
$cols = 9; | |
return $cols; |
<p>Name: </p><input id="name" type="text"/> | |
<p>Select a Thing:</p> | |
<select name="thingselect" id="thingselect"> | |
<option value="thing1">Thing 1</option> | |
<option value="thing2">Thing 2</option> | |
<option value="thing3">Thing 3</option> | |
</select> | |
<br> |
add_shortcode('wps_event_link', 'wps_event_link'); | |
function wps_event_link() { | |
$post_id = '{{ post_data:ID }}'; | |
} |