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 | |
/** | |
* The only reliable way of determining if a child exists | |
* in SimpleXMLElement is to use count(). All other methods | |
* do not work reliably in global or local NS. | |
* | |
* NOTE: Error suppresion on @count() is used to suppress | |
* "PHP Warning: count(): Node no longer exists" | |
*/ | |
if(!class_exists('SimpleXMLElement')) die("Bonkers"); |
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 | |
/** | |
* Insert an attachment from a URL address. | |
* | |
* @param string $url The URL address. | |
* @param int|null $parent_post_id The parent post ID (Optional). | |
* @return int|false The attachment ID on success. False on failure. | |
*/ | |
function wp_insert_attachment_from_url( $url, $parent_post_id = null ) { |
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
syntax enable | |
colorscheme desert | |
"-------------General Settings--------------" | |
set backspace=indent,eol,start "Make backspace behave like every other editor. | |
let mapleader = ',' "The default leader is \, but a comma is much better. | |
set number "Let's activate line numbers. |
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 | |
namespace App\Services; | |
use App\Post; | |
class Slug | |
{ | |
/** | |
* @param $title |
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 shipping info above the proceed to checkout button | |
add_action('woocommerce_proceed_to_checkout', 'jagels_custom_checkout_field'); | |
function jagels_custom_checkout_field() { | |
echo '<p><small>Levering innen 2-5 virkedager.</small></p>'; | |
} |
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 | |
namespace App; | |
class RomanNumerals | |
{ | |
const NUMERALS = [ | |
'M' => 1000, | |
'CM' => 900, | |
'D' => 500, |
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 | |
namespace App; | |
class Player | |
{ | |
/** | |
* @var string | |
*/ | |
public string $name; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script> | |
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
</head> | |
<body> |
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 | |
use Illuminate\Foundation\Inspiring; | |
use Illuminate\Support\Facades\Artisan; | |
use Symfony\Component\Process\Process; | |
/* | |
|-------------------------------------------------------------------------- | |
| Console Routes | |
|-------------------------------------------------------------------------- |