Skip to content

Instantly share code, notes, and snippets.

View rehmatworks's full-sized avatar
👨‍💻
python manage.py domagic

Rehmat Alam rehmatworks

👨‍💻
python manage.py domagic
View GitHub Profile
$message = 'Hello [first_name], do you live in [user_country]?';
$first_name = 'Rehmat';
$last_name = 'Alam';
$country = 'Pakistan';
$simpleshortcodes->add($shortcodes);
<?php
class SimpleShortcodes {
private $_shortcodes = array();
public function __construct() {
/*
$shortcodes = array(
'[first_name]' => '{$first_name}',
'[last_name]' => '{$last_name}',
'[user_country]' => '{$country}'
);
$simpleshortcodes = new SimpleShortcodes();
require_once ('/path/SimpleShortcodes.php');