This file contains hidden or 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 | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Center; | |
class SearchController extends Controller { | |
This file contains hidden or 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
func UIColorFromHex(rgbValue:UInt32, alpha:Double=1.0)->UIColor { | |
let red = CGFloat((rgbValue & 0xFF0000) >> 16)/256.0 | |
let green = CGFloat((rgbValue & 0xFF00) >> 8)/256.0 | |
let blue = CGFloat(rgbValue & 0xFF)/256.0 | |
return UIColor(red:red, green:green, blue:blue, alpha:CGFloat(alpha)) | |
} | |
view.backgroundColor = UIColorFromHex(0x323232,alpha: 1) |
This file contains hidden or 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
if let tabBarController = self.tabBarController { | |
let indexToRemove = 2 | |
if indexToRemove < tabBarController.viewControllers?.count { | |
var viewControllers = tabBarController.viewControllers | |
viewControllers?.removeAtIndex(indexToRemove) | |
tabBarController.viewControllers = viewControllers | |
} | |
} |
This file contains hidden or 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
if let arrayOfTabBarItems = self.tabBarController!.tabBar.items as! AnyObject as? NSArray,tabBarItem = arrayOfTabBarItems[2] as? UITabBarItem { | |
tabBarItem.enabled = false | |
} |
This file contains hidden or 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
function remove_html_credit() { | |
return ''; | |
} | |
add_filter( 'tribe_html_credit', 'remove_html_credit' ); |
This file contains hidden or 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 | |
add_filter( 'json_prepare_post', function ($data, $post, $context) { | |
$data['myextradata'] = array( | |
'start_date' => get_post_meta( $post['ID'], '_EventStartDate', true ), | |
'end_date' => get_post_meta( $post['ID'], '_EventEndDate', true ), | |
); | |
return $data; | |
}, 10, 3 ); |
This file contains hidden or 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 | |
/*may need additional placeholders for the event rocket plugin, which in turn extends The Events Calendar */ | |
add_filter( 'eventrocket_embedded_event_placeholders', 'my_new_inline_template_tag' ); | |
function my_new_inline_template_tag( $placeholders ) { | |
$placeholders['{random_number}'] = 'my_inline_template_tag_hander'; | |
return $placeholders; | |
} |
This file contains hidden or 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 | |
defined( 'ABSPATH' ) or exit(); | |
/** | |
* Extremely basic templating engine for embedding templates inline between opening and | |
* closing shortcodes. | |
*/ | |
class EventRocketEmbeddedEventTemplateParser | |
{ |
NewerOlder