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> | |
<body> | |
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> | |
<script src="https://checkout.freemius.com/checkout.min.js"></script> | |
<button id="purchase_lifetime">Buy Lifetime License</button> | |
<button id="purchase_annual">Buy Annual License</button> | |
<script type="text/javascript"> | |
const handler = FS.Checkout.configure({ |
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 | |
// CHECK BLOG POST HERE | |
// https://www.wpeform.io/blog/handle-cors-preflight-php-wordpress/ | |
function acme_preflight_api() { | |
// preset option for allowed origins for our API server | |
$allowed_origins = [ | |
'https://yoursite.com', | |
'https://preflight.yoursite.com', | |
'https://app.yoursite.com', |
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
{ | |
"testDox": { | |
"prefix": "__t", | |
"body": [ | |
"/**", | |
" * @testdox ${1:what it does}", | |
" *", | |
" * @return void", | |
" */", | |
"public function test${2:${TM_FILENAME_BASE/(.*)Test$/$1/}}${1/(.*)/${1:/pascalcase}/}() {", |
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
// Below are some sample functions which take a callback and does some async action | |
// When the action is successful, it will call the callback with the data | |
function fetchPosts(callback) { | |
// somehow we get our posts | |
const posts = [ | |
'Awesome Posts', | |
'Another one', | |
]; | |
// call the callback with posts |
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
import React from 'react'; | |
import styled, { useTheme } from 'styled-components'; | |
import { useSpring, animated } from 'react-spring'; | |
import VisibilityObserver, { | |
useVisibilityObserver, | |
} from 'react-visibility-observer'; | |
export const CONTROLCLASS = 'wpeform-component-animatein'; | |
const Container = styled.div` |
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
# Our base image | |
image: registry.gitlab.com/wpquark/docker-containers/php-node:2.0.0-php-7.3-node-12.13.0 | |
# Select what we should cache | |
cache: | |
key: "$CI_COMMIT_REF_SLUG-$CI_JOB_NAME" | |
paths: | |
- .yarn-cache | |
- .composer-cache |
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
export type Dictionary<T> = { | |
[x: string]: T; | |
}; | |
export function convertListToDictionary<T extends { id: string }>( | |
items: T[] | |
): Dictionary<T> { | |
const dict: Dictionary<T> = {}; | |
items.forEach(item => { | |
dict[item.id] = item; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Simple React Application</title> | |
<!-- Add React and React DOM from CDN --> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<button id="fetch">Start the fetch</button> |
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 | |
/** | |
* Copyright (C) 2018 Swashata Ghosh <[email protected]> | |
* | |
* This file is part of eForm - WordPress Builder. | |
* | |
* eForm - WordPress Builder is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. |
NewerOlder