This file contains 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
<!-- Materialize CSS with fallback --> | |
<script> | |
function fallbackMaterialize() { | |
var mLink = document.createElement('LINK'); | |
mLink.setAttribute('rel', 'stylesheet'); | |
mLink.setAttribute('href', 'assets/css/materialize.css'); | |
document.querySelector('head').appendChild(mLink); | |
} | |
</script> |
This file contains 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
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> | |
<h5>Heading 5</h5> | |
<h6>Heading 6</h6> | |
<hr /> | |
<br> | |
<br> | |
<button>Button</button> |
This file contains 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
/** | |
* Add REST API for BBPress | |
* / | |
* Thanks to Barry at https://bbpress.org/forums/topic/is-there-an-api-for-bbpress/ | |
*/ | |
function bbpress_enable_rest_api() { | |
$types = array( | |
bbp_get_reply_post_type(), | |
bbp_get_forum_post_type(), | |
bbp_get_topic_post_type(), |
This file contains 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
// https://github.com/GeekyAnts/vue-native-core/issues/117 | |
//In app.json put: | |
"sourceExts": [ | |
"js", | |
"json", | |
"ts", | |
"tsx", | |
"jsx", | |
"vue" |
This file contains 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
if (document.readyState !== 'loading') { | |
readyFunction(); | |
} else { | |
document.addEventListener('DOMContentLoaded', function () { | |
readyFunction(); | |
}); | |
} | |
function readyFunction(){ | |
// |
This file contains 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 | |
$link = mysqli_connect("HOST", "USERNAME", "PASSWORD", "DATABASENAME"); | |
if(mysqli_connect_error()){ | |
die("There was an error connecting to the database."); | |
} | |
if($_POST){ |
This file contains 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 | |
$link = mysqli_connect("HOST", "USERNAME", "PASSWORD", "DATABASE"); | |
if(mysqli_connect_error()){ | |
die("There was an error connecting to the database."); | |
} | |
This file contains 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 | |
$link = mysqli_connect("HOSTNAME", "DATABSEUSERNAME", "PASSWORD", "DATABASE"); | |
if(mysqli_connect_error()){ | |
die("There was an error connecting to the database."); | |
} | |
$query = "SELECT * FROM users"; |
This file contains 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
function findAncester(el, cls) { | |
while (((el = el.parentElement) && !el.classList.contains(cls)) || el.tagName === "BODY"); | |
return el; | |
} |