private function _optionTypePostSelector($item, $newItem)
 {
     $postType = $item->getParam('post_type', 'page');
     $postGetter = ffContainer::getInstance()->getPostLayer()->getPostGetter();
     $posts = $postGetter->setNumberOfPosts(-1)->getPostsByType($postType);
     $selectValues = $item->getSelectValues();
     $selectValuesNew = array();
     if ($posts == null) {
         $posts = array();
     }
     if ($posts instanceof WP_Error) {
         $selectValuesNew = array();
     } else {
         foreach ($posts as $onePost) {
             $selectValuesNew[] = array('name' => $onePost->getTitle(), 'value' => $onePost->getId());
         }
     }
     if (empty($selectValues)) {
         $selectValues = array();
     }
     $selectValues = array_merge($selectValues, $selectValuesNew);
     $item->addParam('class', 'ff-post-select');
     $newItem['selectValues'] = $selectValues;
     $newItem['params'] = $item->getParams();
     $newItem['type'] = 'select2';
     return $newItem;
 }
 public function requireAssets()
 {
     wp_enqueue_media();
     //wp_enqueue_style('buttons');
     // http://localhost:8888/framework/wp-admin/load-styles.php?c=1&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check,media-views&ver=3.9.1
     // TODO upravit pico;
     //wp_enqueue_script('jquery-ui-core');
     //wp_enqueue_script('jquery-ui-sortable');
     $this->_getScriptEnqueuer()->addScript('jquery-ui-core');
     $this->_getScriptEnqueuer()->addScript('jquery-ui-sortable');
     $this->_getScriptEnqueuer()->addScript('jquery-ui-datepicker');
     $this->_getStyleEnqueuer()->addStyleFramework('jquery-ui-datepicker', 'framework/extern/jquery-ui/datepicker.css');
     $this->_getScriptEnqueuer()->addScriptFramework('ff-fw-freshlib', 'framework/adminScreens/assets/js/freshlib.js', array('jquery'));
     $this->_getScriptEnqueuer()->getFrameworkScriptLoader()->requireFrsLib();
     $this->_getScriptEnqueuer()->getFrameworkScriptLoader()->requireFrsLibOptions();
     $this->_getScriptEnqueuer()->addScriptFramework('ff-fw-adminScreens', 'framework/adminScreens/assets/js/adminScreens.js', array('jquery'));
     $this->_getScriptEnqueuer()->addScriptFramework('ff-fw-options', 'framework/options/assets/options.js', array('jquery'));
     $this->_requireAssets();
     //$this->_getStyleEnqueuer()->addStyleFramework('ff-admin', 'framework/adminScreens/assets/css/ff-admin.less', null, null, null, null);
     //( $handle = null, $source = null, $dependencies = null, $version = null, $media = null, $type = null, $additionalInfo = null )
     // TODO rewrite info framework stuff
     //ffContainer::getInstance()->getFrameworkScriptLoader()->addAdminColorsToStyle('ff-admin');
     ffContainer::getInstance()->getFrameworkScriptLoader()->requireFfAdmin();
     // TODO END
     //$this->_getStyleEnqueuer()->addLessVariable('ff-admin', 'aaaa', 'blue');
     $this->_getStyleEnqueuer()->addStyleFramework('ff-fw-options', 'framework/options/assets/options.css');
 }
 protected function _oneOption($item)
 {
     switch ($item->getType()) {
         case ffOneOption::TYPE_CONDITIONAL_LOGIC:
             $valueRaw = $item->getValue();
             $valueParsed = array();
             parse_str($valueRaw, $valueParsed);
             $value = isset($valueParsed['option-value']) ? $valueParsed['option-value'] : array();
             $this->_setDataValue($value);
             break;
         case ffOneOption::TYPE_COLOR_LIBRARY:
             $colorLibrary = ffContainer::getInstance()->getAssetsIncludingFactory()->getColorLibrary();
             $variableName = $item->getParam('less-variable-name');
             $variableValue = $item->getValue();
             if (strpos($variableValue, '@') !== false) {
                 $colorLibrary->setUserColor($variableName, $variableValue);
             } else {
                 $colorLibrary->deleteUserColor($variableName);
             }
             if ($this->_settings[ffOptionsPostReader::RETURN_COLORLIB_VALUE] == true) {
             } else {
                 $this->_setDataValue('');
             }
             //var_dump( $variableValue );
             break;
         case ffOneOption::TYPE_TEXT:
         case ffOneOption::TYPE_TEXTAREA:
             $value = $item->getValue();
             $valueStripped = stripslashes($value);
             $this->_setDataValue($valueStripped);
             break;
     }
 }
Пример #4
0
function ff_template_initialize()
{
    $templateName = 'Casanova';
    $fwc = ffContainer::getInstance();
    $fwc->getFramework()->loadOurTheme();
    //$fwc->getFramework()
}
 public function getImageInformator($imageUrl)
 {
     $this->_getClassloader()->loadClass('ffImageInformator');
     $container = ffContainer::getInstance();
     $imageInformator = new ffImageInformator($container->getFileSystem());
     $imageInformator->setImageUrl($imageUrl);
     return $imageInformator;
 }
 protected function _save($postId)
 {
     $fwc = ffContainer::getInstance();
     $saver = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade($postId);
     $s = $fwc->getOptionsFactory()->createOptionsHolder('ffComponent_Theme_MetaboxPage_PortfolioView')->getOptions();
     $postReader = $fwc->getOptionsFactory()->createOptionsPostReader($s);
     $value = $postReader->getData('page_portfolio');
     $saver->setOptionCoded('page_portfolio', $value);
 }
 public function getPostMetaGetter()
 {
     if ($this->_postMetaGetter == null) {
         $this->_getClassloader()->loadClass('ffPostMetaGetter');
         $container = ffContainer::getInstance();
         $this->_postMetaGetter = new ffPostMetaGetter($container->getWPLayer());
     }
     return $this->_postMetaGetter;
 }
    public function printComponent($args, ffOptionsQuery $query)
    {
        extract($args);
        echo $before_widget;
        $title = trim($query->get('twitter title'));
        if (!empty($title)) {
            echo $before_title . zero__wp_kses($title) . $after_title;
        }
        $twitterFeeder = ffContainer::getInstance()->getLibManager()->createTwitterFeeder();
        ffContainer::getInstance()->getClassLoader()->loadClass('ffOptionsHolder_Twitter');
        $tweetsCollection = $twitterFeeder->getTwitterFeed($query->get('twitter fw_twitter'));
        if (!$tweetsCollection->valid()) {
            echo '<p class="twitter-oops">Oops!</p>';
            echo '<p>Bad Twitter account data!</p>';
        } else {
            wp_enqueue_script('zero-twitter-widget-1-js');
            ?>
			<div class="twitter-widget-1 ff-block">
				<div class="tweets">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<?php 
            foreach ($tweetsCollection as $oneTweet) {
                ?>
								<div class="tweet swiper-slide">
									<div class="tweet-inner">
										<div class="tweet-content">
											<?php 
                echo zero__wp_kses($oneTweet->textWithLinks);
                ?>
										</div>
									</div>
								</div>
							<?php 
            }
            ?>
						</div>
					</div>
				</div>
				<div class="tweets-footer clearfix">
					<div class="pull-left">
						<?php 
            echo '<a href="' . esc_url('http://twitter.com/' . esc_attr($query->get('twitter fw_twitter username'))) . '" class="tweet-author">';
            echo '<i class="fa fa-twitter"></i> ';
            echo esc_attr($query->get('twitter fw_twitter username'));
            echo '</a>';
            ?>
					</div>
					<div class="pull-right">
						<div class="twitter-pagination"></div>
					</div>
				</div>
			</div>
		<?php 
        }
        echo $after_widget;
    }
 protected function _save($postId)
 {
     if (!isset($_POST['has-been-normalized'])) {
         return false;
     }
     $fwc = ffContainer::getInstance();
     $saver = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade($postId);
     $value = $fwc->getOptionsFactory()->createOptionsPostReader()->getData('portfolio_title_options');
     $saver->setOption('portfolio_title_options', $value);
 }
 public function createUserColorLibrary()
 {
     $this->_getClassloader()->loadClass('ffUserColorLibrary');
     $this->_getClassloader()->loadClass('ffUserColorLibraryItemFactory');
     $this->_getClassloader()->loadClass('ffUserColorLibraryItem');
     $this->_getClassloader()->loadClass('ffColor');
     $factory = new ffUserColorLibraryItemFactory($this->_getClassloader());
     $library = new ffUserColorLibrary($factory, ffContainer::getInstance()->getDataStorageFactory()->createDataStorageOptionsPostType_NamespaceFacade(ffUserColorLibrary::LIBRARY_NAMESPACE));
     return $library;
 }
 private function _printForm($data = array())
 {
     $l = ffContainer::getInstance()->getOptionsFactory()->createOptionsHolder('ffOptionsHolderConditionalLogic')->getOptions();
     $printer2 = ffContainer::getInstance()->getOptionsFactory()->createOptionsPrinterLogic($data, $l);
     echo '<form class="fftestform ff-modal-logic" method="POST">';
     $printer2->setNameprefix('a');
     $printer2->walk();
     echo '</br>';
     echo '</form>';
 }
 protected function _requireAssets()
 {
     $this->_getScriptEnqueuer()->getFrameworkScriptLoader()->requireSelect2()->requireFrsLib()->requireFrsLibOptions()->requireFrsLibModal();
     $this->_getStyleEnqueuer()->addStyleFramework('ff-section-picker', '/framework/adminScreens/modalWindow/libraries/section/sectionPicker.css');
     $this->_getScriptEnqueuer()->getFrameworkScriptLoader()->addAdminColorsToStyle('ff-section-picker');
     $this->_getStyleEnqueuer()->addLessImportFile('ff-section-picker', 'ff-bootstrap-mixins-less', ffContainer::getInstance()->getLessWPOptionsManager()->getFrameworkBootstrapMixinsLessUrl());
     $this->_getStyleEnqueuer()->addLessImportFile('ff-section-picker', 'ff-fresh-mixins-less', ffContainer::getInstance()->getLessWPOptionsManager()->getFrameworkFreshMixinsLessUrl());
     $this->_getScriptEnqueuer()->addScriptFramework('ff-imagesloaded-js', '/framework/extern/imagesloaded/imagesloaded.min.js', array('jquery'));
     $this->_getScriptEnqueuer()->addScriptFramework('ff-packery-js', '/framework/extern/packery/packery.pkgd.min.js', array('jquery'));
 }
 public function __construct()
 {
     $options = array('classname' => get_class($this) . ' ' . $this->_widgetAdditionalClasses, 'description' => $this->_widgetAdminDescription);
     $controls = array('width' => $this->_getFormSize(), 'height' => 200);
     parent::__construct(get_class($this), $this->_widgetAdminTitle, $options, $controls);
     $this->_setComponentfactory(ffContainer::getInstance()->getComponentFactory());
     $this->_setContainer(ffContainer::getInstance());
     $this->_setOptionsFactory(ffContainer::getInstance()->getOptionsFactory());
     //        ffContainer()->getFrameworkScriptLoader()->requireFrsLib()->requireFrsLibOptions();
 }
 protected function _save($postId)
 {
     $fwc = ffContainer::getInstance();
     $saver = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade($postId);
     $s = $fwc->getOptionsFactory()->createOptionsHolder('ffComponent_Theme_MetaboxPage_TitleView')->getOptions();
     $postReader = $fwc->getOptionsFactory()->createOptionsPostReader($s);
     $value = $postReader->getData('page_title');
     $valueNew = base64_encode(serialize($value));
     $saver->setOption('page_title', $valueNew);
 }
 public function createOptionsQuery($data, $structures = null)
 {
     if (is_string($structures)) {
         $structures = $this->_getOptionsholderfactory()->createOptionsHolder($structures);
     }
     $this->_getClassloader()->loadClass('ffOptionsQuery');
     $arrayConvertor = $this->_getOptionsarrayconvertorfactory()->createArrayConvertor();
     $WPLayer = ffContainer::getInstance()->getWPLayer();
     $query = new ffOptionsQuery($data, $structures, $arrayConvertor);
     $query->setWPLayer($WPLayer);
     return $query;
 }
 protected function _save($postId)
 {
     return;
     $fwc = ffContainer::getInstance();
     $layoutsDataManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getLayoutsDataManager();
     $collection = $layoutsDataManager->getLayoutCollection();
     $item = $collection->getLayoutById($postId);
     $options = $fwc->getOptionsFactory()->createOptionsHolder('ffOptionsHolder_Layout_Conditions')->getOptions();
     $postReader = $fwc->getOptionsFactory()->createOptionsPostReader($options);
     $value = $postReader->getData('conditions');
     $item->setConditional($value);
     //        $layoutsDataManager->saveLayoutCollection();
 }
 public function getMetaBoxManager()
 {
     if ($this->_metaBoxManager == null) {
         $this->_getClassloader()->loadClass('ffMetaBoxView');
         $this->_getClassloader()->loadClass('ffMetaBoxManager');
         $this->_getClassloader()->loadClass('ffMetaBoxFactory');
         $this->_getClassloader()->loadClass('ffMetaBoxViewFactory');
         $metaBoxViewFactory = new ffMetaBoxViewFactory($this->_getClassloader());
         $metaBoxFactory = new ffMetaBoxFactory($this->_getClassloader(), $metaBoxViewFactory);
         $this->_metaBoxManager = new ffMetaBoxManager(ffContainer::getInstance()->getWPLayer(), $metaBoxFactory);
     }
     return $this->_metaBoxManager;
 }
 protected function _render()
 {
     $container = ffContainer::getInstance();
     $s = $container->getOptionsFactory()->createStructure('a');
     $s->startSection('start');
     $s->addElement(ffOneElement::TYPE_TABLE_START);
     $s->addElement(ffOneElement::TYPE_TABLE_DATA_START, '', 'Group Title');
     $s->addOption(ffOneOption::TYPE_TEXT, '', '', 'My Colors', 'description')->addParam('class', 'ff-group-title-input');
     $s->addElement(ffOneElement::TYPE_TABLE_DATA_END);
     $s->addElement(ffOneElement::TYPE_TABLE_END);
     $s->endSection('end');
     $printer = $container->getOptionsFactory()->createOptionsPrinter(array(), $s);
     $printer->walk();
 }
 protected function _render($post)
 {
     $layoutsDataManager = ffContainer()->getThemeFrameworkFactory()->getLayoutsNamespaceFactory()->getLayoutsDataManager();
     $collection = $layoutsDataManager->getLayoutCollection();
     $item = $collection->getLayoutById($post->ID);
     $fwc = ffContainer::getInstance();
     $fwc->getWPLayer()->add_action('admin_footer', array($this, 'requireModalWindows'), 1);
     $s = $fwc->getOptionsFactory()->createOptionsHolder('ffOptionsHolder_Layout_Placement')->getOptions();
     //createStructure('portfolio');
     $value = $item->getPlacement();
     //$fwc->getDataStorageFactory()->createDataStorageOptionsPostType_NamespaceFacade(ffThemeContainer::THEME_NAME_LOW.'-layouts', true)->getOptionCoded('placements');
     $printer = $fwc->getOptionsFactory()->createOptionsPrinterBoxed($value, $s);
     $printer->setNameprefix('placement');
     $printer->walk();
 }
 protected function _render()
 {
     $container = ffContainer::getInstance();
     $s = $container->getOptionsFactory()->createStructure('a');
     $s->startSection('start');
     $s->addElement(ffOneElement::TYPE_TABLE_START);
     $s->addElement(ffOneElement::TYPE_TABLE_DATA_START, '', 'How would you like to proceed?');
     $s->addOption(ffOneOption::TYPE_RADIO, '', '', 'delete-group', '')->addSelectValue('Delete <span class="ff-current-group">&#8220;My colors&#8221;</span> group and its colors forever', 'delete-group')->addSelectValue('Delete <span class="ff-current-group">&#8220;My colors&#8221;</span> group but transfer its colors to this group:', 'move-colors-delete-group')->addParam('class', 'ff-group-delete-option');
     $s->addOption(ffOneOption::TYPE_SELECT, '', '', 'delete-colors', '')->addParam('class', 'ff-group-select');
     //$s->addElement( ffOneElement::TYPE_HTML, '', 'html tady prosim');
     $s->addElement(ffOneElement::TYPE_TABLE_DATA_END);
     $s->addElement(ffOneElement::TYPE_TABLE_END);
     $s->endSection('end');
     $printer = $container->getOptionsFactory()->createOptionsPrinter(array(), $s);
     $printer->walk();
 }
 public function printComponent($args, ffOptionsQuery $query)
 {
     //        echo'bbb';
     //        return;
     extract($args);
     //$fw_twitter = $query->get('fw_twitter');
     //$username = $fw_twitter->get('username');
     $twitterFeeder = ffContainer::getInstance()->getLibManager()->createTwitterFeeder();
     ffContainer::getInstance()->getClassLoader()->loadClass('ffOptionsHolder_Twitter');
     $tweetsCollection = $twitterFeeder->getTwitterFeed($query->get('twitter fw_twitter'));
     //var_dump( $tweetsCollection);
     $tweetsText = '';
     if (!$tweetsCollection->valid()) {
         $tweetsText .= '<li>';
         $tweetsText .= '<span class="tweet_text">';
         $tweetsText .= '<p class="twitter-oops">Oops!</p>';
         $tweetsText .= '<p>Bad Twitter account data!</p>';
         $tweetsText .= '</span>';
         $tweetsText .= '</li>';
     } else {
         foreach ($tweetsCollection as $oneTweet) {
             $tweetsText .= '<li>';
             $tweetsText .= '<span class="tweet_text">';
             $tweetsText .= $oneTweet->textWithLinks;
             $tweetsText .= '</span>';
             $tweetsText .= '<span class="tweet_time">';
             $timeFormat = 'g:i A - j M Y';
             $time = strtotime($oneTweet->date);
             $date = date($timeFormat, $time);
             $tweetsText .= '<a href="' . esc_url('http://twitter.com/' . esc_attr($query->get('twitter fw_twitter username'))) . '"> ';
             $tweetsText .= $date;
             $tweetsText .= '</a>';
             $tweetsText .= '</span>';
             $tweetsText .= '</li>';
         }
     }
     echo $before_widget;
     $title = trim($query->get('twitter title'));
     if (!empty($title)) {
         // Default WP text
         echo $before_title . ff_wp_kses($title) . $after_title;
     }
     echo '<ul>';
     echo $tweetsText;
     echo '</ul>';
     echo $after_widget;
 }
 public function render($post)
 {
     $container = ffContainer::getInstance();
     $container->getFrameworkScriptLoader()->requireFrsLib()->requireFrsLibMetaboxes();
     echo '<input type="hidden" name="' . ffMetaBoxView::USED_META_BOX_COLLECTOR_NAME . '[]" value="' . str_replace('View', '', get_class($this)) . '" >';
     $this->_printVisibility();
     $this->_requireAssets();
     echo '<div class="ff-metabox-content">';
     if ($this->_getParam(ffMetaBox::PARAM_NORMALIZE_OPTIONS) == true) {
         echo '<div class="ff-metabox-normalize-options">';
     }
     $this->_render($post);
     if ($this->_getParam(ffMetaBox::PARAM_NORMALIZE_OPTIONS) == true) {
         echo '</div>';
     }
     echo '</div>';
 }
 public function createOptionsPrinterDataboxGenerator()
 {
     if ($this->_optionsPrinterDataBoxGenerator == null) {
         $this->_getClassloader()->loadClass('ffIOptionsHolder');
         $this->_getClassloader()->loadClass('ffOptionsHolder');
         $this->_getClassloader()->loadClass('ffOptionsHolder_CachingFacade');
         $this->_getClassloader()->loadClass('ffIOneDataNode');
         $this->_getClassloader()->loadClass('ffOneSection');
         $this->_getClassloader()->loadClass('ffOneOption');
         $this->_getClassloader()->loadClass('ffOneStructure');
         $this->_getClassloader()->loadClass('ffOneElement');
         $WPLayer = ffContainer::getInstance()->getWPLayer();
         $this->_getClassloader()->loadClass('ffOptionsPrinterDataBoxGenerator');
         $this->_optionsPrinterDataBoxGenerator = new ffOptionsPrinterDataBoxGenerator($WPLayer);
     }
     return $this->_optionsPrinterDataBoxGenerator;
 }
 protected function _save($postId)
 {
     //        var_dump( $_POST )
     //        ;
     //        die();
     $fwc = ffContainer::getInstance();
     $saver = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade($postId);
     $typeArray = $fwc->getOptionsFactory()->createOptionsPostReader()->getData('customcode_type');
     $type = $typeArray['radio']['type'];
     $value = $fwc->getOptionsFactory()->createOptionsPostReader()->getData('customcode_code');
     if ($type == 'less') {
         $compiledFile = $this->_compileLessFiles($value['code']['code']);
         $saver->setOption('customcode_less', $compiledFile);
     } else {
         $saver->deleteOption('customcode_less');
     }
     $saver->setOption('customcode_code', $value);
 }
 protected function _render()
 {
     $lessManager = ffContainer::getInstance()->getLessWPOptionsManager();
     $namespace = 'bootstrap';
     $options = $lessManager->getOptionsFromFrameworkBootstrap($namespace);
     // $namespace = 'theme-variables';
     // $file = get_template_directory() . '/assets/less/variables.less';
     // $options = $lessManager->getOptionsFromFile( $namespace, $file );
     $data = $lessManager->createWPOptionsData($namespace);
     echo '<div class="wrap">';
     echo '<h2>Bootstrap LESS variables</h2>';
     echo '<form method="post">';
     echo '<button class="button button-primary hero">Save</button>';
     $printer = ffContainer::getInstance()->getOptionsFactory()->createOptionsPrinterBoxed($data, $options);
     $printer->setNameprefix($namespace);
     $printer->walk();
     echo '</form>';
     echo '</div>';
 }
 private function _createTemplateClass($templateInfo)
 {
     $mainClass = $templateInfo['mainClassName'];
     $containerClass = $mainClass . 'Container';
     require $this->_getOurThemeRootPath() . '/framework/bootstrap/themeClass.php';
     require $this->_getOurThemeRootPath() . '/framework/bootstrap/container.php';
     $themeContainerInstance = call_user_func($containerClass . '::getInstance', ffContainer::getInstance(), $this->_getOurThemeRootPath());
     $themeClassInstance = new $mainClass($themeContainerInstance, $this->_getOurThemeRootPath());
     return $themeClassInstance;
     // 		if( !isset( $pluginInfo['mainClassName'] ) ) {
     // 			throw new Exception('Trying to load PLUGIN which does not have defined plugininfo -> mainClassName' );
     // 		}
     // 		require $pluginDirClean .'/bootstrap/pluginClass.php';
     // 		$pluginClassName = $pluginInfo['mainClassName'];
     // 		$containerClassName = $pluginClassName . 'Container';
     // 		require $pluginDirClean . '/bootstrap/container.php';
     // 		$pluginContainerInstance =  call_user_func($containerClassName.'::getInstance', $this->_getContainer(), $pluginDirClean );
     // 		$pluginClassInstance = new $pluginClassName( $pluginContainerInstance, $pluginDirClean );
     // 		return $pluginClassInstance;
 }
Пример #27
0
function ff_themeInstallFramework()
{
    if (!file_exists(dirname(__FILE__) . '/fresh-framework/freshplugin.php')) {
        return false;
    }
    require_once dirname(__FILE__) . '/fresh-framework/freshplugin.php';
    $versionManager = ffFrameworkVersionManager::getInstance();
    $versionManager->initFrameworkFromTemplate();
    $container = ffContainer::getInstance();
    $currentDir = dirname(__FILE__);
    $infoFile = $currentDir . '/fresh-framework/info.php';
    require $infoFile;
    $latestInstalledVersion = $versionManager->getLatestInstalledVersion();
    if (version_compare($info['plugin-version'], $latestInstalledVersion, '>')) {
        if ($container->getPluginInstaller()->installPluginFromFolder($currentDir . '/fresh-framework')) {
            $container->getPluginInstaller()->activateInstalledPlugins();
            header("Refresh:0");
            die;
        }
    } else {
        return;
    }
}
Пример #28
0
 function ff_contact_form_send_ajax(ffAjaxRequest $ajaxRequest)
 {
     $data = $ajaxRequest->data;
     $formSerialize = $data['formInput'];
     $output = array();
     parse_str($formSerialize, $output);
     $contactInfo = $data['contactInfo'];
     $contactInfoDecoded = ffContainer::getInstance()->getCiphers()->freshfaceCipher_decode($contactInfo);
     $contactInfoParsed = json_decode($contactInfoDecoded);
     $message = '';
     $message .= 'Name: ' . esc_attr($output['name']) . "\n";
     $message .= 'Email: ' . esc_attr($output['email']) . "\n";
     $message .= 'Subject: ' . esc_attr($contactInfoParsed->subject) . "\n";
     $message .= "\n";
     $message .= 'Message: ' . esc_attr($output['message']) . "\n";
     if (!empty($contactInfoParsed->email)) {
         $result = wp_mail($contactInfoParsed->email, $contactInfoParsed->subject, $message);
         if ($result == false) {
             echo 'false';
         } else {
             echo 'true';
         }
     }
 }
 private function _includeCss()
 {
     $styleEnqueuer = $this->_getStyleEnqueuer();
     $styleEnqueuer->addStyle('ff-google-font', 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic');
     $styleEnqueuer->addStyleTheme('ff-bootstrap', '/assets/css/bootstrap.min.css');
     $styleEnqueuer->addStyleTheme('ff-fancybox', '/assets/js/fancybox/jquery.fancybox.css');
     $styleEnqueuer->addStyleTheme('ff-revolution-slider', '/assets/js/revolutionslider/css/settings.css');
     $styleEnqueuer->addStyleTheme('ff-bx-slider', '/assets/js/bxslider/jquery.bxslider.css');
     $styleEnqueuer->addStyleTheme('ff-youtube-player', '/assets/js/ytplayer/css/YTPlayer.css');
     $styleEnqueuer->addStyleTheme('ff-animations', '/assets/js/animations/animate.min.css');
     $styleEnqueuer->addStyleTheme('ff-custom', '/assets/css/custom.css');
     $styleEnqueuer->addStyleTheme('ff-custom-page', '/assets/css/pages-style.css');
     $accent = ffThemeOptions::getQuery('layout accent');
     if ('default' != $accent) {
         $styleEnqueuer->addStyleTheme('ff-accent', '/assets/css/alternative-styles/' . esc_attr($accent) . '.css');
     }
     // CUSTOM FONT STYLE
     $fontQuery = ffThemeOptions::getQuery('font');
     // Has to be same as in class.ffThemeOptionsHolder.php
     $this->_includeGoogleFont($fontQuery->get('body'));
     $this->_includeGoogleFont($fontQuery->get('headers'));
     $this->_includeGoogleFont($fontQuery->get('inputs'));
     $this->_includeGoogleFont($fontQuery->get('code'));
     ffContainer::getInstance()->getWPLayer()->wp_add_inline_style('ff-custom-page', ff_get_font_selectors('body') . '{font-family: ' . $fontQuery->get('body') . ', Helvetica, Arial, sans-serif; }' . "\n" . ff_get_font_selectors('headers') . '{font-family: ' . $fontQuery->get('headers') . ', Helvetica, Arial, sans-serif; }' . "\n" . ff_get_font_selectors('inputs') . '{font-family: ' . $fontQuery->get('inputs') . ', Helvetica, Arial, sans-serif; }' . "\n" . ff_get_font_selectors('code') . '{font-family: ' . $fontQuery->get('code') . ', monospace; }' . "\n");
     $styleEnqueuer->addStyleTheme('ff-font-awesome', '/assets/fontawesome/css/font-awesome.min.css');
     $styleEnqueuer->addStyleFramework('ff-font-awesome4', '/framework/extern/iconfonts/ff-font-awesome4/ff-font-awesome4.css');
     $styleEnqueuer->addStyleTheme('ff-miu-icon-font', '/assets/miuiconfont/miuiconfont.css');
     $styleEnqueuer->addStyleFramework('ff-font-miu', '/framework/extern/iconfonts/ff-font-miu/ff-font-miu.css');
     $iconfont_types = array('brandico' => '/framework/extern/iconfonts/ff-font-brandico/ff-font-brandico.css', 'elusive' => '/framework/extern/iconfonts/ff-font-elusive/ff-font-elusive.css', 'entypo' => '/framework/extern/iconfonts/ff-font-entypo/ff-font-entypo.css', 'fontelico' => '/framework/extern/iconfonts/ff-font-fontelico/ff-font-fontelico.css', 'iconic' => '/framework/extern/iconfonts/ff-font-iconic/ff-font-iconic.css', 'linecons' => '/framework/extern/iconfonts/ff-font-linecons/ff-font-linecons.css', 'maki' => '/framework/extern/iconfonts/ff-font-maki/ff-font-maki.css', 'meteocons' => '/framework/extern/iconfonts/ff-font-meteocons/ff-font-meteocons.css', 'mfglabs' => '/framework/extern/iconfonts/ff-font-mfglabs/ff-font-mfglabs.css', 'modernpics' => '/framework/extern/iconfonts/ff-font-modernpics/ff-font-modernpics.css', 'typicons' => '/framework/extern/iconfonts/ff-font-typicons/ff-font-typicons.css', 'simple line icons' => '/framework/extern/iconfonts/ff-font-simple-line-icons/ff-font-simple-line-icons.css', 'weathercons' => '/framework/extern/iconfonts/ff-font-weathercons/ff-font-weathercons.css', 'websymbols' => '/framework/extern/iconfonts/ff-font-websymbols/ff-font-websymbols.css', 'zocial' => '/framework/extern/iconfonts/ff-font-zocial/ff-font-zocial.css');
     $iconfontQuery = ffThemeOptions::getQuery('iconfont');
     foreach ($iconfont_types as $name => $path) {
         if ($iconfontQuery->get(str_replace(' ', '_', $name))) {
             $styleEnqueuer->addStyleFramework('icon-option-font-' . str_replace(' ', '_', $name), $path);
         }
     }
 }
<?php

$fwc = ffContainer::getInstance();
$postMeta = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas();
rewind_posts();
$postCounter = 0;
global $post;
if (have_posts()) {
    while (have_posts()) {
        the_post();
        /**********************************************************************************************************************/
        /* VARIABLE INIT
        /**********************************************************************************************************************/
        $postCounter++;
        $currentPostId = $post->ID;
        $data = $postMeta->getOption($currentPostId, 'portfolio_category_options');
        $postQuery = $fwc->getOptionsFactory()->createQuery($data, 'ffComponent_Theme_MetaboxPortfolio_CategoryView');
        //            $postQuery->debug_dump();
        /**********************************************************************************************************************/
        /* POST TITLE
        /**********************************************************************************************************************/
        $postTitle = '';
        if ($postQuery->get('general title different')) {
            $postTitle = $postQuery->get('general title title');
        } else {
            $postTitle = get_the_title();
        }
        /**********************************************************************************************************************/
        /* POST DATE
        /**********************************************************************************************************************/
        // 05 March 2015 -- d F Y