Skip to content

Instantly share code, notes, and snippets.

View ryansnowden's full-sized avatar

Ryan Snowden ryansnowden

View GitHub Profile
_ProcessService.php
public function setupForProcess($feed, $feedData) ...
// If our duplication handling is to delete - we delete all elements
// If our duplication handling is to unpublish - we unpublish all elements
if (FeedMeDuplicate::isDelete($feed) || FeedMeDuplicate::isUnpublish($feed)) {
$criteria = $this->_service->setCriteria($feed);
$return['existingElements'] = $criteria->ids();
<?php
/**
* Load landing page template & register shortcodes from URL query
*
* @return void
*/
add_action('template_redirect', 'landing_template');
function landing_template() {
if (get_post_type() == 'landing') {
{
"color_scheme": "Packages/User/Solarized (Dark) (SL).tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": false,
"file_exclude_patterns":
[
".DS_Store",
{
"color_scheme": "Packages/Cobalt2/cobalt2.tmTheme",
"detect_slow_plugins": false,
"ensure_newline_at_eof_on_save": false,
"fade_fold_buttons": true,
"font_face": "Source Code Pro",
"font_size": 13.0,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@ryansnowden
ryansnowden / gist:4386623
Last active December 10, 2015 05:18
saveField for $this->request->data and multiple models
public function saveField() {
$this->autoRender = false;
if (!$this->request->data) {
return json_encode(array(
'failed' => true,
'newValue' => '',
'message' => 'Data missing',
));