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 | |
header("Refresh: 300;"); | |
$some = 'ab1cd3efghijklmn8opqrstuv5wxyz'; // some text | |
$shuffle = substr(str_shuffle(md5($url)),5); // shuffle some text | |
$string = substr($some, 0, 5).substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'),0,3); // make a cool shuffle with length 8 | |
$receiver = ''; // Receiver? | |
$subject = ''; // Subject? |
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 | |
// ERSTELLEN | |
$file = fopen("file.txt", "r") or die("Geht nicht!"); // file.txt ist die Datei und r steht für's Lesen | |
fclose($file); // Hier wird die Datei wieder geschlossen | |
// LESEN | |
$file = fopen("file.txt", "r") or die("Geht nicht!"); // file.txt ist die Datei und r steht für's Lesen | |
$content = fread($file, filesize("file.txt")); //$file ist die Datei und filesize gibt an, wie lang der Inhalt ist | |
fclose($file); // Hier wird die Datei wieder geschlossen |
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 | |
/** | |
* From "That is a nice and cool title!" to "that-is-a-nice-and-cool-title" | |
*/ | |
function betterSlug($text, $strict = false) | |
{ | |
$text = html_entity_decode($text, ENT_QUOTES, 'UTF-8'); | |
// replace non letter or digits by - |
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 | |
/** | |
* Text Shortener | |
*/ | |
function shortText($string, $lenght) | |
{ | |
if(strlen($string) > $lenght) { | |
$string = substr($string, 0, $lenght)."..."; | |
$string_end = strrchr($string, " "); | |
$string = str_replace($string_end, " ...", $string); |
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 | |
/* | |
Plugin Name: Products | |
Description: Products for your back- and frontend. | |
Version: 1.0 | |
Author: Your Name | |
Author URI: http://yoururl.com | |
*/ | |
defined( 'ABSPATH' ) or die( 'Plugin file cannot be accessed directly.' ); |
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 if (is_home()) { ?> | |
<title><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?></title> | |
<?php } else { ?> | |
<title><?php wp_title('»', true, 'right');bloginfo('name'); ?></title> | |
<?php } ?> |
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 | |
/** | |
* Plugin Name: | |
* Plugin URI: | |
* Description: | |
* Version: | |
* Author: | |
* Author URI: | |
* Text Domain: | |
* License: |
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 | |
/* | |
Problem: Die Ausgaben der anderen Personen werden hier auch angezeigt. Die, die keine haben, verursachen ein Problem | |
in Form von "Die Seite ist blank". | |
Die Ausgabe: | |
Ein Feld aus dem Profil des Benutzers, wo er eingetragen hat, welche Spiele er mag. Die Ausgabe im Frontend (hier) zeigt lediglich den Inhalt | |
des Feldes + dem passendem Label. |
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 Plugin_Name\Klasse; | |
class Klasse | |
{ | |
public function init($irgendwas) | |
{} | |
} | |
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 | |
/** | |
Name: Blaupause | |
Author: Kevin Pliester | |
License: MIT License | |
License URI: http://opensource.org/licenses/MIT | |
**/ | |
namespace Gameplane\Extensions\Blaupause; // Sorgt dafür, dass die Funktionen heißen können, wie sie wollen. |
OlderNewer