Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Special Background Wordpress Plugin
*
* @-wp-header Plugin Name: Special Background
* @-wp-header Plugin URI: http://wordpress.stackexchange.com/questions/972/
* @-wp-header Description: Example to show how to add a special background using exiting background admin page in core.
* @-wp-header Version: 0.2
* @-wp-header Author: Mike Schinkel, hakre
* @-wp-header Author URI: http://mikeschinkel.com/custom-wordpress-plugins/
@hakre
hakre / bopypad.md
Last active October 5, 2015 07:07
SO copypad

This question appears to be off-topic because it is about ...

Tutoring with a software named Wordpress, here a Tutorial for Extending it with a specific Plugin and an individual Theme.

Tutoring a Software Product named Magento.

a very individual problem without given any further reference to commons in programming in a useful manner. See also: Stack Overflow question checklist

a Debugging request of larger chunks of non-isolated code that may (or may not) contain the code the question asks about. Instead the code should be reduced the a bare minimum example code that outlines the problem and question in a compact and self-explaining manner.

@ircmaxell
ircmaxell / equality.php
Last active April 19, 2019 13:52
Unicode Set Functions
<?php
const ✓ = true;
const ✕ = false;
function ≠($left, $right) {
return $left != $right;
}
function ≅($left, $right) {
@MadaraUchiha
MadaraUchiha / mysql_comment.markdown
Last active May 9, 2019 23:07
Don't use MySQL functions in PHP - Comment for Stack Overflow
[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](http://j.mp/XqV7Lp). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

@nikic
nikic / php_evaluation_order.md
Last active October 19, 2021 05:47
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:

<?php

$a = 1;
$c = $a + $a++;
@evaisse
evaisse / remove_accents.function.php
Created August 18, 2009 07:43
php function to remove accent from the input string string. An example string like `ÀØėÿᾜὨζὅБю` * will be translated to `AOeyIOzoBY`
<?php # -*- coding: utf-8 -*-
// function remove_accents()
/**
* Unaccent the input string string. An example string like `ÀØėÿᾜὨζὅБю`
* will be translated to `AOeyIOzoBY`. More complete than :
* strtr( (string)$str,
* "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ",
* "aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn" );
*