Skip to content

Instantly share code, notes, and snippets.

View emohamed's full-sized avatar

Emil Mohamed emohamed

View GitHub Profile
$html = preg_replace_callback('~\s*^\s*[\*•·•] ?(.*?)$~um', array($this, 'do_list_elements'), $html)
preg_replace('~^-{4}\s*$~m', '<hr />', $html);
<!doctype html>
<html>
<head>
<title>PlaceHolders demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$.do_placeholders();
});
if($('#tweets').length) {
$('#tweets').tweet({
username: 'yourusername', // <<-- Change this to your username
count: 3,
loading_text: 'Loading latest tweets',
template: '{text}{time}'
}).bind('loaded', function() {
$('.tweet_list').addClass('slides');
$('#tweets').flexslider({
slideshowSpeed: 10000,
[
{
"name": "Home",
"link": "home.html"
},
{
"name": "Services",
"link": "interior.html",
"children": [
{
<?php
if ($_SERVER['REQUEST_METHOD']=='POST') {
21try {
$enable_gzip = isset($_POST['gzip']);
$migrator = new WpMigrator($_POST['new-home'], $_POST['new-prefix']);
if (is_uploaded_file($_FILES['dump']['tmp_name'])) {
$file_ext = preg_replace('~.*\.~', '', $_FILES['dump']['name']);
$file_ext = strtolower($file_ext);
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>datepicker demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
<?php
Carbon_Container::factory('custom_fields', 'Offices')
->show_on_post_type('page')
->add_fields(array(
Carbon_Field::factory('text', 'sub_title'),
Carbon_Field::factory('complex', 'office_locations')
->add_fields('office', array(
Carbon_Field::factory('text', 'address'),
Carbon_Field::factory('date', 'added_on'),
Carbon_Field::factory('rich_text', 'description'),