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
// 1. Click Insert link. | |
// 2. Choose existing content. | |
// 3. Select said content and click "Add Link". | |
// Current resulting code | |
<a title="Some title" href="http://172.24.1.7/mysite/some-title/">Link</a> | |
// Proposed resulting code | |
<a title="Some title" href="[site_url]/some-title/">Link</a> |
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 | |
$ical = "BEGIN:VCALENDAR | |
VERSION:2.0 | |
PRODID:-//hacksw/handcal//NONSGML v1.0//EN | |
BEGIN:VEVENT | |
UID:" . md5(uniqid(mt_rand(), true)) . "@domain.com | |
DTSTAMP:" . gmdate('Ymd')."T". gmdate('His') . "Z | |
DTSTART:" . $start_date->format('Ymd') . "T" . $start_date->format('Hi') . "00Z | |
DTEND:" . $end_date->format('Ymd') . "T" . $end_date->format('Hi') . "00Z |
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
{{ files:listing folder="6" limit="100" order-by="date_added" direction="desc" }} | |
<a href="{{ url:site }}files/large/{{ filename }}" class="fancybox" data-fancybox-group="gallery"> | |
<img src="{{ url:site }}files/thumb/{{ id }}/200/200" width="200" height="200" class="img-polaroid"> | |
</a> | |
{{ /files:listing }} |
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
<nav id="primary"> | |
<ul> | |
<li {{ (Request::is('/') ? 'class="active"' : '') }}>{{ HTML::link(URL::to(''), 'Home') }}</li> | |
<li {{ (Request::is('/') ? 'class="active"' : '') }}>{{ HTML::link(URL::to(''), 'The Trade') }}</li> | |
</ul> | |
</nav> |
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
// Being sent from a form via AJAX that gets URI encoded | |
list[1]=root&list[68]=root&list[67]=root | |
// Data from $this->input->data | |
list%5B1%5D%3Droot%26list%5B68%5D%3Droot%26list%5B67 | |
<?php | |
$parts = parse_url($this->input->post('data')); | |
$query = array(); | |
parse_str($parts['path'], $query); |
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 | |
require_once dirname(__FILE__).'/app/libraries/admin_table.php'; | |
$wp_events_registrants_table = new Admin_Table($args = wp_parse_args($args, array( | |
'plural' => 'wp_list_events', | |
'singular' => 'wp_list_event', | |
'ajax' => false, | |
))); |
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
public function display_content() | |
{ | |
ob_start(); | |
include_once(plugin_dir_path(__FILE__) . 'views/public.php'); | |
$output_string = ob_get_contents(); | |
ob_end_clean(); | |
return $output_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
(array) Array | |
( | |
[key] => field_5203ab0ca23ee | |
[label] => Question | |
[name] => question | |
[type] => repeater | |
[order_no] => 0 | |
[instructions] => | |
[required] => 1 | |
[id] => acf-field-question |
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_action('admin_notices', function() { | |
$action = (isset($_REQUEST['action']) ? $_REQUEST['action'] : null); | |
if ($action && $_REQUEST['page'] == 'mvc_events') { | |
$notice = '<div class="updated"><p>'; | |
if ($action == 'delete') { | |
$notice .= 'Successfully deleted.'; | |
} elseif ($action == 'cancel') { | |
$notice .= 'Successfully cancelled.'; |
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
<ol class="breadcrumb"> | |
{{ template:breadcrumbs }} | |
{{ if uri }} | |
<li>{{ url:anchor segments=uri title=name }}</li> | |
{{ else }} | |
<li class="active">{{ name }}</li> | |
{{ endif }} | |
{{ /template:breadcrumbs }} | |
</ol> |