function motopressCERenderShortcode() { require_once dirname(__FILE__) . '/../verifyNonce.php'; require_once dirname(__FILE__) . '/../settings.php'; require_once dirname(__FILE__) . '/../access.php'; require_once dirname(__FILE__) . '/../functions.php'; require_once dirname(__FILE__) . '/../getLanguageDict.php'; require_once dirname(__FILE__) . '/Shortcode.php'; global $motopressCELang; $errorMessage = strtr($motopressCELang->CERenderError, array('%name%' => $motopressCELang->CEShortcode)); if (isset($_POST['closeType']) && !empty($_POST['closeType']) && isset($_POST['shortcode']) && !empty($_POST['shortcode'])) { global $motopressCESettings; $errors = array(); $closeType = $_POST['closeType']; $shortcode = $_POST['shortcode']; $parameters = null; if (isset($_POST['parameters']) && !empty($_POST['parameters'])) { $parameters = json_decode(stripslashes($_POST['parameters'])); if (!$parameters) { $errors[] = $errorMessage; } } $styles = null; if (isset($_POST['styles']) && !empty($_POST['styles'])) { $styles = json_decode(stripslashes($_POST['styles'])); if (!$styles) { $errors[] = $errorMessage; } } if (empty($errors)) { global $motopressCELibrary; $motopressCELibrary = new MPCELibrary(); do_action_ref_array('mp_library', array(&$motopressCELibrary)); do_action('motopress_render_shortcode', $shortcode); //for motopress-cherryframework plugin $s = new MPCEShortcode(); $content = null; if (isset($_POST['content']) && !empty($_POST['content'])) { $content = stripslashes($_POST['content']); if (isset($_POST['wrapRender']) && $_POST['wrapRender'] === 'true') { $content = motopressCECleanupShortcode($content); $content = motopressCEParseObjectsRecursive($content); } } $str = $s->toShortcode($closeType, $shortcode, $parameters, $styles, $content); echo apply_filters('the_content', '<div class="motopress-ce-shortcode-wrapper">' . $str . '</div>'); // echo do_shortcode($str); } if (!empty($errors)) { if ($motopressCESettings['debug']) { print_r($errors); } else { motopressCESetError($errorMessage); } } } else { motopressCESetError($errorMessage); } exit; }
function motopressCERenderShortcode() { require_once dirname(__FILE__) . '/../verifyNonce.php'; require_once dirname(__FILE__) . '/../settings.php'; require_once dirname(__FILE__) . '/../access.php'; require_once dirname(__FILE__) . '/../functions.php'; require_once dirname(__FILE__) . '/../getLanguageDict.php'; require_once dirname(__FILE__) . '/Shortcode.php'; $motopressCELang = motopressCEGetLanguageDict(); if (isset($_POST['closeType']) && !empty($_POST['closeType']) && isset($_POST['shortcode']) && !empty($_POST['shortcode'])) { global $motopressCESettings; $errors = array(); $closeType = $_POST['closeType']; $shortcode = $_POST['shortcode']; $parameters = null; if (isset($_POST['parameters']) && !empty($_POST['parameters'])) { $parameters = json_decode(stripslashes($_POST['parameters'])); if (!$parameters) { $errors[] = $motopressCELang->CERenderShortcodeError; } } $styles = null; if (isset($_POST['styles']) && !empty($_POST['styles'])) { $styles = json_decode(stripslashes($_POST['styles'])); if (!$styles) { $errors[] = $motopressCELang->CERenderShortcodeError; } } if (empty($errors)) { do_action('motopress_render_shortcode', $shortcode); $s = new MPCEShortcode(); $content = null; if (isset($_POST['content']) && !empty($_POST['content'])) { $content = stripslashes($_POST['content']); if (isset($_POST['wrapRender']) && $_POST['wrapRender'] === 'true') { $content = motopressCECleanupShortcode($content); global $motopressCELibrary; $motopressCELibrary = new MPCELibrary(); $content = motopressCEParseObjectsRecursive($content); } } $str = $s->toShortcode($closeType, $shortcode, $parameters, $styles, $content); echo do_shortcode($str); } if (!empty($errors)) { if ($motopressCESettings['debug']) { print_r($errors); } else { motopressCESetError($motopressCELang->CERenderShortcodeError); } } } else { motopressCESetError($motopressCELang->CERenderShortcodeError); } exit; }
public static function setCurPostData($wp, $id = null) { // var_dump(get_the_ID()); // global $post; // var_dump($post->ID); // global $wp_query; // var_dump($wp_query->post->ID); $postId = isset($id) && !empty($id) ? (int) $id : get_the_ID(); self::$curPostSaveInVer = get_post_meta($postId, 'motopress-ce-save-in-version', true); self::$isNeedFix = version_compare(self::$curPostSaveInVer, '1.5', '<'); }
function motopressCEParseObjectsRecursive($matches, $parseContent = true) { global $motopressCELibrary; $regex = '/' . motopressCEGetMPShortcodeRegex() . '/s'; if (is_array($matches)) { if (!empty($matches[5])) { $matches[5] = preg_replace('/^<\\/p>(.*)/', '${1}', $matches[5]); $matches[5] = preg_replace('/(.*)<p>$/', '${1}', $matches[5]); } $grid = $motopressCELibrary->getGridObjects(); $groupObjects = $motopressCELibrary->getGroupObjects(); $parameters_str = ' ' . MPCEShortcode::$attributes['parameters']; $unwrap = ''; $atts = shortcode_parse_atts($matches[3]); $atts = (array) $atts; $list = $motopressCELibrary->getObjectsList(); $parameters = $list[$matches[2]]['parameters']; $group = $list[$matches[2]]['group']; //set parameters of shortcode if (!empty($parameters)) { foreach ($parameters as $name => $param) { if (array_key_exists($name, $atts)) { //$value = $atts[$name]; //$parameters[$name]['value'] = str_replace(array('\'', '"'), array(''', '"'), $value); $value = preg_replace('#^<\\/p>|^<br \\/>|<p>$#', '', $atts[$name]); $parameters[$name]['value'] = htmlentities($value, ENT_QUOTES, 'UTF-8'); } else { $parameters[$name] = new stdClass(); } } $jsonParameters = version_compare(PHP_VERSION, '5.4.0', '>=') ? json_encode($parameters, JSON_UNESCAPED_UNICODE) : motopressCEJsonEncode($parameters); $parameters_str = " " . MPCEShortcode::$attributes['parameters'] . "='" . $jsonParameters . "'"; } //set styles $styles = array(); if (!empty(MPCEShortcode::$styles)) { foreach (MPCEShortcode::$styles as $name => $value) { if (array_key_exists($name, $atts)) { //$value = $atts[$name]; //$styles[$name]['value'] = str_replace(array('\'', '"'), array(''', '"'), $value); $value = preg_replace('#^<\\/p>|^<br \\/>|<p>$#', '', $atts[$name]); $styles[$name]['value'] = htmlentities($value, ENT_QUOTES, 'UTF-8'); } else { $styles[$name] = new stdClass(); } } if (!is_array($styles['mp_style_classes'])) { if (array_key_exists($matches[2], $motopressCELibrary->deprecatedParameters)) { foreach ($motopressCELibrary->deprecatedParameters[$matches[2]] as $key => $val) { if (array_key_exists($key, $atts)) { if (!is_array($styles['mp_style_classes'])) { $styles['mp_style_classes'] = array(); $styles['mp_style_classes']['value'] = ''; } if ($matches[2] === MPCEShortcode::PREFIX . 'button') { if ($key === 'color' && $atts[$key] === 'default') { $className = $val['prefix'] . 'silver'; } elseif ($key === 'size') { $className = $atts[$key] === 'default' ? $val['prefix'] . 'middle' : $val['prefix'] . $atts[$key]; $className .= ' motopress-btn-rounded'; } else { $className = $val['prefix'] . $atts[$key]; } } else { $className = $val['prefix'] . $atts[$key]; } $styles['mp_style_classes']['value'] .= $styles['mp_style_classes']['value'] === '' ? $className : ' ' . $className; } } } } $jsonStyles = version_compare(PHP_VERSION, '5.4.0', '>=') ? json_encode($styles, JSON_UNESCAPED_UNICODE) : motopressCEJsonEncode($styles); $styles_str = " " . MPCEShortcode::$attributes['styles'] . "='" . $jsonStyles . "'"; } // set close-type of shortcode if (preg_match('/\\[\\/' . $matches[2] . '\\](?:<br \\/>)?(?:<\\/p>)?$/', $matches[0]) === 1) { $endstr = '[/' . $matches[2] . ']'; $closeType = MPCEObject::ENCLOSED; } else { $endstr = ''; $closeType = MPCEObject::SELF_CLOSED; } //wrap custom code $cleanRegex = motopressCEGetMPShortcodeRegex(); $wrapCustomCodeRegex = '/\\A(?:' . $cleanRegex . ')+\\Z/s'; if (isset($grid['span']['type']) && $grid['span']['type'] === 'multiple') { $spanShortcodes = array_merge($grid['span']['shortcode'], $grid['span']['inner']); } else { $spanShortcodes = array($grid['span']['shortcode'], $grid['span']['inner']); } if ($matches[5] !== '' && $matches[5] !== ' ' && in_array($matches[2], $spanShortcodes) && !preg_match($wrapCustomCodeRegex, $matches[5])) { $matches[5] = motopressCEWrapCustomCode($matches[5]); } // set system marking for "must-unwrap" code if ($matches[2] == 'mp_code') { if (!empty($matches[3])) { $atts = shortcode_parse_atts($matches[3]); if (isset($atts['unwrap']) && $atts['unwrap'] === 'true') { $unwrap = ' ' . MPCEShortcode::$attributes['unwrap'] . ' = "true"'; } } } // Members Widget fix if ($matches[2] == 'mp_members_content') { if (!empty($matches[3])) { $attrs = shortcode_parse_atts($matches[3]); if (isset($attrs['members_content'])) { $matches[5] = $attrs['members_content']; unset($attrs['members_content']); $matches[3] = ''; foreach ($attrs as $name => $value) { $matches[3] .= ' ' . $name . '="' . $value . '"'; } } } } $dataContent = ''; //setting data-motopress-content for all objects except layout if (isset($grid['span']['type']) && $grid['span']['type'] === 'multiple') { $gridShortcodes = array_merge(array($grid['row']['shortcode'], $grid['row']['inner']), $grid['span']['shortcode'], $grid['span']['inner']); } else { $gridShortcodes = array($grid['row']['shortcode'], $grid['row']['inner'], $grid['span']['shortcode'], $grid['span']['inner']); } if (!in_array($matches[2], $gridShortcodes)) { $dataContent = motopressCEScreeningDataAttrShortcodes($matches[5]); } if (in_array($matches[2], $gridShortcodes) || in_array($matches[2], $groupObjects)) { return '<div ' . MPCEShortcode::$attributes['closeType'] . '="' . $closeType . '" ' . MPCEShortcode::$attributes['shortcode'] . '="' . $matches[2] . '" ' . MPCEShortcode::$attributes['group'] . '="' . $group . '"' . $parameters_str . $styles_str . ' ' . MPCEShortcode::$attributes['content'] . '="' . htmlentities($dataContent, ENT_QUOTES, 'UTF-8') . '" ' . $unwrap . '>[' . $matches[2] . $matches[3] . ']' . preg_replace_callback($regex, 'motopressCEParseObjectsRecursive', $matches[5]) . $endstr . '</div>'; } else { $matches[5] = MPCEShortcode::unautopMotopressShortcodes($matches[5]); return '<div ' . MPCEShortcode::$attributes['closeType'] . '="' . $closeType . '" ' . MPCEShortcode::$attributes['shortcode'] . '="' . $matches[2] . '" ' . MPCEShortcode::$attributes['group'] . '="' . $group . '"' . $parameters_str . $styles_str . ' ' . MPCEShortcode::$attributes['content'] . '="' . htmlentities($dataContent, ENT_QUOTES, 'UTF-8') . '" ' . $unwrap . '>[' . $matches[2] . $matches[3] . ']' . $matches[5] . $endstr . '</div>'; } } return preg_replace_callback($regex, 'motopressCEParseObjectsRecursive', $matches); }
/** * @global stdClass $motopressCELang */ public function __construct() { global $motopressCELang, $motopressCESettings; self::$isAjaxRequest = $this->isAjaxRequest(); /* $this->globalPredefinedClasses = array( 'hidden' => array( 'label' => $motopressCELang->CEHidden, 'values' => array( 'phone' => array( 'class' => 'mp-hidden-phone', 'label' => $motopressCELang->CEHiddenPhone ), 'tablet' => array( 'class' => 'mp-hidden-tablet', 'label' => $motopressCELang->CEHiddenTablet ), 'desktop' => array( 'class' => 'mp-hidden-desktop', 'label' => $motopressCELang->CEHiddenDesktop ) ) ), 'align' => array( 'label' => 'Align', 'values' => array( 'left' => array( 'class' => 'motopress-text-align-left', 'label' => 'Left' ), 'center' => array( 'class' => 'motopress-text-align-center', 'label' => 'Center' ), 'right' => array( 'class' => 'motopress-text-align-right', 'label' => 'Right' ) ) ) ); */ $padding = array('label' => 'Padding', 'values' => array('padding-5' => array('class' => 'motopress-padding-5', 'label' => 'Padding 5'), 'padding-10' => array('class' => 'motopress-padding-10', 'label' => 'Padding 10'), 'padding-15' => array('class' => 'motopress-padding-15', 'label' => 'Padding 15'), 'padding-25' => array('class' => 'motopress-padding-25', 'label' => 'Padding 25', 'disabled' => true), 'padding-50' => array('class' => 'motopress-padding-50', 'label' => 'Padding 50', 'disabled' => true), 'padding-100' => array('class' => 'motopress-padding-100', 'label' => 'Padding 100', 'disabled' => true), 'vertical-padding-100' => array('class' => 'motopress-vetical-padding-100', 'label' => 'Vertical Padding 100', 'disabled' => true), 'vertical-padding-150' => array('class' => 'motopress-vetical-padding-150', 'label' => 'Vertical Padding 150', 'disabled' => true), 'vertical-padding-200' => array('class' => 'motopress-vetical-padding-200', 'label' => 'Vertical Padding 200', 'disabled' => true))); $backgroundColor = array('label' => 'Background Color', 'values' => array('blue' => array('class' => 'motopress-bg-color-blue', 'label' => 'Blue', 'disabled' => true), 'dark' => array('class' => 'motopress-bg-color-dark', 'label' => 'Dark', 'disabled' => true), 'gray' => array('class' => 'motopress-bg-color-gray', 'label' => 'Gray', 'disabled' => true), 'green' => array('class' => 'motopress-bg-color-green', 'label' => 'Green', 'disabled' => true), 'red' => array('class' => 'motopress-bg-color-red', 'label' => 'Red', 'disabled' => true), 'silver' => array('class' => 'motopress-bg-color-silver', 'label' => 'Silver'), 'white' => array('class' => 'motopress-bg-color-white', 'label' => 'White'), 'yellow' => array('class' => 'motopress-bg-color-yellow', 'label' => 'Yellow', 'disabled' => true))); $style = array('label' => 'Style', 'allowMultiple' => true, 'values' => array('bg-alpha-75' => array('class' => 'motopress-bg-alpha-75', 'label' => 'Transparent'), 'border' => array('class' => 'motopress-border', 'label' => 'Border'), 'border-radius' => array('class' => 'motopress-border-radius', 'label' => 'Rounded'), 'shadow' => array('class' => 'motopress-shadow', 'label' => 'Shadow'), 'shadow-bottom' => array('class' => 'motopress-shadow-bottom', 'label' => 'Bottom Shadow', 'disabled' => true), 'text-shadow' => array('class' => 'motopress-text-shadow', 'label' => 'Text Shadow'))); $border = array('label' => 'Border Side', 'allowMultiple' => true, 'values' => array('border-top' => array('class' => 'motopress-border-top', 'label' => 'Border Top', 'disabled' => true), 'border-right' => array('class' => 'motopress-border-right', 'label' => 'Border Right'), 'border-bottom' => array('class' => 'motopress-border-bottom', 'label' => 'Border Bottom'), 'border-left' => array('class' => 'motopress-border-left', 'label' => 'Border Left', 'disabled' => true))); $textColor = array('label' => 'Text Color', 'values' => array('color-light' => array('class' => 'motopress-color-light', 'label' => 'Light Text'), 'color-dark' => array('class' => 'motopress-color-dark', 'label' => 'Dark Text'))); $rowPredefinedStyles = array('fullwidth' => array('class' => 'mp-row-fullwidth', 'label' => 'Full Width'), 'padding' => $padding, 'background-color' => $backgroundColor, 'style' => $style, 'border' => $border, 'color' => $textColor); $spanPredefinedStyles = array('padding' => $padding, 'background-color' => $backgroundColor, 'style' => $style, 'border' => $border, 'color' => $textColor); $spacePredefinedStyles = array('type' => array('label' => 'Type', 'values' => array('light' => array('class' => 'motopress-space-light', 'label' => 'Light'), 'normal' => array('class' => 'motopress-space-normal', 'label' => 'Normal'), 'dotted' => array('class' => 'motopress-space-dotted', 'label' => 'Dotted'), 'dashed' => array('class' => 'motopress-space-dashed', 'label' => 'Dashed'), 'double' => array('class' => 'motopress-space-double', 'label' => 'Double'), 'groove' => array('class' => 'motopress-space-groove', 'label' => 'Grouve'), 'ridge' => array('class' => 'motopress-space-ridge', 'label' => 'Ridge'), 'heavy' => array('class' => 'motopress-space-heavy', 'label' => 'Heavy')))); /* Objects */ //grid $rowParameters = array('bg_media_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CERowObjTypeBGLabel, 'description' => $motopressCELang->CERowObjTypeBGDesc, 'list' => array('disabled' => $motopressCELang->CERowObjTypeBGDisabled, 'video' => $motopressCELang->CERowObjTypeBGMP4, 'youtube' => $motopressCELang->CERowObjTypeBGYoutube, 'parallax' => $motopressCELang->CERowObjTypeBGParallax)), 'bg_video_youtube' => array('type' => 'video', 'label' => $motopressCELang->CERowObjBGYoutubeLabel, 'description' => $motopressCELang->CERowObjBGYoutubeDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_cover' => array('type' => 'image', 'label' => $motopressCELang->CERowObjBGVideoCoverImageLabel, 'description' => $motopressCELang->CERowObjBGVideoCoverImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_repeat' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoRepeatLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_mute' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoMuteLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_webm' => array('type' => 'media-video', 'legend' => $motopressCELang->CERowObjBGVideoWEBMLegend, 'label' => strtr($motopressCELang->CERowObjBGVideoFormatLabel, array('%name%' => 'WEBM')), 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_mp4' => array('type' => 'media-video', 'label' => strtr($motopressCELang->CERowObjBGVideoFormatLabel, array('%name%' => 'MP4')), 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_ogg' => array('type' => 'media-video', 'label' => strtr($motopressCELang->CERowObjBGVideoFormatLabel, array('%name%' => 'OGV')), 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_cover' => array('type' => 'image', 'label' => $motopressCELang->CERowObjBGVideoCoverImageLabel, 'description' => $motopressCELang->CERowObjBGVideoCoverImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_repeat' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoRepeatLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_mute' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoMuteLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'parallax_image' => array('type' => 'image', 'label' => $motopressCELang->CERowObjParallaxImageLabel, 'description' => $motopressCELang->CERowObjParallaxImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'parallax'), 'disabled' => 'true')); $rowObj = new MPCEObject(MPCEShortcode::PREFIX . 'row', $motopressCELang->CERowObjName, null, $rowParameters, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $rowObj->addStyle(array('mp_style_classes' => array('predefined' => $rowPredefinedStyles, 'additional_description' => $motopressCELang->CERowStyleClassesLabelAddtlDesc))); $rowInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'row_inner', $motopressCELang->CERowInnerObjName, null, $rowParameters, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $rowInnerObj->addStyle(array('mp_style_classes' => array('predefined' => $rowPredefinedStyles, 'additional_description' => $motopressCELang->CERowStyleClassesLabelAddtlDesc))); $spanObj = new MPCEObject(MPCEShortcode::PREFIX . 'span', $motopressCELang->CESpanObjName, null, null, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $spanObj->addStyle(array('mp_style_classes' => array('predefined' => $spanPredefinedStyles))); $this->setGrid(array('row' => array('shortcode' => 'mp_row', 'inner' => 'mp_row_inner', 'class' => 'mp-row-fluid', 'edgeclass' => 'mp-row-fluid', 'col' => '12'), 'span' => array('type' => 'single', 'shortcode' => 'mp_span', 'inner' => 'mp_span_inner', 'class' => 'mp-span', 'attr' => 'col', 'custom_class_attr' => 'classes'))); $spanInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'span_inner', $motopressCELang->CESpanInnerObjName, null, null, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $spanInnerObj->addStyle(array('mp_style_classes' => array('predefined' => $spanPredefinedStyles))); //text $textObj = new MPCEObject(MPCEShortcode::PREFIX . 'text', $motopressCELang->CETextObjName, 'text.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CETextObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CETextObjName)), 20, MPCEObject::ENCLOSED); $textPredefinedStyles = array(); $this->extendPredefinedWithGoogleFonts($textPredefinedStyles); $textObj->addStyle(array('mp_style_classes' => array('predefined' => $textPredefinedStyles, 'additional_description' => strtr($motopressCELang->CEGoogleFontsStyleClassesLabelAddtlDesc, array('%BrandName%' => $motopressCESettings['brand_name']))))); $headingObj = new MPCEObject(MPCEShortcode::PREFIX . 'heading', $motopressCELang->CEHeadingObjName, 'heading.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CEHeadingObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CEHeadingObjName)), 10, MPCEObject::ENCLOSED); $headingPredefinedStyles = array(); $this->extendPredefinedWithGoogleFonts($headingPredefinedStyles); $headingObj->addStyle(array('mp_style_classes' => array('predefined' => $headingPredefinedStyles, 'additional_description' => strtr($motopressCELang->CEGoogleFontsStyleClassesLabelAddtlDesc, array('%BrandName%' => $motopressCESettings['brand_name']))))); $codeObj = new MPCEObject(MPCEShortcode::PREFIX . 'code', $motopressCELang->CECodeObjName, 'wordpress.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CECodeObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CECodeObjName)), 30, MPCEObject::ENCLOSED); $codePredefinedStyles = array(); $this->extendPredefinedWithGoogleFonts($codePredefinedStyles); $codeObj->addStyle(array('mp_style_classes' => array('predefined' => $codePredefinedStyles, 'additional_description' => strtr($motopressCELang->CEGoogleFontsStyleClassesLabelAddtlDesc, array('%BrandName%' => $motopressCESettings['brand_name']))))); //image $imageObj = new MPCEObject(MPCEShortcode::PREFIX . 'image', $motopressCELang->CEImageObjName, 'image.png', array('id' => array('type' => 'image', 'label' => $motopressCELang->CEImageObjSrcLabel, 'default' => '', 'description' => $motopressCELang->CEImageObjSrcDesc, 'autoOpen' => 'true'), 'size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjImageSizeLabel, 'default' => 'full', 'disabled' => 'true', 'list' => array('full' => $motopressCELang->CEFull, 'large' => $motopressCELang->CELarge, 'medium' => $motopressCELang->CEMedium, 'thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom)), 'custom_size' => array('type' => 'text', 'description' => $motopressCELang->CEImageCustomSizeLabel, 'dependency' => array('parameter' => 'size', 'value' => 'custom')), 'link_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageLinkLabel, 'default' => 'custom_url', 'disabled' => 'true', 'list' => array('custom_url' => $motopressCELang->CECustomURL, 'media_file' => $motopressCELang->CEMediaFile, 'lightbox' => $motopressCELang->CELightbox)), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEImageLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEImageObjLinkDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'link_type', 'value' => 'custom_url')), 'rel' => array('type' => 'text', 'label' => $motopressCELang->CEImageRelLabel, 'default' => '', 'dependency' => array('parameter' => 'link_type', 'value' => 'media_file')), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEOpenLinkInNewWindow, 'default' => 'false', 'disabled' => 'true'), 'caption' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGalleryGridObjCaptionLabel, 'default' => 'false', 'disabled' => 'true'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 10); $imageObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-image-obj-basic', 'label' => 'Image'), 'selector' => '> img'))); $gridGalleryObj = new MPCEObject(MPCEShortcode::PREFIX . 'grid_gallery', $motopressCELang->CEGridGalleryObjName, 'grid-gallery.png', array('ids' => array('type' => 'multi-images', 'default' => '', 'description' => $motopressCELang->CEMediaLibraryImagesIdsDesc, 'text' => $motopressCELang->CEImageSliderObjIdsText, 'autoOpen' => 'true'), 'columns' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEColumnsCount, 'default' => 3, 'list' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6), 'disabled' => 'true'), 'size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjImageSizeLabel, 'default' => 'thumbnail', 'list' => array('full' => $motopressCELang->CEFull, 'large' => $motopressCELang->CELarge, 'medium' => $motopressCELang->CEMedium, 'thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom)), 'custom_size' => array('type' => 'text', 'description' => $motopressCELang->CEImageCustomSizeLabel, 'dependency' => array('parameter' => 'size', 'value' => 'custom')), 'link_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageLinkLabel, 'default' => 'none', 'list' => array('none' => $motopressCELang->CENone, 'media_file' => $motopressCELang->CEMediaFile, 'attachment' => $motopressCELang->CEAttachmentPage, 'lightbox' => $motopressCELang->CELightbox), 'disabled' => 'true'), 'rel' => array('type' => 'text', 'label' => $motopressCELang->CEImageRelLabel, 'default' => '', 'dependency' => array('parameter' => 'link_type', 'value' => 'media_file')), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEOpenLinkInNewWindow, 'default' => 'false'), 'caption' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGalleryGridObjCaptionLabel, 'default' => 'false')), 30); $gridGalleryObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-grid-gallery-obj-basic', 'label' => 'Grid Gallery')))); $imageSlider = new MPCEObject(MPCEShortcode::PREFIX . 'image_slider', $motopressCELang->CEImageSliderObjName, 'image-slider.png', array('ids' => array('type' => 'multi-images', 'label' => $motopressCELang->CEImageSliderObjIdsLabel, 'default' => '', 'description' => $motopressCELang->CEMediaLibraryImagesIdsDesc, 'text' => $motopressCELang->CEImageSliderObjIdsText, 'autoOpen' => 'true'), 'size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjImageSizeLabel, 'default' => 'full', 'list' => array('full' => $motopressCELang->CEFull, 'large' => $motopressCELang->CELarge, 'medium' => $motopressCELang->CEMedium, 'thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom)), 'custom_size' => array('type' => 'text', 'description' => $motopressCELang->CEImageCustomSizeLabel, 'dependency' => array('parameter' => 'size', 'value' => 'custom')), 'animation' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageSliderObjAnimationLabel, 'default' => 'fade', 'description' => $motopressCELang->CEImageSliderObjAnimationDesc, 'list' => array('fade' => $motopressCELang->CEImageSliderObjAnimationFade, 'slide' => $motopressCELang->CEImageSliderObjAnimationSlide), 'disabled' => 'true'), 'smooth_height' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjSmoothHeightLabel, 'default' => 'false', 'description' => $motopressCELang->CEImageSliderObjSmoothHeightDesc, 'dependency' => array('parameter' => 'animation', 'value' => 'slide'), 'disabled' => 'true'), 'slideshow' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjAutoplayLabel, 'default' => 'true', 'description' => $motopressCELang->CEImageSliderObjAutoplayDesc, 'disabled' => 'true'), 'slideshow_speed' => array('type' => 'slider', 'label' => $motopressCELang->CEImageSliderObjSlideshowSpeedLabel, 'default' => 7, 'min' => 1, 'max' => 20, 'dependency' => array('parameter' => 'slideshow', 'value' => 'true'), 'disabled' => 'true'), 'animation_speed' => array('type' => 'slider', 'label' => $motopressCELang->CEImageSliderObjAnimationSpeedLabel, 'default' => 600, 'min' => 200, 'max' => 10000, 'step' => 200, 'disabled' => 'true'), 'control_nav' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjControlNavLabel, 'default' => 'true', 'disabled' => 'true')), 20); $imageSlider->addStyle(array('mp_style_classes' => array('selector' => '> ul:first-of-type'))); //button $buttonObj = new MPCEObject(MPCEShortcode::PREFIX . 'button', $motopressCELang->CEButtonObjName, 'button.png', array('text' => array('type' => 'text', 'label' => $motopressCELang->CEButtonObjTextLabel, 'default' => $motopressCELang->CEButtonObjName), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEButtonObjLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEButtonObjLinkDesc), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEOpenLinkInNewWindow, 'default' => 'false', 'disabled' => 'true'), 'full_width' => array('type' => 'checkbox', 'label' => $motopressCELang->CEFullWidthButton, 'default' => 'false', 'disabled' => 'false'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight), 'dependency' => array('parameter' => 'full_width', 'value' => 'false')), 'icon' => array('type' => 'icon-picker', 'label' => $motopressCELang->CEServiceBoxObjFontIconLabel, 'default' => 'none', 'list' => $this->getIconClassList(true), 'disabled' => 'true'), 'icon_position' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'right' => $motopressCELang->CERight), 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true')), 10); $buttonObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-btn', 'label' => $motopressCELang->CEButtonObjBasicClassLabel), 'predefined' => array('color' => array('label' => $motopressCELang->CEButtonObjColorLabel, 'values' => array('silver' => array('class' => 'motopress-btn-color-silver', 'label' => $motopressCELang->CESilver), 'red' => array('class' => 'motopress-btn-color-red', 'label' => $motopressCELang->CERed), 'pink-dreams' => array('class' => 'motopress-btn-color-pink-dreams', 'label' => $motopressCELang->CEPinkDreams), 'warm' => array('class' => 'motopress-btn-color-warm', 'label' => $motopressCELang->CEWarm), 'hot-summer' => array('class' => 'motopress-btn-color-hot-summer', 'label' => $motopressCELang->CEHotSummer), 'olive-garden' => array('class' => 'motopress-btn-color-olive-garden', 'label' => $motopressCELang->CEOliveGarden), 'green-grass' => array('class' => 'motopress-btn-color-green-grass', 'label' => $motopressCELang->CEGreenGrass), 'skyline' => array('class' => 'motopress-btn-color-skyline', 'label' => $motopressCELang->CESkyline), 'aqua-blue' => array('class' => 'motopress-btn-color-aqua-blue', 'label' => $motopressCELang->CEAquaBlue), 'violet' => array('class' => 'motopress-btn-color-violet', 'label' => $motopressCELang->CEViolet), 'dark-grey' => array('class' => 'motopress-btn-color-dark-grey', 'label' => $motopressCELang->CEDarkGrey), 'black' => array('class' => 'motopress-btn-color-black', 'label' => $motopressCELang->CEBlack))), 'size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('mini' => array('class' => 'motopress-btn-size-mini', 'label' => $motopressCELang->CEMini), 'small' => array('class' => 'motopress-btn-size-small', 'label' => $motopressCELang->CESmall), 'middle' => array('class' => 'motopress-btn-size-middle', 'label' => $motopressCELang->CEMiddle), 'large' => array('class' => 'motopress-btn-size-large', 'label' => $motopressCELang->CELarge))), 'icon indent' => array('label' => $motopressCELang->CEIconIndent, 'values' => array('mini' => array('class' => 'motopress-btn-icon-indent-mini', 'label' => $motopressCELang->CEMini . ' ' . $motopressCELang->CEIconIndent, 'disabled' => true), 'small' => array('class' => 'motopress-btn-icon-indent-small', 'label' => $motopressCELang->CESmall . ' ' . $motopressCELang->CEIconIndent, 'disabled' => true), 'middle' => array('class' => 'motopress-btn-icon-indent-middle', 'label' => $motopressCELang->CEMiddle . ' ' . $motopressCELang->CEIconIndent, 'disabled' => true), 'large' => array('class' => 'motopress-btn-icon-indent-large', 'label' => $motopressCELang->CELarge . ' ' . $motopressCELang->CEIconIndent, 'disabled' => true))), 'rounded' => array('class' => 'motopress-btn-rounded', 'label' => $motopressCELang->CERounded)), 'default' => array('motopress-btn-color-silver', 'motopress-btn-size-middle', 'motopress-btn-rounded', 'motopress-btn-icon-indent-small'), 'selector' => '> a'))); $accordionObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion', $motopressCELang->CEAccordionObjName, 'accordion.png', array('elements' => array('type' => 'group', 'contains' => MPCEShortcode::PREFIX . 'accordion_item', 'items' => array('label' => array('default' => $motopressCELang->CEAccordionItemObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CEAccordionObjName)), 'disabled' => 'true', 'activeParameter' => 'active', 'rules' => array('rootSelector' => '.motopress-accordion-item', 'activeSelector' => '> h3', 'activeClass' => 'ui-state-active'), 'events' => array('onActive' => array('selector' => '> h3', 'event' => 'click'), 'onInactive' => array('selector' => '> h3', 'event' => 'click')))), 11, MPCEObject::ENCLOSED); $accordionObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-accordion', 'label' => $motopressCELang->CEAccordionObjBasicClassLabel), 'predefined' => array('style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('light' => array('class' => 'motopress-accordion-light', 'label' => $motopressCELang->CEAccordionObjStyleListLight), 'dark' => array('class' => 'motopress-accordion-dark', 'label' => $motopressCELang->CEAccordionObjStyleListDark, 'disabled' => true)))), 'default' => array('motopress-accordion-light')))); $accordionItemObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion_item', $motopressCELang->CEAccordionItemObjName, null, array('title' => array('type' => 'text', 'label' => $motopressCELang->CEAccordionItemObjTitleLabel, 'default' => $motopressCELang->CEAccordionItemObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CEAccordionItemObjContentLabel, 'default' => $motopressCELang->CEContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CEActive, 'default' => 'false', 'description' => strtr($motopressCELang->CEActiveDesc, array('%name%' => $motopressCELang->CEAccordionItemObjName)))), null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE, false); $tabsObj = new MPCEObject(MPCEShortcode::PREFIX . 'tabs', $motopressCELang->CETabsObjName, 'tabs.png', array('elements' => array('type' => 'group', 'contains' => MPCEShortcode::PREFIX . 'tab', 'items' => array('label' => array('default' => $motopressCELang->CETabObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CETabObjName)), 'disabled' => 'true', 'activeParameter' => 'active', 'rules' => array('rootSelector' => '.ui-tabs-nav > li', 'activeSelector' => '', 'activeClass' => 'ui-state-active'), 'events' => array('onActive' => array('selector' => '> a', 'event' => 'click'))), 'padding' => array('type' => 'slider', 'label' => $motopressCELang->CETabsObjPaddingLabel, 'default' => 20, 'min' => 0, 'max' => 50, 'step' => 10), 'vertical' => array('type' => 'checkbox', 'label' => $motopressCELang->CETabsVertical, 'default' => 'false', 'disabled' => 'false', 'dependency' => array('parameter' => 'full_width', 'value' => 'false')), 'rotate' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CETabsRotate, 'default' => 'disable', 'list' => array('disable' => $motopressCELang->CEDisable, '3000' => '3', '5000' => '5', '10000' => '10', '15000' => '15'), 'disabled' => 'true')), 20, MPCEObject::ENCLOSED); $tabsObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-tabs-basic', 'label' => $motopressCELang->CETabsObjBasicClassLabel), 'predefined' => array('style' => array('label' => $motopressCELang->CETabsObjStyleFullWidth, 'values' => array('full-width' => array('class' => 'motopress-tabs-fullwidth', 'label' => $motopressCELang->CETabObjStyleFullWidth)))), 'selector' => ''))); $tabObj = new MPCEObject(MPCEShortcode::PREFIX . 'tab', $motopressCELang->CETabObjName, null, array('id' => array('type' => 'text-hidden'), 'title' => array('type' => 'text', 'label' => $motopressCELang->CETabObjTitleLabel, 'default' => $motopressCELang->CETabObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CETabObjContentLabel, 'default' => $motopressCELang->CEContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'icon' => array('type' => 'icon-picker', 'label' => $motopressCELang->CEServiceBoxObjFontIconLabel, 'default' => 'none', 'list' => $this->getIconClassList(true), 'disabled' => 'true'), 'icon_size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjIconSizeLabel, 'default' => 'normal', 'list' => array('normal' => $motopressCELang->CENormal, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'icon_custom_size' => array('type' => 'spinner', 'label' => $motopressCELang->CEServiceBoxObjIconCustomSizeLabel, 'description' => $motopressCELang->CEServiceBoxObjIconCustomSizeDesc, 'min' => 1, 'step' => 1, 'max' => 500, 'default' => 26, 'dependency' => array('parameter' => 'icon_size', 'value' => 'custom'), 'disabled' => 'true'), 'icon_color' => array('type' => 'color-select', 'label' => $motopressCELang->CEServiceBoxObjIconColorLabel, 'default' => 'mp-text-color-black', 'list' => array('mp-text-color-black' => $motopressCELang->CEBlack, 'mp-text-color-red' => $motopressCELang->CERed, 'mp-text-color-pink-dreams' => $motopressCELang->CEPinkDreams, 'mp-text-color-warm' => $motopressCELang->CEWarm, 'mp-text-color-hot-summer' => $motopressCELang->CEHotSummer, 'mp-text-color-olive-garden' => $motopressCELang->CEOliveGarden, 'mp-text-color-green-grass' => $motopressCELang->CEGreenGrass, 'mp-text-color-skyline' => $motopressCELang->CESkyline, 'mp-text-color-aqua-blue' => $motopressCELang->CEAquaBlue, 'mp-text-color-violet' => $motopressCELang->CEViolet, 'mp-text-color-dark-grey' => $motopressCELang->CEDarkGrey, 'mp-text-color-default' => $motopressCELang->CESilver, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'icon_custom_color' => array('type' => 'color-picker', 'label' => $motopressCELang->CEServiceBoxObjIconCustomColorLabel, 'default' => '#000000', 'dependency' => array('parameter' => 'icon_color', 'value' => 'custom'), 'disabled' => 'true'), 'icon_margin_left' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginLeftLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '5', 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'icon_margin_right' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginRightLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '5', 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'icon_margin_top' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginTopLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0', 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'icon_margin_bottom' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginBottomLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0', 'dependency' => array('parameter' => 'icon', 'except' => 'none'), 'disabled' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CEActive, 'default' => 'false', 'description' => strtr($motopressCELang->CEActiveDesc, array('%name%' => $motopressCELang->CETabObjName)))), null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE, false); $socialsObj = new MPCEObject(MPCEShortcode::PREFIX . 'social_buttons', $motopressCELang->CESocialsObjName, 'social-buttons.png', array('align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'motopress-text-align-left', 'list' => array('motopress-text-align-left' => $motopressCELang->CELeft, 'motopress-text-align-center' => $motopressCELang->CECenter, 'motopress-text-align-right' => $motopressCELang->CERight))), 20, MPCEObject::ENCLOSED); $socialsObj->addStyle(array('mp_style_classes' => array('predefined' => array('size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('normal' => array('class' => 'motopress-buttons-32x32', 'label' => $motopressCELang->CESocialsObjSizeNormal), 'large' => array('class' => 'motopress-buttons-64x64', 'label' => $motopressCELang->CESocialsObjSizeLarge))), 'style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('plain' => array('class' => 'motopress-buttons-square', 'label' => $motopressCELang->CESocialsObjStyleSquare), 'rounded' => array('class' => 'motopress-buttons-rounded', 'label' => $motopressCELang->CERounded), 'circular' => array('class' => 'motopress-buttons-circular', 'label' => $motopressCELang->CESocialsObjStyleCircular), 'volume' => array('class' => 'motopress-buttons-volume', 'label' => $motopressCELang->CESocialsObjStyleVolume)))), 'default' => array('motopress-buttons-32x32', 'motopress-buttons-square')))); $socialProfileObj = new MPCEObject(MPCEShortcode::PREFIX . 'social_profile', $motopressCELang->CESocialProfileObjName, 'social-profile.png', array('facebook' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Facebook')), 'default' => 'https://www.facebook.com/motopressapp'), 'google' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Google+')), 'default' => 'https://plus.google.com/+Getmotopress/posts'), 'twitter' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Twitter')), 'default' => 'https://twitter.com/motopressapp'), 'pinterest' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Pinterest')), 'default' => 'http://www.pinterest.com/motopress/'), 'linkedin' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'LinkedIn'))), 'flickr' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Flickr'))), 'vk' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'VK'))), 'delicious' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Delicious'))), 'youtube' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'YouTube')), 'default' => 'https://www.youtube.com/channel/UCtkDYmIQ5Lv_z8KbjJ2lpFQ'), 'rss' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'RSS')), 'default' => 'http://www.getmotopress.com/feed/'), 'instagram' => array('type' => 'text', 'label' => strtr($motopressCELang->CESocialProfileObjURLLabel, array('%name%' => 'Instagram')), 'default' => ''), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 30); $socialProfileObj->addStyle(array('mp_style_classes' => array('predefined' => array('size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('normal' => array('class' => 'motopress-buttons-32x32', 'label' => $motopressCELang->CESocialsObjSizeNormal), 'large' => array('class' => 'motopress-buttons-64x64', 'label' => $motopressCELang->CESocialsObjSizeLarge))), 'style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('plain' => array('class' => 'motopress-buttons-square', 'label' => $motopressCELang->CESocialsObjStyleSquare), 'rounded' => array('class' => 'motopress-buttons-rounded', 'label' => $motopressCELang->CERounded), 'circular' => array('class' => 'motopress-buttons-circular', 'label' => $motopressCELang->CESocialsObjStyleCircular), 'volume' => array('class' => 'motopress-buttons-volume', 'label' => $motopressCELang->CESocialsObjStyleVolume)))), 'default' => array('motopress-buttons-32x32', 'motopress-buttons-square')))); //media $videoObj = new MPCEObject(MPCEShortcode::PREFIX . 'video', $motopressCELang->CEVideoObjName, 'video.png', array('src' => array('type' => 'video', 'label' => $motopressCELang->CEVideoObjSrcLabel, 'default' => MPCEShortcode::DEFAULT_VIDEO, 'description' => $motopressCELang->CEVideoObjSrcDesc)), 10); $videoObj->addStyle(array('mp_style_classes' => array('selector' => '> iframe'))); // WP Audio $wpAudioObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_audio', $motopressCELang->CEwpAudio, 'player.png', array('source' => array('type' => 'select', 'label' => $motopressCELang->CEwpAudioSourceTitle, 'description' => $motopressCELang->CEwpAudioSourceDesc, 'list' => array('library' => $motopressCELang->CEwpAudioSourceLibrary, 'external' => $motopressCELang->CEwpAudioSourceURL), 'default' => 'external'), 'id' => array('type' => 'audio', 'label' => $motopressCELang->CEwpAudioIdTitle, 'description' => $motopressCELang->CEwpAudioIdDescription, 'default' => '', 'dependency' => array('parameter' => 'source', 'value' => 'library')), 'url' => array('type' => 'text', 'label' => $motopressCELang->CEwpAudioUrlTitle, 'description' => $motopressCELang->CEwpAudioUrlDescription, 'default' => 'http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3', 'dependency' => array('parameter' => 'source', 'value' => 'external')), 'autoplay' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioAutoplayTitle, 'description' => $motopressCELang->CEwpAudioAutoplayDesc, 'default' => ''), 'loop' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioLoopTitle, 'description' => $motopressCELang->CEwpAudioLoopDesc, 'default' => '')), 20, MPCEObject::ENCLOSED); //other $gMapObj = new MPCEObject(MPCEShortcode::PREFIX . 'gmap', $motopressCELang->CEGoogleMapObjName, 'map.png', array('address' => array('type' => 'text', 'label' => $motopressCELang->CEGoogleMapObjAddressLabel, 'default' => 'Sydney, New South Wales, Australia', 'description' => $motopressCELang->CEGoogleMapObjAddressDesc), 'zoom' => array('type' => 'slider', 'label' => $motopressCELang->CEGoogleMapObjZoomLabel, 'default' => 13, 'min' => 0, 'max' => 20)), 60, null, MPCEObject::RESIZE_ALL); $gMapObj->addStyle(array('mp_style_classes' => array('selector' => '> iframe'))); $spaceObj = new MPCEObject(MPCEShortcode::PREFIX . 'space', $motopressCELang->CESpaceObjName, 'space.png', null, 50, null, MPCEObject::RESIZE_ALL); $spaceObj->addStyle(array('mp_style_classes' => array('predefined' => $spacePredefinedStyles))); $embedObj = new MPCEObject(MPCEShortcode::PREFIX . 'embed', $motopressCELang->CEEmbedObjName, 'code.png', array('data' => array('type' => 'longtext64', 'label' => $motopressCELang->CEEmbedObjPasteCode, 'default' => 'PGk+UGFzdGUgeW91ciBjb2RlIGhlcmUuPC9pPg==', 'description' => $motopressCELang->CEEmbedObjPasteCodeDescription), 'fill_space' => array('type' => 'checkbox', 'label' => $motopressCELang->CEEmbedObjFill, 'default' => 'true', 'description' => $motopressCELang->CEEmbedObjFillDescription)), 40); $quotesObj = new MPCEObject(MPCEShortcode::PREFIX . 'quote', $motopressCELang->CEQuotesObjName, 'quotes.png', array('cite' => array('type' => 'text', 'label' => $motopressCELang->CEQuotesObjCiteLabel, 'default' => 'John Smith', 'description' => $motopressCELang->CEQuotesObjCiteDesc), 'cite_url' => array('type' => 'link', 'label' => $motopressCELang->CEQuotesObjUrlLabel, 'default' => '#', 'description' => $motopressCELang->CEQuotesObjUrlDesc), 'quote_content' => array('type' => 'longtext', 'label' => $motopressCELang->CEQuotesObjContentLabel, 'default' => 'Lorem ipsum dolor sit amet.')), 40, MPCEObject::ENCLOSED); $membersObj = new MPCEObject(MPCEShortcode::PREFIX . 'members_content', $motopressCELang->CEMembersObjName, 'members.png', array('message' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjMessageLabel, 'default' => $motopressCELang->CEMembersObjMessageDefault, 'description' => $motopressCELang->CEMembersObjMessageDesc), 'login_text' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjLoginTextLabel, 'default' => $motopressCELang->CEMembersObjLoginTextDefault, 'description' => $motopressCELang->CEMembersObjLoginTextDesc), 'members_content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CEMembersObjContentLabel, 'default' => $motopressCELang->CEMembersObjContentValue, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true')), 50, MPCEObject::ENCLOSED); $googleChartsObj = new MPCEObject(MPCEShortcode::PREFIX . 'google_chart', $motopressCELang->CEGoogleChartsObjName, 'chart.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEObjTitleLabel, 'default' => 'Company Performance'), 'type' => array('type' => 'select', 'label' => $motopressCELang->CEGoogleChartsObjTypeLabel, 'description' => $motopressCELang->CEGoogleChartsObjTypeDesc, 'default' => 'ColumnChart', 'list' => array('ColumnChart' => $motopressCELang->CEGoogleChartsObjTypeListColumn, 'BarChart' => $motopressCELang->CEGoogleChartsObjTypeListBar, 'AreaChart' => $motopressCELang->CEGoogleChartsObjTypeListArea, 'SteppedAreaChart' => $motopressCELang->CEGoogleChartsObjTypeListStepped, 'PieChart' => $motopressCELang->CEGoogleChartsObjTypeListPie, 'PieChart3D' => $motopressCELang->CEGoogleChartsObjTypeList3D, 'LineChart' => $motopressCELang->CEGoogleChartsObjTypeListLine, 'Histogram' => $motopressCELang->CEGoogleChartsObjTypeListHistogram), 'disabled' => 'true'), 'donut' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGoogleChartsObjDonutLabel, 'default' => '', 'dependency' => array('parameter' => 'type', 'value' => 'PieChart')), 'colors' => array('type' => 'text', 'label' => $motopressCELang->CEGoogleChartsObjColorsLabel, 'description' => $motopressCELang->CEGoogleChartsObjColorsDesc, 'disabled' => 'true'), 'transparency' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGoogleChartsObjTransparencyLabel, 'default' => 'false', 'disabled' => 'true'), 'table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'description' => $motopressCELang->CEGoogleChartsObjDataDesc, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'saveInContent' => 'true')), 30, MPCEObject::ENCLOSED, MPCEObject::RESIZE_ALL); $tableObj = new MPCEObject(MPCEShortcode::PREFIX . 'table', $motopressCELang->CETableObjName, 'table.png', array('table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'description' => $motopressCELang->CEObjTableDataDesc, 'saveInContent' => 'true')), 10, MPCEObject::ENCLOSED); $tableObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-table', 'label' => $motopressCELang->CETableObjBasicClassLabel), 'predefined' => array('style' => array('label' => $motopressCELang->CEObjStyleLabel, 'allowMultiple' => true, 'values' => array('silver' => array('class' => 'motopress-table-style-silver', 'label' => $motopressCELang->CETableObjListLight, 'disabled' => true), 'left' => array('class' => 'motopress-table-first-col-left', 'label' => $motopressCELang->CETableObjFirstColLeft)))), 'default' => array('motopress-table-first-col-left'), 'selector' => '> table'))); $postsGridObj = new MPCEObject(MPCEShortcode::PREFIX . 'posts_grid', $motopressCELang->CEPostsGridObjName, 'posts-grid.png', array('query_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjQueryTypeLabel, 'description' => $motopressCELang->CEPostsGridObjQueryTypeDesc, 'default' => 'simple', 'list' => array('simple' => 'Simple', 'custom' => 'Custom Query', 'ids' => 'IDs')), 'post_type' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjPostTypeLabel, 'description' => $motopressCELang->CEPostsGridObjPostTypeDesc, 'list' => MPCEShortcode::getPostTypes(), 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'category' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjCategoryLabel, 'description' => $motopressCELang->CEPostsGridObjCategoryDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'tag' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjTagLabel, 'description' => $motopressCELang->CEPostsGridObjTagDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'custom_tax' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjCustomTaxLabel, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'custom_tax_field' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjCustomTaxFieldLabel, 'default' => 'slug', 'list' => array('term_id' => 'Term ID', 'slug' => 'Slug', 'name' => 'Name'), 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'custom_tax_terms' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjCustomTaxTermLabel, 'description' => $motopressCELang->CEPostsGridObjCustomTaxTermDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'posts_per_page' => array('type' => 'spinner', 'label' => $motopressCELang->CEPostsGridObjPostsPerPageLabel, 'default' => 3, 'min' => 1, 'max' => 40, 'step' => 1, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'posts_order' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjSortOrder, 'default' => 'DESC', 'list' => array('ASC' => $motopressCELang->CEPostsGridObjSortOrderAscending, 'DESC' => $motopressCELang->CEPostsGridObjSortOrderDescending), 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'simple')), 'custom_query' => array('type' => 'longtext64', 'label' => $motopressCELang->CEPostsGridObjCustomQueryLabel, 'description' => $motopressCELang->CEPostsGridObjCustomQueryDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'custom')), 'ids' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjIdsLabel, 'description' => $motopressCELang->CEPostsGridObjIdsDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'query_type', 'value' => 'ids')), 'columns' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEColumnsCount, 'default' => 1, 'list' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6)), 'template' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjTemplateLabel, 'list' => MPCEShortcode::getPostsGridTemplatesList()), 'posts_gap' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjPostsGapLabel, 'default' => 30, 'min' => 0, 'max' => 100, 'step' => 10), 'show_featured_image' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowFeaturedImage, 'default' => 'true'), 'image_size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjImageSizeLabel, 'default' => 'large', 'list' => array('full' => $motopressCELang->CEFull, 'large' => $motopressCELang->CELarge, 'medium' => $motopressCELang->CEMedium, 'thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'show_featured_image', 'value' => 'true')), 'image_custom_size' => array('type' => 'text', 'description' => $motopressCELang->CEImageCustomSizeLabel, 'dependency' => array('parameter' => 'image_size', 'value' => 'custom')), 'title_tag' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjTitleTag, 'default' => 'h2', 'list' => array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'hide' => $motopressCELang->CEPostsGridObjTitleTagNone)), 'show_date_comments' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowDateComments, 'default' => 'true'), 'show_content' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjShowContent, 'default' => 'short', 'list' => array('short' => $motopressCELang->CEPostsGridObjShowContentShort, 'full' => $motopressCELang->CEPostsGridObjShowContentFull, 'excerpt' => $motopressCELang->CEPostsGridObjShowContentExcerpt, 'hide' => $motopressCELang->CEPostsGridObjShowContentNone)), 'short_content_length' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjShortContentLength, 'default' => 200, 'min' => 0, 'max' => 1000, 'step' => 20, 'dependency' => array('parameter' => 'show_content', 'value' => 'short')), 'read_more_text' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjReadMoreTextLabel, 'default' => $motopressCELang->CEPostsGridObjReadMoreText), 'pagination' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjPaginationLabel, 'default' => 'false', 'dependency' => array('parameter' => 'load_more_btn', 'value' => 'false')), 'load_more_btn' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjLoadMoreBtnLabel, 'description' => $motopressCELang->CEPostsGridObjLoadMoreBtnDesc, 'default' => 'false'), 'load_more_text' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjLoadMoreTextLabel, 'default' => $motopressCELang->CEPostsGridObjLoadMoreTextDefault, 'dependency' => array('parameter' => 'load_more_btn', 'value' => 'true')))); $postsGridObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-posts-grid-basic', 'label' => $motopressCELang->CEPostsGridObjBasicClassLabel)))); $serviceBoxObj = new MPCEObject(MPCEShortcode::PREFIX . 'service_box', $motopressCELang->CEServiceBoxObjName, 'service-box.png', array('layout' => array('type' => 'select', 'label' => $motopressCELang->CEServiceBoxObjLayoutLabel, 'default' => 'centered', 'list' => array('centered' => $motopressCELang->CEServiceBoxObjLayoutCentered, 'heading-float' => $motopressCELang->CEServiceBoxObjLayoutHeadingFloat, 'text-heading-float' => $motopressCELang->CEServiceBoxObjLayoutTextHeadingFloat), 'dependency' => array('parameter' => 'icon_type', 'except' => 'big_image')), 'icon_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjIconTypeLabel, 'default' => 'font', 'list' => array('font' => $motopressCELang->CEServiceBoxObjIconTypeFont, 'image' => $motopressCELang->CEServiceBoxObjIconTypeImage, 'big_image' => $motopressCELang->CEServiceBoxObjIconTypeBigImage)), 'icon' => array('type' => 'icon-picker', 'label' => $motopressCELang->CEServiceBoxObjFontIconLabel, 'default' => 'fa fa-glass', 'list' => $this->getIconClassList(), 'dependency' => array('parameter' => 'icon_type', 'value' => 'font')), 'icon_size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjIconSizeLabel, 'default' => 'normal', 'list' => array('mini' => $motopressCELang->CEMini, 'small' => $motopressCELang->CESmall, 'normal' => $motopressCELang->CENormal, 'large' => $motopressCELang->CELarge, 'extra-large' => $motopressCELang->CEExtraLarge, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'icon_type', 'value' => 'font')), 'icon_custom_size' => array('type' => 'spinner', 'label' => $motopressCELang->CEServiceBoxObjIconCustomSizeLabel, 'description' => $motopressCELang->CEServiceBoxObjIconCustomSizeDesc, 'min' => 1, 'step' => 1, 'max' => 500, 'default' => 26, 'dependency' => array('parameter' => 'icon_size', 'value' => 'custom')), 'icon_color' => array('type' => 'color-select', 'label' => $motopressCELang->CEServiceBoxObjIconColorLabel, 'default' => 'mp-text-color-default', 'list' => array('mp-text-color-default' => $motopressCELang->CESilver, 'mp-text-color-red' => $motopressCELang->CERed, 'mp-text-color-pink-dreams' => $motopressCELang->CEPinkDreams, 'mp-text-color-warm' => $motopressCELang->CEWarm, 'mp-text-color-hot-summer' => $motopressCELang->CEHotSummer, 'mp-text-color-olive-garden' => $motopressCELang->CEOliveGarden, 'mp-text-color-green-grass' => $motopressCELang->CEGreenGrass, 'mp-text-color-skyline' => $motopressCELang->CESkyline, 'mp-text-color-aqua-blue' => $motopressCELang->CEAquaBlue, 'mp-text-color-violet' => $motopressCELang->CEViolet, 'mp-text-color-dark-grey' => $motopressCELang->CEDarkGrey, 'mp-text-color-black' => $motopressCELang->CEBlack, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'icon_type', 'value' => 'font')), 'icon_custom_color' => array('type' => 'color-picker', 'label' => $motopressCELang->CEServiceBoxObjIconCustomColorLabel, 'default' => '#000000', 'dependency' => array('parameter' => 'icon_color', 'value' => 'custom')), 'image_id' => array('type' => 'image', 'label' => $motopressCELang->CEServiceBoxObjImageIconLabel, 'default' => '', 'dependency' => array('parameter' => 'icon_type', 'value' => array('image', 'big_image'))), 'image_size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjImageIconSizeLabel, 'default' => 'thumbnail', 'list' => array('thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom, 'full' => $motopressCELang->CEFull), 'dependency' => array('parameter' => 'icon_type', 'value' => 'image')), 'image_custom_size' => array('type' => 'text', 'label' => $motopressCELang->CEServiceBoxObjImageIconCustomSizeLabel, 'description' => $motopressCELang->CEServiceBoxObjImageIconCustomSizeDesc, 'default' => '50x50', 'dependency' => array('parameter' => 'image_size', 'value' => 'custom')), 'big_image_height' => array('type' => 'spinner', 'label' => $motopressCELang->CEServiceBoxObjImageIconHeightLabel, 'default' => 150, 'min' => 1, 'max' => 1000, 'step' => 1, 'dependency' => array('parameter' => 'icon_type', 'value' => 'big_image')), 'icon_background_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjIconBackgroundTypeLabel, 'default' => 'none', 'list' => array('none' => $motopressCELang->CENone, 'square' => $motopressCELang->CESquare, 'rounded' => $motopressCELang->CERounded, 'circle' => $motopressCELang->CECircle), 'dependency' => array('parameter' => 'icon_type', 'except' => 'big_image')), 'icon_background_size' => array('type' => 'spinner', 'label' => $motopressCELang->CEServiceBoxObjIconBackgroundSize, 'default' => 1.5, 'min' => 1, 'max' => 3, 'step' => 0.1, 'dependency' => array('parameter' => 'icon_background_type', 'except' => 'none')), 'icon_background_color' => array('type' => 'color-picker', 'label' => $motopressCELang->CEServiceBoxObjIconBackgroundColorLabel, 'default' => '#000000', 'dependency' => array('parameter' => 'icon_background_type', 'except' => 'none')), 'icon_margin_left' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginLeftLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0'), 'icon_margin_right' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginRightLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0'), 'icon_margin_top' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginTopLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0'), 'icon_margin_bottom' => array('type' => 'spinner', 'label' => $motopressCELang->CEIconMarginBottomLabel, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => '0'), 'icon_effect' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjIconEffectLabel, 'default' => 'none', 'list' => array('none' => $motopressCELang->CENone, 'grayscale' => $motopressCELang->CEServiceBoxObjIconEffectGrayscale, 'zoom' => $motopressCELang->CEServiceBoxObjIconEffectZoom, 'rotate' => $motopressCELang->CEServiceBoxObjIconEffectRotate)), 'heading' => array('type' => 'longtext', 'label' => $motopressCELang->CEServiceBoxObjHeadingLabel, 'default' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'false'), 'heading_tag' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEServiceBoxObjHeadingTagLabel, 'default' => 'h2', 'list' => array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6')), 'text' => array('type' => 'longtext', 'label' => $motopressCELang->CEServiceBoxObjTextLabel, 'default' => 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.', 'saveInContent' => 'true'), 'button_show' => array('type' => 'checkbox', 'label' => $motopressCELang->CEServiceBoxObjShowButtonLabel, 'default' => 'false', 'disabled' => 'true'), 'button_text' => array('type' => 'text', 'label' => $motopressCELang->CEServiceBoxObjButtonTextLabel, 'default' => 'Button', 'dependency' => array('parameter' => 'button_show', 'value' => 'true'), 'disabled' => 'true'), 'button_link' => array('type' => 'link', 'label' => $motopressCELang->CEServiceBoxObjButtonLinkLabel, 'default' => '#', 'dependency' => array('parameter' => 'button_show', 'value' => 'true'), 'disabled' => 'true'), 'button_color' => array('type' => 'color-select', 'label' => $motopressCELang->CEServiceBoxObjButtonColorLabel, 'default' => 'motopress-btn-color-silver', 'list' => array('motopress-btn-color-silver' => $motopressCELang->CESilver, 'motopress-btn-color-red' => $motopressCELang->CERed, 'motopress-btn-color-pink-dreams' => $motopressCELang->CEPinkDreams, 'motopress-btn-color-warm' => $motopressCELang->CEWarm, 'motopress-btn-color-hot-summer' => $motopressCELang->CEHotSummer, 'motopress-btn-color-olive-garden' => $motopressCELang->CEOliveGarden, 'motopress-btn-color-green-grass' => $motopressCELang->CEGreenGrass, 'motopress-btn-color-skyline' => $motopressCELang->CESkyline, 'motopress-btn-color-aqua-blue' => $motopressCELang->CEAquaBlue, 'motopress-btn-color-violet' => $motopressCELang->CEViolet, 'motopress-btn-color-dark-grey' => $motopressCELang->CEDarkGrey, 'motopress-btn-color-black' => $motopressCELang->CEBlack, 'custom' => $motopressCELang->CECustom), 'dependency' => array('parameter' => 'button_show', 'value' => 'true'), 'disabled' => 'true'), 'button_custom_bg_color' => array('type' => 'color-picker', 'label' => $motopressCELang->CEServiceBoxObjButtonCustomBGColorLabel, 'default' => '#ffffff', 'dependency' => array('parameter' => 'button_color', 'value' => 'custom'), 'disabled' => 'true'), 'button_custom_text_color' => array('type' => 'color-picker', 'label' => $motopressCELang->CEServiceBoxObjButtonCustomTextColorLabel, 'default' => '#000000', 'dependency' => array('parameter' => 'button_color', 'value' => 'custom'), 'disabled' => 'true'), 'button_align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'center', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight), 'dependency' => array('parameter' => 'button_show', 'value' => 'true'), 'disabled' => 'true')), null, MPCEObject::ENCLOSED); $serviceBoxObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-service-box-basic', 'label' => $motopressCELang->CEServiceBoxObjBasicClassLabel)))); $mpSliderObj = null; if (is_plugin_active('motopress-slider/motopress-slider.php')) { global $mpsl_settings; if (version_compare($mpsl_settings['plugin_version'], '1.1.2', '>=')) { global $mpSlider; $mpSliderObj = new MPCEObject('mpsl', apply_filters('mpsl_product_name', $motopressCELang->CESliderObjName), 'layer-slider.png', array('alias' => array('type' => 'select', 'label' => $motopressCELang->CESliderNameLabel, 'description' => $motopressCELang->CESliderNameDesc, 'list' => array_merge(array('' => $motopressCELang->CESliderNameNotSelected), $mpSlider->getSliderList('title', 'alias')))), 40); } } //wordpress // WP Widgets Area global $wp_registered_sidebars; $wpWidgetsArea_array = array(); $wpWidgetsArea_default = ''; if ($wp_registered_sidebars) { foreach ($wp_registered_sidebars as $sidebar) { if (empty($wpWidgetsArea_default)) { $wpWidgetsArea_default = $sidebar['id']; } $wpWidgetsArea_array[$sidebar['id']] = $sidebar['name']; } } else { $wpWidgetsArea_array['no'] = $motopressCELang->CEwpWidgetsAreaNoSidebars; } $wpWidgetsAreaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_widgets_area', $motopressCELang->CEwpWidgetsArea, 'sidebar.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => '', 'description' => $motopressCELang->CEwpWidgetsAreaDescription), 'sidebar' => array('type' => 'select', 'label' => $motopressCELang->CEwpWidgetsAreaSelect, 'default' => $wpWidgetsArea_default, 'description' => '', 'list' => $wpWidgetsArea_array)), 5); // archives $wpArchiveObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_archives', $motopressCELang->CEwpArchives, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpArchives, 'description' => $motopressCELang->CEwpArchivesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => '')), 45); // calendar $wpCalendarObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_calendar', $motopressCELang->CEwpCalendar, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCalendar, 'description' => $motopressCELang->CEwpCalendarDescription)), 30); // wp_categories $wpCategoriesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_categories', $motopressCELang->CEwpCategories, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCategories, 'description' => $motopressCELang->CEwpCategoriesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => ''), 'hierarchy' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpCategoriesShowHierarchy, 'default' => '', 'description' => '')), 40); // wp_navmenu $wpCustomMenu_menus = get_terms('nav_menu'); $wpCustomMenu_array = array(); $wpCustomMenu_default = ''; if ($wpCustomMenu_menus) { foreach ($wpCustomMenu_menus as $menu) { if (empty($wpCustomMenu_default)) { $wpCustomMenu_default = $menu->slug; } $wpCustomMenu_array[$menu->slug] = $menu->name; } } else { $wpCustomMenu_array['no'] = $motopressCELang->CEwpCustomMenuNoMenus; } $wpCustomMenuObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_navmenu', $motopressCELang->CEwpCustomMenu, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCustomMenu, 'description' => $motopressCELang->CEwpCustomMenuDescription), 'nav_menu' => array('type' => 'select', 'label' => $motopressCELang->CEwpCustomMenuSelectMenu, 'default' => $wpCustomMenu_default, 'description' => '', 'list' => $wpCustomMenu_array)), 10); // wp_meta $wpMetaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_meta', $motopressCELang->CEwpMeta, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpMeta, 'description' => $motopressCELang->CEwpMetaDescription)), 55); // wp_pages $wpPagesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_pages', $motopressCELang->CEwpPages, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpPages, 'description' => $motopressCELang->CEwpPagesDescription), 'sortby' => array('type' => 'select', 'label' => $motopressCELang->CESortBy, 'default' => 'menu_order', 'description' => '', 'list' => array('post_title' => $motopressCELang->CESortByPageTitle, 'menu_order' => $motopressCELang->CESortByPageOrder, 'ID' => $motopressCELang->CESortByPageID)), 'exclude' => array('type' => 'text', 'label' => $motopressCELang->CEExclude, 'default' => '', 'description' => $motopressCELang->CEwpPagesExcludePages)), 15); // wp_posts $wpPostsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_posts', $motopressCELang->CEwpRecentPosts, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentPosts, 'description' => $motopressCELang->CEwpRecentPostsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentPostsNumber, 'default' => '5', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRecentPostsDisplayDate, 'default' => '', 'description' => '')), 20); // wp_comments $wpRecentCommentsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_comments', $motopressCELang->CEwpRecentComments, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentComments, 'description' => $motopressCELang->CEwpRecentCommentsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentCommentsNumber, 'default' => '5', 'description' => '')), 25); // wp_rss $wpRSSObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_rss', $motopressCELang->CEwpRSS, 'wordpress.png', array('url' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSUrl, 'default' => 'http://www.getmotopress.com/feed/', 'description' => $motopressCELang->CEwpRSSUrlDescription), 'title' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSFeedTitle, 'default' => '', 'description' => $motopressCELang->CEwpRSSFeedTitleDescription), 'items' => array('type' => 'select', 'label' => $motopressCELang->CEwpRSSQuantity, 'default' => 9, 'description' => $motopressCELang->CEwpRSSQuantityDescription, 'list' => range(1, 20)), 'show_summary' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayContent, 'default' => '', 'description' => ''), 'show_author' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayAuthor, 'default' => '', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayDate, 'default' => '', 'description' => '')), 50); // search $wpSearchObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_search', $motopressCELang->CEwpRSSSearch, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRSSSearch, 'description' => $motopressCELang->CEwpRSSSearchDescription)), 35); // tag cloud $wpTagCloudObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_tagcloud', $motopressCELang->CEwpTagCloud, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpTags, 'description' => $motopressCELang->CEwpTagCloudDescription), 'taxonomy' => array('type' => 'select', 'label' => $motopressCELang->CEwpTagCloudTaxonomy, 'default' => 10, 'description' => '', 'list' => array('post_tag' => $motopressCELang->CEwpTags, 'category' => $motopressCELang->CEwpTagCloudCategories))), 60); /* wp widgets END */ /* Groups */ $gridGroup = new MPCEGroup(); $gridGroup->setId(MPCEShortcode::PREFIX . 'grid'); $gridGroup->setName($motopressCELang->CEGridGroupName); $gridGroup->setShow(false); $gridGroup->addObject(array($rowObj, $rowInnerObj, $spanObj, $spanInnerObj)); $textGroup = new MPCEGroup(); $textGroup->setId(MPCEShortcode::PREFIX . 'text'); $textGroup->setName($motopressCELang->CETextGroupName); $textGroup->setIcon('text.png'); $textGroup->setPosition(0); $textGroup->addObject(array($textObj, $headingObj, $codeObj, $quotesObj, $membersObj)); $imageGroup = new MPCEGroup(); $imageGroup->setId(MPCEShortcode::PREFIX . 'image'); $imageGroup->setName($motopressCELang->CEImageGroupName); $imageGroup->setIcon('image.png'); $imageGroup->setPosition(10); $imageGroup->addObject(array($imageObj, $imageSlider, $gridGalleryObj, $mpSliderObj)); $buttonGroup = new MPCEGroup(); $buttonGroup->setId(MPCEShortcode::PREFIX . 'button'); $buttonGroup->setName($motopressCELang->CEButtonGroupName); $buttonGroup->setIcon('button.png'); $buttonGroup->setPosition(20); $buttonGroup->addObject(array($buttonObj, $socialsObj, $socialProfileObj)); $mediaGroup = new MPCEGroup(); $mediaGroup->setId(MPCEShortcode::PREFIX . 'media'); $mediaGroup->setName($motopressCELang->CEMediaGroupName); $mediaGroup->setIcon('media.png'); $mediaGroup->setPosition(30); $mediaGroup->addObject(array($videoObj, $wpAudioObj)); $otherGroup = new MPCEGroup(); $otherGroup->setId(MPCEShortcode::PREFIX . 'other'); $otherGroup->setName($motopressCELang->CEOtherGroupName); $otherGroup->setIcon('other.png'); $otherGroup->setPosition(40); $otherGroup->addObject(array($gMapObj, $spaceObj, $embedObj, $googleChartsObj, $tabsObj, $tabObj, $accordionObj, $accordionItemObj, $tableObj, $postsGridObj, $serviceBoxObj)); $wordpressGroup = new MPCEGroup(); $wordpressGroup->setId(MPCEShortcode::PREFIX . 'wordpress'); $wordpressGroup->setName($motopressCELang->CEWordPressGroupName); $wordpressGroup->setIcon('wordpress.png'); $wordpressGroup->setPosition(50); $wordpressGroup->addObject(array($wpArchiveObj, $wpCalendarObj, $wpCategoriesObj, $wpCustomMenuObj, $wpMetaObj, $wpPagesObj, $wpPostsObj, $wpRecentCommentsObj, $wpRSSObj, $wpSearchObj, $wpTagCloudObj, $wpWidgetsAreaObj)); self::$defaultGroup = $otherGroup->getId(); $this->addGroup(array($gridGroup, $textGroup, $imageGroup, $buttonGroup, $mediaGroup, $otherGroup, $wordpressGroup)); $this->updateDeprecatedParams(); /* Templates */ require_once 'templates/landing.php'; require_once 'templates/callToAction.php'; require_once 'templates/feature.php'; require_once 'templates/description.php'; require_once 'templates/service.php'; require_once 'templates/product.php'; $landingTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'landing_page', $motopressCELang->CELandingTemplate . ' ' . $motopressCELang->CEPage, $landingContent, 'landing-page.png'); $callToActionTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'call_to_action_page', $motopressCELang->CECallToActionTemplate . ' ' . $motopressCELang->CEPage, $callToActionContent, 'call-to-action-page.png'); $featureTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'feature_list', $motopressCELang->CEFeatureTemplate . ' ' . $motopressCELang->CEList, $featureContent, 'feature-list.png'); $descriptionTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'description_page', $motopressCELang->CEDescriptionTemplate . ' ' . $motopressCELang->CEPage, $descriptionContent, 'description-page.png'); $serviceTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'service_list', $motopressCELang->CEServiceTemplate . ' ' . $motopressCELang->CEList, $serviceContent, 'service-list.png'); $productTemplate = new MPCETemplate(MPCEShortcode::PREFIX . 'product_page', $motopressCELang->CEProductTemplate . ' ' . $motopressCELang->CEPage, $productContent, 'product-page.png'); $this->addTemplate(array($landingTemplate, $callToActionTemplate, $featureTemplate, $descriptionTemplate, $serviceTemplate, $productTemplate)); do_action_ref_array('mp_library', array(&$this)); }
function mpsl_shortcode($atts) { global $mpsl_settings; $mp_plugin_active = is_plugin_active('motopress-content-editor/motopress-content-editor.php'); $defaultAtts = array('alias' => '', 'edit_mode' => false); if ($mp_plugin_active) { $defaultAtts = MPCEShortcode::addStyleAtts($defaultAtts); } extract(shortcode_atts($defaultAtts, $atts, 'mpsl')); if ($alias === '') { $alias = isset($atts[0]) ? $atts[0] : ''; } $edit_mode = filter_var($edit_mode, FILTER_VALIDATE_BOOLEAN); $mpAtts = array(); if ($mp_plugin_active) { if (!empty($mp_style_classes)) { $mp_style_classes = ' ' . $mp_style_classes; } $mpAtts = array('mp_style_classes' => $mp_style_classes, 'margin' => $margin); } return mpsl_slider($alias, $edit_mode, null, $mpAtts); }
public function shortcode_atts_common_filter($out, $pairs, $atts) { $basicClasses = trim(MPCEShortcode::getBasicClasses($this->prefix . $this->shortcode)); if (!$this->isContentEditor() && in_array($this->shortcode, array('row', 'row_inner', 'col', 'col_inner'))) { $basicClasses = ''; } //var_export($basicClasses); exit; $mpClasses = (isset($atts['margin']) ? trim(MPCEShortcode::getMarginClasses($atts['margin'])) : '') . ' ' . $basicClasses . ' ' . (isset($atts['mp_style_classes']) ? trim($atts['mp_style_classes']) : ''); $out['class'] = isset($out['class']) ? $out['class'] . ' ' . trim($mpClasses) : trim($mpClasses); return $out; }
// wp_enqueue_style('mpce-font-awesome'); if (is_plugin_active('motopress-slider/motopress-slider.php')) { global $mpsl_settings; if (version_compare($mpsl_settings['plugin_version'], '1.1.2', '>=')) { global $mpSlider; $mpSlider->enqueueScriptsStyles(); } } $mpGoogleChartsSwitch = array('motopressCE' => '1'); do_action('mpce_add_custom_scripts'); do_action('mpce_add_custom_styles'); } wp_localize_script('mp-google-charts', 'motopressGoogleChartsPHPData', $mpGoogleChartsSwitch); } require_once 'includes/ce/Shortcode.php'; $shortcode = new MPCEShortcode(); $shortcode->register(); add_action('admin_bar_menu', 'motopressCEAdminBarMenu', 81); function motopressCEExcerptShortcode() { $excerptShortcode = get_option('motopress-ce-excerpt-shortcode', '1'); if ($excerptShortcode) { remove_filter('the_excerpt', 'wpautop'); add_filter('the_excerpt', 'do_shortcode'); add_filter('get_the_excerpt', 'do_shortcode'); } } motopressCEExcerptShortcode(); require_once 'includes/ce/Library.php'; require_once 'includes/getLanguageDict.php'; function motopressCEWPInit()
/** * @global stdClass $motopressCELang */ public function __construct() { global $motopressCELang; self::$isAjaxRequest = $this->isAjaxRequest(); /* Objects */ //grid $rowObj = new MPCEObject(MPCEShortcode::PREFIX . 'row', $motopressCELang->CERowObjName, null, null, null, MPCEObject::ENCLOSED); $rowInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'row_inner', $motopressCELang->CERowInnerObjName, null, null, null, MPCEObject::ENCLOSED); $spanObj = new MPCEObject(MPCEShortcode::PREFIX . 'span', $motopressCELang->CESpanObjName, null, array('col' => array('type' => 'number', 'values' => range(1, 12), 'default' => '12')), null, MPCEObject::ENCLOSED); $spanInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'span_inner', $motopressCELang->CESpanInnerObjName, null, array('col' => array('type' => 'number', 'values' => range(1, 12), 'default' => '12')), null, MPCEObject::ENCLOSED); //text $textObj = new MPCEObject(MPCEShortcode::PREFIX . 'text', $motopressCELang->CETextObjName, 'text.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CETextObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CETextObjName)), 20, MPCEObject::ENCLOSED); $headingObj = new MPCEObject(MPCEShortcode::PREFIX . 'heading', $motopressCELang->CEHeadingObjName, 'heading.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CEHeadingObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CEHeadingObjName)), 10, MPCEObject::ENCLOSED); $codeObj = new MPCEObject(MPCEShortcode::PREFIX . 'code', $motopressCELang->CECodeObjName, 'wordpress.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CECodeObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CECodeObjName)), 30, MPCEObject::ENCLOSED); //image $imageObj = new MPCEObject(MPCEShortcode::PREFIX . 'image', $motopressCELang->CEImageObjName, 'image.png', array('id' => array('type' => 'image', 'label' => $motopressCELang->CEImageObjSrcLabel, 'default' => '', 'description' => $motopressCELang->CEImageObjSrcDesc, 'autoOpen' => 'true'), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEImageObjLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEImageObjLinkDesc, 'disabled' => 'true'), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEButtonObjTargetLabel, 'default' => 'false', 'disabled' => 'true'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 10); $imageSlider = new MPCEObject(MPCEShortcode::PREFIX . 'image_slider', $motopressCELang->CEImageSliderObjName, 'image-slider.png', array('ids' => array('type' => 'multi-images', 'label' => $motopressCELang->CEImageSliderObjIdsLabel, 'default' => '', 'description' => $motopressCELang->CEImageSliderObjIdsDesc, 'text' => $motopressCELang->CEImageSliderObjIdsText, 'autoOpen' => 'true'), 'animation' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageSliderObjAnimationLabel, 'default' => 'fade', 'description' => $motopressCELang->CEImageSliderObjAnimationDesc, 'list' => array('fade' => $motopressCELang->CEImageSliderObjAnimationFade, 'slide' => $motopressCELang->CEImageSliderObjAnimationSlide), 'disabled' => 'true'), 'smooth_height' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjSmoothHeightLabel, 'default' => 'false', 'description' => $motopressCELang->CEImageSliderObjSmoothHeightDesc, 'dependency' => array('parameter' => 'animation', 'value' => 'slide'), 'disabled' => 'true'), 'slideshow' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjAutoplayLabel, 'default' => 'true', 'description' => $motopressCELang->CEImageSliderObjAutoplayDesc, 'disabled' => 'true'), 'slideshow_speed' => array('type' => 'slider', 'label' => $motopressCELang->CEImageSliderObjSlideshowSpeedLabel, 'default' => 7, 'min' => 1, 'max' => 20, 'dependency' => array('parameter' => 'slideshow', 'value' => 'true'), 'disabled' => 'true'), 'control_nav' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjControlNavLabel, 'default' => 'true', 'disabled' => 'true')), 20); //button $buttonObj = new MPCEObject(MPCEShortcode::PREFIX . 'button', $motopressCELang->CEButtonObjName, 'button.png', array('text' => array('type' => 'text', 'label' => $motopressCELang->CEButtonObjTextLabel, 'default' => $motopressCELang->CEButtonObjName), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEButtonObjLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEButtonObjLinkDesc), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEButtonObjTargetLabel, 'default' => 'false', 'disabled' => 'true'), 'color' => array('class-prefix' => 'mp-button-', 'type' => 'color-select', 'label' => $motopressCELang->CEButtonObjColorLabel, 'default' => 'default', 'list' => array('default' => $motopressCELang->CESilver, 'red' => $motopressCELang->CERed, 'pink-dreams' => $motopressCELang->CEPinkDreams, 'warm' => $motopressCELang->CEWarm, 'hot-summer' => $motopressCELang->CEHotSummer, 'olive-garden' => $motopressCELang->CEOliveGarden, 'green-grass' => $motopressCELang->CEGreenGrass, 'skyline' => $motopressCELang->CESkyline, 'aqua-blue' => $motopressCELang->CEAquaBlue, 'violet' => $motopressCELang->CEViolet, 'dark-grey' => $motopressCELang->CEDarkGrey, 'black' => $motopressCELang->CEBlack)), 'size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjSizeLabel, 'default' => 'default', 'list' => array('large' => $motopressCELang->CELarge, 'default' => $motopressCELang->CEMiddle, 'small' => $motopressCELang->CESmall, 'mini' => $motopressCELang->CEMini)), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 10); //media $videoObj = new MPCEObject(MPCEShortcode::PREFIX . 'video', $motopressCELang->CEVideoObjName, 'video.png', array('src' => array('type' => 'video', 'label' => $motopressCELang->CEVideoObjSrcLabel, 'default' => MPCEShortcode::DEFAULT_VIDEO, 'description' => $motopressCELang->CEVideoObjSrcDesc)), 10); //other $gMapObj = new MPCEObject(MPCEShortcode::PREFIX . 'gmap', $motopressCELang->CEGoogleMapObjName, 'map.png', array('address' => array('type' => 'text', 'label' => $motopressCELang->CEGoogleMapObjAddressLabel, 'default' => 'Sidney, New South Wales, Australia', 'description' => $motopressCELang->CEGoogleMapObjAddressDesc), 'zoom' => array('type' => 'slider', 'label' => $motopressCELang->CEGoogleMapObjZoomLabel, 'default' => 13, 'min' => 0, 'max' => 20)), 60, null, MPCEObject::RESIZE_ALL); $spaceObj = new MPCEObject(MPCEShortcode::PREFIX . 'space', $motopressCELang->CESpaceObjName, 'space.png', null, 50, null, MPCEObject::RESIZE_ALL); $embedObj = new MPCEObject(MPCEShortcode::PREFIX . 'embed', $motopressCELang->CEEmbedObjName, 'code.png', array('data' => array('type' => 'longtext64', 'label' => $motopressCELang->CEEmbedObjPasteCode, 'default' => 'PGk+UGFzdGUgeW91ciBjb2RlIGhlcmUuPC9pPg==', 'description' => $motopressCELang->CEEmbedObjPasteCodeDescription), 'fill_space' => array('type' => 'checkbox', 'label' => $motopressCELang->CEEmbedObjFill, 'default' => 'true', 'description' => $motopressCELang->CEEmbedObjFillDescription)), 40); $quotesObj = new MPCEObject(MPCEShortcode::PREFIX . 'quote', $motopressCELang->CEQuotesObjName, 'quotes.png', array('cite' => array('type' => 'text', 'label' => $motopressCELang->CEQuotesObjCiteLabel, 'default' => 'John Smith', 'description' => $motopressCELang->CEQuotesObjCiteDesc), 'cite_url' => array('type' => 'link', 'label' => $motopressCELang->CEQuotesObjUrlLabel, 'default' => '#', 'description' => $motopressCELang->CEQuotesObjUrlDesc), 'quote_content' => array('type' => 'longtext', 'label' => $motopressCELang->CEQuotesObjContentLabel, 'default' => 'Lorem ipsum dolor sit amet.')), 40, MPCEObject::ENCLOSED); $membersObj = new MPCEObject(MPCEShortcode::PREFIX . 'members_content', $motopressCELang->CEMembersObjName, 'members.png', array('message' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjMessageLabel, 'default' => $motopressCELang->CEMembersObjMessageDefault, 'description' => $motopressCELang->CEMembersObjMessageDesc), 'login_text' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjLoginTextLabel, 'default' => $motopressCELang->CEMembersObjLoginTextDefault, 'description' => $motopressCELang->CEMembersObjLoginTextDesc), 'members_content' => array('type' => 'longtext', 'label' => $motopressCELang->CEMembersObjContentLabel, 'default' => $motopressCELang->CEMembersObjContentValue)), 50, MPCEObject::ENCLOSED); $socialsObj = new MPCEObject(MPCEShortcode::PREFIX . 'social_buttons', $motopressCELang->CESocialsObjName, 'social-buttons.png', array('size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjSizeLabel, 'default' => 'motopress-buttons-32x32', 'list' => array('motopress-buttons-32x32' => $motopressCELang->CESocialsObjSizeNormal, 'motopress-buttons-64x64' => $motopressCELang->CESocialsObjSizeLarge)), 'style' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjStyleLabel, 'default' => 'motopress-buttons-square', 'list' => array('motopress-buttons-square' => $motopressCELang->CESocialsObjStyleSquare, 'motopress-buttons-rounded' => $motopressCELang->CESocialsObjStyleRounded, 'motopress-buttons-circular' => $motopressCELang->CESocialsObjStyleCircular, 'motopress-buttons-volume' => $motopressCELang->CESocialsObjStyleVolume)), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'motopress-text-align-left', 'list' => array('motopress-text-align-left' => $motopressCELang->CELeft, 'motopress-text-align-center' => $motopressCELang->CECenter, 'motopress-text-align-right' => $motopressCELang->CERight))), 20, MPCEObject::ENCLOSED); $googleChartsObj = new MPCEObject(MPCEShortcode::PREFIX . 'google_chart', $motopressCELang->CEGoogleChartsObjName, 'chart.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEObjTitleLabel, 'default' => 'Company Performance'), 'type' => array('type' => 'select', 'label' => $motopressCELang->CEGoogleChartsObjTypeLabel, 'description' => $motopressCELang->CEGoogleChartsObjTypeDesc, 'default' => 'ColumnChart', 'list' => array('ColumnChart' => $motopressCELang->CEGoogleChartsObjTypeListColumn, 'BarChart' => $motopressCELang->CEGoogleChartsObjTypeListBar, 'AreaChart' => $motopressCELang->CEGoogleChartsObjTypeListArea, 'SteppedAreaChart' => $motopressCELang->CEGoogleChartsObjTypeListStepped, 'PieChart' => $motopressCELang->CEGoogleChartsObjTypeListPie, 'PieChart3D' => $motopressCELang->CEGoogleChartsObjTypeList3D, 'LineChart' => $motopressCELang->CEGoogleChartsObjTypeListLine, 'Histogram' => $motopressCELang->CEGoogleChartsObjTypeListHistogram), 'disabled' => 'true'), 'donut' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGoogleChartsObjDonutLabel, 'default' => '', 'dependency' => array('parameter' => 'type', 'value' => 'PieChart')), 'table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'description' => $motopressCELang->CEGoogleChartsObjDataDesc, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'saveInContent' => 'true')), 30, MPCEObject::ENCLOSED, MPCEObject::RESIZE_ALL); $tableObj = new MPCEObject(MPCEShortcode::PREFIX . 'table', $motopressCELang->CETableObjName, 'table.png', array('table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'description' => $motopressCELang->CEObjTableDataDesc, 'saveInContent' => 'true'), 'style' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjStyleLabel, 'default' => 'none', 'list' => array('none' => $motopressCELang->CETableObjListDefault, 'silver' => $motopressCELang->CETableObjListLight), 'disabled' => 'true')), 10, MPCEObject::ENCLOSED); //wordpress // archives $wpArchiveObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_archives', $motopressCELang->CEwpArchives, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpArchives, 'description' => $motopressCELang->CEwpArchivesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => '')), 45); // calendar $wpCalendarObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_calendar', $motopressCELang->CEwpCalendar, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCalendar, 'description' => $motopressCELang->CEwpCalendarDescription)), 30); // wp_categories $wpCategoriesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_categories', $motopressCELang->CEwpCategories, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCategories, 'description' => $motopressCELang->CEwpCategoriesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => ''), 'hierarchy' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpCategoriesShowHierarchy, 'default' => '', 'description' => '')), 40); // wp_navmenu $wpCustomMenu_menus = get_terms('nav_menu'); $wpCustomMenu_array = array(); $wpCustomMenu_default = ''; if ($wpCustomMenu_menus) { foreach ($wpCustomMenu_menus as $menu) { if (empty($wpCustomMenu_default)) { $wpCustomMenu_default = $menu->slug; } $wpCustomMenu_array[$menu->slug] = $menu->name; } } else { $wpCustomMenu_array['no'] = $motopressCELang->CEwpCustomMenuNoMenus; } $wpCustomMenuObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_navmenu', $motopressCELang->CEwpCustomMenu, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCustomMenu, 'description' => $motopressCELang->CEwpCustomMenuDescription), 'nav_menu' => array('type' => 'select', 'label' => $motopressCELang->CEwpCustomMenuSelectMenu, 'default' => $wpCustomMenu_default, 'description' => '', 'list' => $wpCustomMenu_array)), 10); // wp_meta $wpMetaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_meta', $motopressCELang->CEwpMeta, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpMeta, 'description' => $motopressCELang->CEwpMetaDescription)), 55); // wp_pages $wpPagesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_pages', $motopressCELang->CEwpPages, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpPages, 'description' => $motopressCELang->CEwpPagesDescription), 'sortby' => array('type' => 'select', 'label' => $motopressCELang->CESortBy, 'default' => 'menu_order', 'description' => '', 'list' => array('post_title' => $motopressCELang->CESortByPageTitle, 'menu_order' => $motopressCELang->CESortByPageOrder, 'ID' => $motopressCELang->CESortByPageID)), 'exclude' => array('type' => 'text', 'label' => $motopressCELang->CEExclude, 'default' => '', 'description' => $motopressCELang->CEwpPagesExcludePages)), 15); // wp_posts $wpPostsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_posts', $motopressCELang->CEwpRecentPosts, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentPosts, 'description' => $motopressCELang->CEwpRecentPostsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentPostsNumber, 'default' => '5', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRecentPostsDisplayDate, 'default' => '', 'description' => '')), 20); // wp_comments $wpRecentCommentsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_comments', $motopressCELang->CEwpRecentComments, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentComments, 'description' => $motopressCELang->CEwpRecentCommentsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentCommentsNumber, 'default' => '5', 'description' => '')), 25); // wp_rss $wpRSSObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_rss', $motopressCELang->CEwpRSS, 'wordpress.png', array('url' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSUrl, 'default' => 'http://www.getmotopress.com/feed/', 'description' => $motopressCELang->CEwpRSSUrlDescription), 'title' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSFeedTitle, 'default' => '', 'description' => $motopressCELang->CEwpRSSFeedTitleDescription), 'items' => array('type' => 'select', 'label' => $motopressCELang->CEwpRSSQuantity, 'default' => 9, 'description' => $motopressCELang->CEwpRSSQuantityDescription, 'list' => range(1, 20)), 'show_summary' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayContent, 'default' => '', 'description' => ''), 'show_author' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayAuthor, 'default' => '', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayDate, 'default' => '', 'description' => '')), 50); // search $wpSearchObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_search', $motopressCELang->CEwpRSSSearch, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRSSSearch, 'description' => $motopressCELang->CEwpRSSSearchDescription)), 35); // tag cloud $wpTagCloudObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_tagcloud', $motopressCELang->CEwpTagCloud, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpTags, 'description' => $motopressCELang->CEwpTagCloudDescription), 'taxonomy' => array('type' => 'select', 'label' => $motopressCELang->CEwpTagCloudTaxonomy, 'default' => 10, 'description' => '', 'list' => array('post_tag' => $motopressCELang->CEwpTags, 'category' => $motopressCELang->CEwpTagCloudCategories))), 60); /* wp widgets END */ // WP Audio $wpAudioObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_audio', $motopressCELang->CEwpAudio, 'player.png', array('source' => array('type' => 'select', 'label' => $motopressCELang->CEwpAudioSourceTitle, 'description' => $motopressCELang->CEwpAudioSourceDesc, 'list' => array('library' => $motopressCELang->CEwpAudioSourceLibrary, 'external' => $motopressCELang->CEwpAudioSourceURL), 'default' => 'external'), 'id' => array('type' => 'audio', 'label' => $motopressCELang->CEwpAudioIdTitle, 'description' => $motopressCELang->CEwpAudioIdDescription, 'default' => '', 'dependency' => array('parameter' => 'source', 'value' => 'library')), 'url' => array('type' => 'text', 'label' => $motopressCELang->CEwpAudioUrlTitle, 'description' => $motopressCELang->CEwpAudioUrlDescription, 'default' => 'http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3', 'dependency' => array('parameter' => 'source', 'value' => 'external')), 'autoplay' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioAutoplayTitle, 'description' => $motopressCELang->CEwpAudioAutoplayDesc, 'default' => ''), 'loop' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioLoopTitle, 'description' => $motopressCELang->CEwpAudioLoopDesc, 'default' => '')), 20, MPCEObject::ENCLOSED); // WP Widgets Area global $wp_registered_sidebars; $wpWidgetsArea_array = array(); $wpWidgetsArea_default = ''; if ($wp_registered_sidebars) { foreach ($wp_registered_sidebars as $sidebar) { if (empty($wpWidgetsArea_default)) { $wpWidgetsArea_default = $sidebar['id']; } $wpWidgetsArea_array[$sidebar['id']] = $sidebar['name']; } } else { $wpWidgetsArea_array['no'] = $motopressCELang->CEwpWidgetsAreaNoSidebars; } $wpWidgetsAreaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_widgets_area', $motopressCELang->CEwpWidgetsArea, 'sidebar.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => '', 'description' => $motopressCELang->CEwpWidgetsAreaDescription), 'sidebar' => array('type' => 'select', 'label' => $motopressCELang->CEwpWidgetsAreaSelect, 'default' => $wpWidgetsArea_default, 'description' => '', 'list' => $wpWidgetsArea_array)), 5); $tabsObj = new MPCEObject(MPCEShortcode::PREFIX . 'tabs', $motopressCELang->CETabsObjName, 'tabs.png', array('tabs' => array('type' => 'group', 'items' => array('label' => array('default' => $motopressCELang->CETabObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CETabObjName)), 'disabled' => 'true'), 'padding' => array('type' => 'slider', 'label' => $motopressCELang->CETabsObjPaddingLabel, 'default' => 20, 'min' => 0, 'max' => 50, 'step' => 10)), 20, MPCEObject::ENCLOSED); $tabObj = new MPCEObject(MPCEShortcode::PREFIX . 'tab', $motopressCELang->CETabObjName, null, array('id' => array('type' => 'text-hidden'), 'title' => array('type' => 'text', 'label' => $motopressCELang->CETabObjTitleLabel, 'default' => $motopressCELang->CETabObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CETabObjContentLabel, 'default' => $motopressCELang->CETabObjContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CETabObjActiveLabel, 'default' => 'false', 'description' => $motopressCELang->CETabObjActiveDesc)), null, MPCEObject::ENCLOSED, null, false); $accordionObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion', $motopressCELang->CEAccordionObjName, 'accordion.png', array('accordionItems' => array('type' => 'group', 'items' => array('label' => array('default' => $motopressCELang->CEAccordionItemObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CEAccordionObjName)), 'disabled' => 'true'), 'style' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjStyleLabel, 'default' => 'light', 'list' => array('light' => $motopressCELang->CEAccordionObjStyleListLight, 'dark' => $motopressCELang->CEAccordionObjStyleListDark), 'disabled' => 'true')), null, MPCEObject::ENCLOSED); $accordionItemObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion_item', $motopressCELang->CEAccordionItemObjName, null, array('title' => array('type' => 'text', 'label' => $motopressCELang->CEAccordionItemObjTitleLabel, 'default' => $motopressCELang->CEAccordionItemObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CEAccordionItemObjContentLabel, 'default' => $motopressCELang->CEAccordionItemObjContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CEAccordionItemObjActiveLabel, 'default' => 'false', 'description' => $motopressCELang->CEAccordionItemObjActiveDesc)), null, MPCEObject::ENCLOSED, null, false); $postsGridObj = new MPCEObject(MPCEShortcode::PREFIX . 'posts_grid', $motopressCELang->CEPostsGridObjName, 'posts-grid.png', array('post_type' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjPostTypeLabel, 'description' => $motopressCELang->CEPostsGridObjPostTypeDesc, 'list' => MPCEShortcode::getPostTypes()), 'columns' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjColumnsLabel, 'default' => 1, 'list' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6)), 'posts_per_page' => array('type' => 'spinner', 'label' => $motopressCELang->CEPostsGridObjPostsPerPageLabel, 'default' => 3, 'min' => 1, 'max' => 40, 'step' => 1, 'disabled' => 'true'), 'posts_order' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjSortOrder, 'default' => 'DESC', 'list' => array('ASC' => $motopressCELang->CEPostsGridObjSortOrderAscending, 'DESC' => $motopressCELang->CEPostsGridObjSortOrderDescending), 'disabled' => 'true'), 'template' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjTemplateLabel, 'list' => MPCEShortcode::getPostsGridTemplatesList()), 'posts_gap' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjPostsGapLabel, 'default' => 30, 'min' => 0, 'max' => 100, 'step' => 10), 'show_featured_image' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowFeaturedImage, 'default' => 'true'), 'title_tag' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjTitleTag, 'default' => 'h2', 'list' => array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'hide' => $motopressCELang->CEPostsGridObjTitleTagNone)), 'show_date_comments' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowDateComments, 'default' => 'true'), 'show_content' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjShowContent, 'default' => 'short', 'list' => array('short' => $motopressCELang->CEPostsGridObjShowContentShort, 'full' => $motopressCELang->CEPostsGridObjShowContentFull, 'excerpt' => $motopressCELang->CEPostsGridObjShowContentExcerpt, 'hide' => $motopressCELang->CEPostsGridObjShowContentNone)), 'short_content_length' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjShortContentLength, 'default' => 200, 'min' => 0, 'max' => 1000, 'step' => 20, 'dependency' => array('parameter' => 'show_content', 'value' => 'short')), 'read_more_text' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjReadMoreTextLabel, 'default' => $motopressCELang->CEPostsGridObjReadMoreText), 'pagination' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowPagination, 'default' => 'false')), null); /* Groups */ $gridGroup = new MPCEGroup(); $gridGroup->setId('grid'); $gridGroup->setName($motopressCELang->CEGridGroupName); $gridGroup->addObject(array($rowObj, $rowInnerObj, $spanObj, $spanInnerObj)); $textGroup = new MPCEGroup(); $textGroup->setId('text'); $textGroup->setName($motopressCELang->CETextGroupName); $textGroup->setIcon('text.png'); $textGroup->setPosition(0); $textGroup->addObject(array($textObj, $headingObj, $codeObj, $quotesObj, $membersObj)); $imageGroup = new MPCEGroup(); $imageGroup->setId('image'); $imageGroup->setName($motopressCELang->CEImageGroupName); $imageGroup->setIcon('image.png'); $imageGroup->setPosition(1); $imageGroup->addObject(array($imageObj, $imageSlider)); $buttonGroup = new MPCEGroup(); $buttonGroup->setId('button'); $buttonGroup->setName($motopressCELang->CEButtonGroupName); $buttonGroup->setIcon('button.png'); $buttonGroup->setPosition(2); $buttonGroup->addObject(array($buttonObj, $socialsObj)); $mediaGroup = new MPCEGroup(); $mediaGroup->setId('media'); $mediaGroup->setName($motopressCELang->CEMediaGroupName); $mediaGroup->setIcon('media.png'); $mediaGroup->setPosition(3); $mediaGroup->addObject(array($videoObj, $wpAudioObj)); $otherGroup = new MPCEGroup(); $otherGroup->setId('other'); $otherGroup->setName($motopressCELang->CEOtherGroupName); $otherGroup->setIcon('other.png'); $otherGroup->setPosition(4); $otherGroup->addObject(array($gMapObj, $spaceObj, $embedObj, $googleChartsObj, $tabsObj, $tabObj, $accordionObj, $accordionItemObj, $tableObj, $postsGridObj)); $wordpressGroup = new MPCEGroup(); $wordpressGroup->setId('wordpress'); $wordpressGroup->setName($motopressCELang->CEWordPressGroupName); $wordpressGroup->setIcon('wordpress.png'); $wordpressGroup->setPosition(5); $wordpressGroup->addObject(array($wpArchiveObj, $wpCalendarObj, $wpCategoriesObj, $wpCustomMenuObj, $wpMetaObj, $wpPagesObj, $wpPostsObj, $wpRecentCommentsObj, $wpRSSObj, $wpSearchObj, $wpTagCloudObj, $wpWidgetsAreaObj)); $this->addGroup(array($gridGroup, $textGroup, $imageGroup, $buttonGroup, $mediaGroup, $otherGroup, $wordpressGroup)); $this->setSkippedGroups(array($gridGroup)); }
/** * @global stdClass $motopressCELang */ public function __construct() { global $motopressCELang; self::$isAjaxRequest = $this->isAjaxRequest(); /* $this->globalPredefinedClasses = array( 'hidden' => array( 'label' => $motopressCELang->CEHidden, 'values' => array( 'phone' => array( 'class' => 'mp-hidden-phone', 'label' => $motopressCELang->CEHiddenPhone ), 'tablet' => array( 'class' => 'mp-hidden-tablet', 'label' => $motopressCELang->CEHiddenTablet ), 'desktop' => array( 'class' => 'mp-hidden-desktop', 'label' => $motopressCELang->CEHiddenDesktop ) ) ), 'align' => array( 'label' => 'Align', 'values' => array( 'left' => array( 'class' => 'motopress-text-align-left', 'label' => 'Left' ), 'center' => array( 'class' => 'motopress-text-align-center', 'label' => 'Center' ), 'right' => array( 'class' => 'motopress-text-align-right', 'label' => 'Right' ) ) ) ); */ $padding = array('label' => 'Padding', 'values' => array('padding-5' => array('class' => 'motopress-padding-5', 'label' => 'Padding 5'), 'padding-10' => array('class' => 'motopress-padding-10', 'label' => 'Padding 10'), 'padding-15' => array('class' => 'motopress-padding-15', 'label' => 'Padding 15'), 'padding-25' => array('class' => 'motopress-padding-25', 'label' => 'Padding 25', 'disabled' => true), 'padding-50' => array('class' => 'motopress-padding-50', 'label' => 'Padding 50', 'disabled' => true), 'padding-100' => array('class' => 'motopress-padding-100', 'label' => 'Padding 100', 'disabled' => true), 'vertical-padding-100' => array('class' => 'motopress-vetical-padding-100', 'label' => 'Vertical Padding 100', 'disabled' => true), 'vertical-padding-150' => array('class' => 'motopress-vetical-padding-150', 'label' => 'Vertical Padding 150', 'disabled' => true), 'vertical-padding-200' => array('class' => 'motopress-vetical-padding-200', 'label' => 'Vertical Padding 200', 'disabled' => true))); $backgroundColor = array('label' => 'Background Color', 'values' => array('blue' => array('class' => 'motopress-bg-color-blue', 'label' => 'Blue', 'disabled' => true), 'dark' => array('class' => 'motopress-bg-color-dark', 'label' => 'Dark', 'disabled' => true), 'gray' => array('class' => 'motopress-bg-color-gray', 'label' => 'Gray', 'disabled' => true), 'green' => array('class' => 'motopress-bg-color-green', 'label' => 'Green', 'disabled' => true), 'red' => array('class' => 'motopress-bg-color-red', 'label' => 'Red', 'disabled' => true), 'silver' => array('class' => 'motopress-bg-color-silver', 'label' => 'Silver'), 'white' => array('class' => 'motopress-bg-color-white', 'label' => 'White'), 'yellow' => array('class' => 'motopress-bg-color-yellow', 'label' => 'Yellow', 'disabled' => true))); $style = array('label' => 'Style', 'allowMultiple' => true, 'values' => array('bg-alpha-75' => array('class' => 'motopress-bg-alpha-75', 'label' => 'Transparent'), 'border' => array('class' => 'motopress-border', 'label' => 'Border'), 'border-radius' => array('class' => 'motopress-border-radius', 'label' => 'Rounded'), 'shadow' => array('class' => 'motopress-shadow', 'label' => 'Shadow'), 'shadow-bottom' => array('class' => 'motopress-shadow-bottom', 'label' => 'Bottom Shadow', 'disabled' => true), 'text-shadow' => array('class' => 'motopress-text-shadow', 'label' => 'Text Shadow'))); $border = array('label' => 'Border Side', 'allowMultiple' => true, 'values' => array('border-top' => array('class' => 'motopress-border-top', 'label' => 'Border Top', 'disabled' => true), 'border-right' => array('class' => 'motopress-border-right', 'label' => 'Border Right'), 'border-bottom' => array('class' => 'motopress-border-bottom', 'label' => 'Border Bottom'), 'border-left' => array('class' => 'motopress-border-left', 'label' => 'Border Left', 'disabled' => true))); $textColor = array('label' => 'Text Color', 'values' => array('color-light' => array('class' => 'motopress-color-light', 'label' => 'Light Text'), 'color-dark' => array('class' => 'motopress-color-dark', 'label' => 'Dark Text'))); $rowPredefinedStyles = array('fullwidth' => array('class' => 'mp-row-fullwidth', 'label' => 'Full Width'), 'padding' => $padding, 'background-color' => $backgroundColor, 'style' => $style, 'border' => $border, 'color' => $textColor); $spanPredefinedStyles = array('padding' => $padding, 'background-color' => $backgroundColor, 'style' => $style, 'border' => $border, 'color' => $textColor); /* Objects */ //grid $rowParameters = array('bg_media_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CERowObjTypeBGLabel, 'description' => $motopressCELang->CERowObjTypeBGDesc, 'list' => array('disabled' => $motopressCELang->CERowObjTypeBGDisabled, 'video' => $motopressCELang->CERowObjTypeBGMP4, 'youtube' => $motopressCELang->CERowObjTypeBGYoutube, 'parallax' => $motopressCELang->CERowObjTypeBGParallax)), 'bg_video_youtube' => array('type' => 'video', 'label' => $motopressCELang->CERowObjBGYoutubeLabel, 'default' => MPCEShortcode::DEFAULT_YOUTUBE_BG, 'description' => $motopressCELang->CERowObjBGYoutubeDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_cover' => array('type' => 'image', 'label' => $motopressCELang->CERowObjBGVideoCoverImageLabel, 'description' => $motopressCELang->CERowObjBGVideoCoverImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_repeat' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoRepeatLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_youtube_mute' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoMuteLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'youtube'), 'disabled' => 'true'), 'bg_video_webm' => array('type' => 'media-video', 'legend' => $motopressCELang->CERowObjBGVideoWEBMLegend, 'label' => $motopressCELang->CERowObjBGVideoWEBMLabel, 'default' => MPCEShortcode::DEFAULT_VIDEO_BG_WEBM, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_mp4' => array('type' => 'media-video', 'label' => $motopressCELang->CERowObjBGVideoMP4Label, 'default' => MPCEShortcode::DEFAULT_VIDEO_BG_MP4, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_ogg' => array('type' => 'media-video', 'label' => $motopressCELang->CERowObjBGVideoOGGLabel, 'default' => MPCEShortcode::DEFAULT_VIDEO_BG_OGG, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_cover' => array('type' => 'image', 'label' => $motopressCELang->CERowObjBGVideoCoverImageLabel, 'description' => $motopressCELang->CERowObjBGVideoCoverImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_repeat' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoRepeatLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'bg_video_mute' => array('type' => 'checkbox', 'label' => $motopressCELang->CERowObjBGVideoMuteLabel, 'default' => 'true', 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'video'), 'disabled' => 'true'), 'parallax_image' => array('type' => 'image', 'label' => $motopressCELang->CERowObjParallaxImageLabel, 'description' => $motopressCELang->CERowObjParallaxImageDesc, 'dependency' => array('parameter' => 'bg_media_type', 'value' => 'parallax'), 'disabled' => 'true')); $rowObj = new MPCEObject(MPCEShortcode::PREFIX . 'row', $motopressCELang->CERowObjName, null, $rowParameters, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $rowObj->addStyle(array('mp_style_classes' => array('predefined' => $rowPredefinedStyles))); $rowInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'row_inner', $motopressCELang->CERowInnerObjName, null, $rowParameters, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $rowInnerObj->addStyle(array('mp_style_classes' => array('predefined' => $rowPredefinedStyles))); $spanObj = new MPCEObject(MPCEShortcode::PREFIX . 'span', $motopressCELang->CESpanObjName, null, null, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $spanObj->addStyle(array('mp_style_classes' => array('predefined' => $spanPredefinedStyles))); $spanInnerObj = new MPCEObject(MPCEShortcode::PREFIX . 'span_inner', $motopressCELang->CESpanInnerObjName, null, null, null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE); $spanInnerObj->addStyle(array('mp_style_classes' => array('predefined' => $spanPredefinedStyles))); //text $textObj = new MPCEObject(MPCEShortcode::PREFIX . 'text', $motopressCELang->CETextObjName, 'text.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CETextObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CETextObjName)), 20, MPCEObject::ENCLOSED); $headingObj = new MPCEObject(MPCEShortcode::PREFIX . 'heading', $motopressCELang->CEHeadingObjName, 'heading.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CEHeadingObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CEHeadingObjName)), 10, MPCEObject::ENCLOSED); $codeObj = new MPCEObject(MPCEShortcode::PREFIX . 'code', $motopressCELang->CECodeObjName, 'wordpress.png', array('button' => array('type' => 'editor-button', 'label' => '', 'default' => '', 'description' => $motopressCELang->CETextObjButtonDesc . ' ' . $motopressCELang->CECodeObjName, 'text' => $motopressCELang->edit . ' ' . $motopressCELang->CECodeObjName)), 30, MPCEObject::ENCLOSED); //image $imageObj = new MPCEObject(MPCEShortcode::PREFIX . 'image', $motopressCELang->CEImageObjName, 'image.png', array('id' => array('type' => 'image', 'label' => $motopressCELang->CEImageObjSrcLabel, 'default' => '', 'description' => $motopressCELang->CEImageObjSrcDesc, 'autoOpen' => 'true'), 'size' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjSizeLabel, 'default' => 'full', 'disabled' => 'true', 'list' => array('full' => $motopressCELang->CEFull, 'large' => $motopressCELang->CELarge, 'medium' => $motopressCELang->CEMedium, 'thumbnail' => $motopressCELang->CEThumbnail, 'custom' => $motopressCELang->CECustom)), 'custom_size' => array('type' => 'text', 'description' => $motopressCELang->CEImageObjCustomSizeLabel, 'dependency' => array('parameter' => 'size', 'value' => 'custom')), 'link_type' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageObjLinkLabel, 'default' => 'custom_url', 'list' => array('custom_url' => $motopressCELang->CECustomURL, 'media_file' => $motopressCELang->CEMediaFile, 'lightbox' => $motopressCELang->CELightbox)), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEImageObjLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEImageObjLinkDesc, 'disabled' => 'true', 'dependency' => array('parameter' => 'link_type', 'value' => 'custom_url')), 'rel' => array('type' => 'text', 'label' => $motopressCELang->CEImageObjRelLabel, 'default' => '', 'dependency' => array('parameter' => 'link_type', 'value' => 'media_file')), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEButtonObjTargetLabel, 'default' => 'false', 'disabled' => 'true'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 10); $imageObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-image-obj-basic', 'label' => 'Image'), 'selector' => '> img'))); $imageSlider = new MPCEObject(MPCEShortcode::PREFIX . 'image_slider', $motopressCELang->CEImageSliderObjName, 'image-slider.png', array('ids' => array('type' => 'multi-images', 'label' => $motopressCELang->CEImageSliderObjIdsLabel, 'default' => '', 'description' => $motopressCELang->CEImageSliderObjIdsDesc, 'text' => $motopressCELang->CEImageSliderObjIdsText, 'autoOpen' => 'true'), 'animation' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEImageSliderObjAnimationLabel, 'default' => 'fade', 'description' => $motopressCELang->CEImageSliderObjAnimationDesc, 'list' => array('fade' => $motopressCELang->CEImageSliderObjAnimationFade, 'slide' => $motopressCELang->CEImageSliderObjAnimationSlide), 'disabled' => 'true'), 'smooth_height' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjSmoothHeightLabel, 'default' => 'false', 'description' => $motopressCELang->CEImageSliderObjSmoothHeightDesc, 'dependency' => array('parameter' => 'animation', 'value' => 'slide'), 'disabled' => 'true'), 'slideshow' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjAutoplayLabel, 'default' => 'true', 'description' => $motopressCELang->CEImageSliderObjAutoplayDesc, 'disabled' => 'true'), 'slideshow_speed' => array('type' => 'slider', 'label' => $motopressCELang->CEImageSliderObjSlideshowSpeedLabel, 'default' => 7, 'min' => 1, 'max' => 20, 'dependency' => array('parameter' => 'slideshow', 'value' => 'true'), 'disabled' => 'true'), 'animation_speed' => array('type' => 'slider', 'label' => $motopressCELang->CEImageSliderObjAnimationSpeedLabel, 'default' => 600, 'min' => 200, 'max' => 10000, 'step' => 200, 'disabled' => 'true'), 'control_nav' => array('type' => 'checkbox', 'label' => $motopressCELang->CEImageSliderObjControlNavLabel, 'default' => 'true', 'disabled' => 'true')), 20); $imageSlider->addStyle(array('mp_style_classes' => array('selector' => '> ul:first-of-type'))); //button $buttonObj = new MPCEObject(MPCEShortcode::PREFIX . 'button', $motopressCELang->CEButtonObjName, 'button.png', array('text' => array('type' => 'text', 'label' => $motopressCELang->CEButtonObjTextLabel, 'default' => $motopressCELang->CEButtonObjName), 'link' => array('type' => 'link', 'label' => $motopressCELang->CEButtonObjLinkLabel, 'default' => '#', 'description' => $motopressCELang->CEButtonObjLinkDesc), 'target' => array('type' => 'checkbox', 'label' => $motopressCELang->CEButtonObjTargetLabel, 'default' => 'false', 'disabled' => 'true'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 10); $buttonObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-btn', 'label' => $motopressCELang->CEButtonObjBasicClassLabel), 'predefined' => array('color' => array('label' => $motopressCELang->CEButtonObjColorLabel, 'values' => array('silver' => array('class' => 'motopress-btn-color-silver', 'label' => $motopressCELang->CESilver), 'red' => array('class' => 'motopress-btn-color-red', 'label' => $motopressCELang->CERed), 'pink-dreams' => array('class' => 'motopress-btn-color-pink-dreams', 'label' => $motopressCELang->CEPinkDreams), 'warm' => array('class' => 'motopress-btn-color-warm', 'label' => $motopressCELang->CEWarm), 'hot-summer' => array('class' => 'motopress-btn-color-hot-summer', 'label' => $motopressCELang->CEHotSummer), 'olive-garden' => array('class' => 'motopress-btn-color-olive-garden', 'label' => $motopressCELang->CEOliveGarden), 'green-grass' => array('class' => 'motopress-btn-color-green-grass', 'label' => $motopressCELang->CEGreenGrass), 'skyline' => array('class' => 'motopress-btn-color-skyline', 'label' => $motopressCELang->CESkyline), 'aqua-blue' => array('class' => 'motopress-btn-color-aqua-blue', 'label' => $motopressCELang->CEAquaBlue), 'violet' => array('class' => 'motopress-btn-color-violet', 'label' => $motopressCELang->CEViolet), 'dark-grey' => array('class' => 'motopress-btn-color-dark-grey', 'label' => $motopressCELang->CEDarkGrey), 'black' => array('class' => 'motopress-btn-color-black', 'label' => $motopressCELang->CEBlack))), 'size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('mini' => array('class' => 'motopress-btn-size-mini', 'label' => $motopressCELang->CEMini), 'small' => array('class' => 'motopress-btn-size-small', 'label' => $motopressCELang->CESmall), 'middle' => array('class' => 'motopress-btn-size-middle', 'label' => $motopressCELang->CEMiddle), 'large' => array('class' => 'motopress-btn-size-large', 'label' => $motopressCELang->CELarge))), 'rounded' => array('class' => 'motopress-btn-rounded', 'label' => $motopressCELang->CERounded)), 'default' => array('motopress-btn-color-silver', 'motopress-btn-size-middle', 'motopress-btn-rounded'), 'selector' => '> a'))); $accordionObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion', $motopressCELang->CEAccordionObjName, 'accordion.png', array('accordionItems' => array('type' => 'group', 'items' => array('label' => array('default' => $motopressCELang->CEAccordionItemObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CEAccordionObjName)), 'disabled' => 'true')), 11, MPCEObject::ENCLOSED); $accordionObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-accordion', 'label' => $motopressCELang->CEAccordionObjBasicClassLabel), 'predefined' => array('style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('light' => array('class' => 'motopress-accordion-light', 'label' => $motopressCELang->CEAccordionObjStyleListLight), 'dark' => array('class' => 'motopress-accordion-dark', 'label' => $motopressCELang->CEAccordionObjStyleListDark, 'disabled' => true)))), 'default' => array('motopress-accordion-light')))); $accordionItemObj = new MPCEObject(MPCEShortcode::PREFIX . 'accordion_item', $motopressCELang->CEAccordionItemObjName, null, array('title' => array('type' => 'text', 'label' => $motopressCELang->CEAccordionItemObjTitleLabel, 'default' => $motopressCELang->CEAccordionItemObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CEAccordionItemObjContentLabel, 'default' => $motopressCELang->CEContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CEActive, 'default' => 'false', 'description' => strtr($motopressCELang->CEActiveDesc, array('%name%' => $motopressCELang->CEAccordionItemObjName)))), null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE, false); $tabsObj = new MPCEObject(MPCEShortcode::PREFIX . 'tabs', $motopressCELang->CETabsObjName, 'tabs.png', array('tabs' => array('type' => 'group', 'items' => array('label' => array('default' => $motopressCELang->CETabObjTitleLabel, 'parameter' => 'title'), 'count' => 2), 'text' => strtr($motopressCELang->CEAddNewItem, array('%name%' => $motopressCELang->CETabObjName)), 'disabled' => 'true'), 'padding' => array('type' => 'slider', 'label' => $motopressCELang->CETabsObjPaddingLabel, 'default' => 20, 'min' => 0, 'max' => 50, 'step' => 10)), 20, MPCEObject::ENCLOSED); $tabsObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-tabs-basic', 'label' => $motopressCELang->CETabsObjBasicClassLabel), 'selector' => '> div'))); $tabObj = new MPCEObject(MPCEShortcode::PREFIX . 'tab', $motopressCELang->CETabObjName, null, array('id' => array('type' => 'text-hidden'), 'title' => array('type' => 'text', 'label' => $motopressCELang->CETabObjTitleLabel, 'default' => $motopressCELang->CETabObjTitleLabel), 'content' => array('type' => 'longtext-tinymce', 'label' => $motopressCELang->CETabObjContentLabel, 'default' => $motopressCELang->CEContentDefault, 'text' => $motopressCELang->CEOpenInWPEditor, 'saveInContent' => 'true'), 'active' => array('type' => 'group-checkbox', 'label' => $motopressCELang->CEActive, 'default' => 'false', 'description' => strtr($motopressCELang->CEActiveDesc, array('%name%' => $motopressCELang->CETabObjName)))), null, MPCEObject::ENCLOSED, MPCEObject::RESIZE_NONE, false); $socialsObj = new MPCEObject(MPCEShortcode::PREFIX . 'social_buttons', $motopressCELang->CESocialsObjName, 'social-buttons.png', array('align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'motopress-text-align-left', 'list' => array('motopress-text-align-left' => $motopressCELang->CELeft, 'motopress-text-align-center' => $motopressCELang->CECenter, 'motopress-text-align-right' => $motopressCELang->CERight))), 20, MPCEObject::ENCLOSED); $socialsObj->addStyle(array('mp_style_classes' => array('predefined' => array('size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('normal' => array('class' => 'motopress-buttons-32x32', 'label' => $motopressCELang->CESocialsObjSizeNormal), 'large' => array('class' => 'motopress-buttons-64x64', 'label' => $motopressCELang->CESocialsObjSizeLarge))), 'style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('plain' => array('class' => 'motopress-buttons-square', 'label' => $motopressCELang->CESocialsObjStyleSquare), 'rounded' => array('class' => 'motopress-buttons-rounded', 'label' => $motopressCELang->CERounded), 'circular' => array('class' => 'motopress-buttons-circular', 'label' => $motopressCELang->CESocialsObjStyleCircular), 'volume' => array('class' => 'motopress-buttons-volume', 'label' => $motopressCELang->CESocialsObjStyleVolume)))), 'default' => array('motopress-buttons-32x32', 'motopress-buttons-square')))); $socialProfileObj = new MPCEObject(MPCEShortcode::PREFIX . 'social_profile', $motopressCELang->CESocialProfileObjName, 'social-profile.png', array('facebook' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjFacebookLabel, 'default' => 'https://www.facebook.com/motopressapp'), 'google' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjGoogleLabel, 'default' => 'https://plus.google.com/+Getmotopress/posts'), 'twitter' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjTwitterLabel, 'default' => 'https://twitter.com/motopressapp'), 'pinterest' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjPinterestLabel, 'default' => 'http://www.pinterest.com/motopress/'), 'linkedin' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjLinkedinLabel), 'flickr' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjFlickrLabel), 'vk' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjVkLabel), 'delicious' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjDeliciousLabel), 'youtube' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjYoutubeLabel, 'default' => 'https://www.youtube.com/channel/UCtkDYmIQ5Lv_z8KbjJ2lpFQ'), 'rss' => array('type' => 'text', 'label' => $motopressCELang->CESocialProfileObjRssLabel, 'default' => 'http://www.getmotopress.com/feed/'), 'align' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEObjAlignLabel, 'default' => 'left', 'list' => array('left' => $motopressCELang->CELeft, 'center' => $motopressCELang->CECenter, 'right' => $motopressCELang->CERight))), 30); $socialProfileObj->addStyle(array('mp_style_classes' => array('predefined' => array('size' => array('label' => $motopressCELang->CEObjSizeLabel, 'values' => array('normal' => array('class' => 'motopress-buttons-32x32', 'label' => $motopressCELang->CESocialsObjSizeNormal), 'large' => array('class' => 'motopress-buttons-64x64', 'label' => $motopressCELang->CESocialsObjSizeLarge))), 'style' => array('label' => $motopressCELang->CEObjStyleLabel, 'values' => array('plain' => array('class' => 'motopress-buttons-square', 'label' => $motopressCELang->CESocialsObjStyleSquare), 'rounded' => array('class' => 'motopress-buttons-rounded', 'label' => $motopressCELang->CERounded), 'circular' => array('class' => 'motopress-buttons-circular', 'label' => $motopressCELang->CESocialsObjStyleCircular), 'volume' => array('class' => 'motopress-buttons-volume', 'label' => $motopressCELang->CESocialsObjStyleVolume)))), 'default' => array('motopress-buttons-32x32', 'motopress-buttons-square')))); //media $videoObj = new MPCEObject(MPCEShortcode::PREFIX . 'video', $motopressCELang->CEVideoObjName, 'video.png', array('src' => array('type' => 'video', 'label' => $motopressCELang->CEVideoObjSrcLabel, 'default' => MPCEShortcode::DEFAULT_VIDEO, 'description' => $motopressCELang->CEVideoObjSrcDesc)), 10); $videoObj->addStyle(array('mp_style_classes' => array('selector' => '> iframe'))); // WP Audio $wpAudioObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_audio', $motopressCELang->CEwpAudio, 'player.png', array('source' => array('type' => 'select', 'label' => $motopressCELang->CEwpAudioSourceTitle, 'description' => $motopressCELang->CEwpAudioSourceDesc, 'list' => array('library' => $motopressCELang->CEwpAudioSourceLibrary, 'external' => $motopressCELang->CEwpAudioSourceURL), 'default' => 'external'), 'id' => array('type' => 'audio', 'label' => $motopressCELang->CEwpAudioIdTitle, 'description' => $motopressCELang->CEwpAudioIdDescription, 'default' => '', 'dependency' => array('parameter' => 'source', 'value' => 'library')), 'url' => array('type' => 'text', 'label' => $motopressCELang->CEwpAudioUrlTitle, 'description' => $motopressCELang->CEwpAudioUrlDescription, 'default' => 'http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3', 'dependency' => array('parameter' => 'source', 'value' => 'external')), 'autoplay' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioAutoplayTitle, 'description' => $motopressCELang->CEwpAudioAutoplayDesc, 'default' => ''), 'loop' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpAudioLoopTitle, 'description' => $motopressCELang->CEwpAudioLoopDesc, 'default' => '')), 20, MPCEObject::ENCLOSED); //other $gMapObj = new MPCEObject(MPCEShortcode::PREFIX . 'gmap', $motopressCELang->CEGoogleMapObjName, 'map.png', array('address' => array('type' => 'text', 'label' => $motopressCELang->CEGoogleMapObjAddressLabel, 'default' => 'Sidney, New South Wales, Australia', 'description' => $motopressCELang->CEGoogleMapObjAddressDesc), 'zoom' => array('type' => 'slider', 'label' => $motopressCELang->CEGoogleMapObjZoomLabel, 'default' => 13, 'min' => 0, 'max' => 20)), 60, null, MPCEObject::RESIZE_ALL); $gMapObj->addStyle(array('mp_style_classes' => array('selector' => '> iframe'))); $spaceObj = new MPCEObject(MPCEShortcode::PREFIX . 'space', $motopressCELang->CESpaceObjName, 'space.png', null, 50, null, MPCEObject::RESIZE_ALL); $embedObj = new MPCEObject(MPCEShortcode::PREFIX . 'embed', $motopressCELang->CEEmbedObjName, 'code.png', array('data' => array('type' => 'longtext64', 'label' => $motopressCELang->CEEmbedObjPasteCode, 'default' => 'PGk+UGFzdGUgeW91ciBjb2RlIGhlcmUuPC9pPg==', 'description' => $motopressCELang->CEEmbedObjPasteCodeDescription), 'fill_space' => array('type' => 'checkbox', 'label' => $motopressCELang->CEEmbedObjFill, 'default' => 'true', 'description' => $motopressCELang->CEEmbedObjFillDescription)), 40); $quotesObj = new MPCEObject(MPCEShortcode::PREFIX . 'quote', $motopressCELang->CEQuotesObjName, 'quotes.png', array('cite' => array('type' => 'text', 'label' => $motopressCELang->CEQuotesObjCiteLabel, 'default' => 'John Smith', 'description' => $motopressCELang->CEQuotesObjCiteDesc), 'cite_url' => array('type' => 'link', 'label' => $motopressCELang->CEQuotesObjUrlLabel, 'default' => '#', 'description' => $motopressCELang->CEQuotesObjUrlDesc), 'quote_content' => array('type' => 'longtext', 'label' => $motopressCELang->CEQuotesObjContentLabel, 'default' => 'Lorem ipsum dolor sit amet.')), 40, MPCEObject::ENCLOSED); $membersObj = new MPCEObject(MPCEShortcode::PREFIX . 'members_content', $motopressCELang->CEMembersObjName, 'members.png', array('message' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjMessageLabel, 'default' => $motopressCELang->CEMembersObjMessageDefault, 'description' => $motopressCELang->CEMembersObjMessageDesc), 'login_text' => array('type' => 'text', 'label' => $motopressCELang->CEMembersObjLoginTextLabel, 'default' => $motopressCELang->CEMembersObjLoginTextDefault, 'description' => $motopressCELang->CEMembersObjLoginTextDesc), 'members_content' => array('type' => 'longtext', 'label' => $motopressCELang->CEMembersObjContentLabel, 'default' => $motopressCELang->CEMembersObjContentValue)), 50, MPCEObject::ENCLOSED); $googleChartsObj = new MPCEObject(MPCEShortcode::PREFIX . 'google_chart', $motopressCELang->CEGoogleChartsObjName, 'chart.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEObjTitleLabel, 'default' => 'Company Performance'), 'type' => array('type' => 'select', 'label' => $motopressCELang->CEGoogleChartsObjTypeLabel, 'description' => $motopressCELang->CEGoogleChartsObjTypeDesc, 'default' => 'ColumnChart', 'list' => array('ColumnChart' => $motopressCELang->CEGoogleChartsObjTypeListColumn, 'BarChart' => $motopressCELang->CEGoogleChartsObjTypeListBar, 'AreaChart' => $motopressCELang->CEGoogleChartsObjTypeListArea, 'SteppedAreaChart' => $motopressCELang->CEGoogleChartsObjTypeListStepped, 'PieChart' => $motopressCELang->CEGoogleChartsObjTypeListPie, 'PieChart3D' => $motopressCELang->CEGoogleChartsObjTypeList3D, 'LineChart' => $motopressCELang->CEGoogleChartsObjTypeListLine, 'Histogram' => $motopressCELang->CEGoogleChartsObjTypeListHistogram), 'disabled' => 'true'), 'donut' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGoogleChartsObjDonutLabel, 'default' => '', 'dependency' => array('parameter' => 'type', 'value' => 'PieChart')), 'colors' => array('type' => 'text', 'label' => $motopressCELang->CEGoogleChartsObjColorsLabel, 'description' => $motopressCELang->CEGoogleChartsObjColorsDesc, 'disabled' => 'true'), 'transparency' => array('type' => 'checkbox', 'label' => $motopressCELang->CEGoogleChartsObjTransparencyLabel, 'default' => 'false', 'disabled' => 'true'), 'table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'description' => $motopressCELang->CEGoogleChartsObjDataDesc, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'saveInContent' => 'true')), 30, MPCEObject::ENCLOSED, MPCEObject::RESIZE_ALL); $tableObj = new MPCEObject(MPCEShortcode::PREFIX . 'table', $motopressCELang->CETableObjName, 'table.png', array('table' => array('type' => 'longtext-table', 'label' => $motopressCELang->CEObjTableDataLabel, 'default' => 'Year,Sales,Expenses<br />2004,1000,400<br />2005,1170,460<br />2006,660,1120<br />2007,1030,540', 'description' => $motopressCELang->CEObjTableDataDesc, 'saveInContent' => 'true')), 10, MPCEObject::ENCLOSED); $tableObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-table', 'label' => $motopressCELang->CETableObjBasicClassLabel), 'predefined' => array('style' => array('label' => $motopressCELang->CEObjStyleLabel, 'allowMultiple' => true, 'values' => array('silver' => array('class' => 'motopress-table-style-silver', 'label' => $motopressCELang->CETableObjListLight, 'disabled' => true), 'left' => array('class' => 'motopress-table-first-col-left', 'label' => $motopressCELang->CETableObjFirstColLeft)))), 'default' => array('motopress-table-first-col-left'), 'selector' => '> table'))); $postsGridObj = new MPCEObject(MPCEShortcode::PREFIX . 'posts_grid', $motopressCELang->CEPostsGridObjName, 'posts-grid.png', array('post_type' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjPostTypeLabel, 'description' => $motopressCELang->CEPostsGridObjPostTypeDesc, 'list' => MPCEShortcode::getPostTypes()), 'columns' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjColumnsLabel, 'default' => 1, 'list' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6)), 'posts_per_page' => array('type' => 'spinner', 'label' => $motopressCELang->CEPostsGridObjPostsPerPageLabel, 'default' => 3, 'min' => 1, 'max' => 40, 'step' => 1, 'disabled' => 'true'), 'posts_order' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjSortOrder, 'default' => 'DESC', 'list' => array('ASC' => $motopressCELang->CEPostsGridObjSortOrderAscending, 'DESC' => $motopressCELang->CEPostsGridObjSortOrderDescending), 'disabled' => 'true'), 'template' => array('type' => 'select', 'label' => $motopressCELang->CEPostsGridObjTemplateLabel, 'list' => MPCEShortcode::getPostsGridTemplatesList()), 'posts_gap' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjPostsGapLabel, 'default' => 30, 'min' => 0, 'max' => 100, 'step' => 10), 'show_featured_image' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowFeaturedImage, 'default' => 'true'), 'title_tag' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjTitleTag, 'default' => 'h2', 'list' => array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'hide' => $motopressCELang->CEPostsGridObjTitleTagNone)), 'show_date_comments' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowDateComments, 'default' => 'true'), 'show_content' => array('type' => 'radio-buttons', 'label' => $motopressCELang->CEPostsGridObjShowContent, 'default' => 'short', 'list' => array('short' => $motopressCELang->CEPostsGridObjShowContentShort, 'full' => $motopressCELang->CEPostsGridObjShowContentFull, 'excerpt' => $motopressCELang->CEPostsGridObjShowContentExcerpt, 'hide' => $motopressCELang->CEPostsGridObjShowContentNone)), 'short_content_length' => array('type' => 'slider', 'label' => $motopressCELang->CEPostsGridObjShortContentLength, 'default' => 200, 'min' => 0, 'max' => 1000, 'step' => 20, 'dependency' => array('parameter' => 'show_content', 'value' => 'short')), 'read_more_text' => array('type' => 'text', 'label' => $motopressCELang->CEPostsGridObjReadMoreTextLabel, 'default' => $motopressCELang->CEPostsGridObjReadMoreText), 'pagination' => array('type' => 'checkbox', 'label' => $motopressCELang->CEPostsGridObjShowPagination, 'default' => 'false'))); $postsGridObj->addStyle(array('mp_style_classes' => array('basic' => array('class' => 'motopress-posts-grid-basic', 'label' => $motopressCELang->CEPostsGridObjBasicClassLabel)))); //wordpress // WP Widgets Area global $wp_registered_sidebars; $wpWidgetsArea_array = array(); $wpWidgetsArea_default = ''; if ($wp_registered_sidebars) { foreach ($wp_registered_sidebars as $sidebar) { if (empty($wpWidgetsArea_default)) { $wpWidgetsArea_default = $sidebar['id']; } $wpWidgetsArea_array[$sidebar['id']] = $sidebar['name']; } } else { $wpWidgetsArea_array['no'] = $motopressCELang->CEwpWidgetsAreaNoSidebars; } $wpWidgetsAreaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_widgets_area', $motopressCELang->CEwpWidgetsArea, 'sidebar.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => '', 'description' => $motopressCELang->CEwpWidgetsAreaDescription), 'sidebar' => array('type' => 'select', 'label' => $motopressCELang->CEwpWidgetsAreaSelect, 'default' => $wpWidgetsArea_default, 'description' => '', 'list' => $wpWidgetsArea_array)), 5); // archives $wpArchiveObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_archives', $motopressCELang->CEwpArchives, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpArchives, 'description' => $motopressCELang->CEwpArchivesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => '')), 45); // calendar $wpCalendarObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_calendar', $motopressCELang->CEwpCalendar, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCalendar, 'description' => $motopressCELang->CEwpCalendarDescription)), 30); // wp_categories $wpCategoriesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_categories', $motopressCELang->CEwpCategories, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCategories, 'description' => $motopressCELang->CEwpCategoriesDescription), 'dropdown' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpDisplayAsDropDown, 'default' => '', 'description' => ''), 'count' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpShowPostCounts, 'default' => '', 'description' => ''), 'hierarchy' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpCategoriesShowHierarchy, 'default' => '', 'description' => '')), 40); // wp_navmenu $wpCustomMenu_menus = get_terms('nav_menu'); $wpCustomMenu_array = array(); $wpCustomMenu_default = ''; if ($wpCustomMenu_menus) { foreach ($wpCustomMenu_menus as $menu) { if (empty($wpCustomMenu_default)) { $wpCustomMenu_default = $menu->slug; } $wpCustomMenu_array[$menu->slug] = $menu->name; } } else { $wpCustomMenu_array['no'] = $motopressCELang->CEwpCustomMenuNoMenus; } $wpCustomMenuObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_navmenu', $motopressCELang->CEwpCustomMenu, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpCustomMenu, 'description' => $motopressCELang->CEwpCustomMenuDescription), 'nav_menu' => array('type' => 'select', 'label' => $motopressCELang->CEwpCustomMenuSelectMenu, 'default' => $wpCustomMenu_default, 'description' => '', 'list' => $wpCustomMenu_array)), 10); // wp_meta $wpMetaObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_meta', $motopressCELang->CEwpMeta, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpMeta, 'description' => $motopressCELang->CEwpMetaDescription)), 55); // wp_pages $wpPagesObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_pages', $motopressCELang->CEwpPages, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpPages, 'description' => $motopressCELang->CEwpPagesDescription), 'sortby' => array('type' => 'select', 'label' => $motopressCELang->CESortBy, 'default' => 'menu_order', 'description' => '', 'list' => array('post_title' => $motopressCELang->CESortByPageTitle, 'menu_order' => $motopressCELang->CESortByPageOrder, 'ID' => $motopressCELang->CESortByPageID)), 'exclude' => array('type' => 'text', 'label' => $motopressCELang->CEExclude, 'default' => '', 'description' => $motopressCELang->CEwpPagesExcludePages)), 15); // wp_posts $wpPostsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_posts', $motopressCELang->CEwpRecentPosts, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentPosts, 'description' => $motopressCELang->CEwpRecentPostsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentPostsNumber, 'default' => '5', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRecentPostsDisplayDate, 'default' => '', 'description' => '')), 20); // wp_comments $wpRecentCommentsObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_comments', $motopressCELang->CEwpRecentComments, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRecentComments, 'description' => $motopressCELang->CEwpRecentCommentsDescription), 'number' => array('type' => 'text', 'label' => $motopressCELang->CEwpRecentCommentsNumber, 'default' => '5', 'description' => '')), 25); // wp_rss $wpRSSObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_rss', $motopressCELang->CEwpRSS, 'wordpress.png', array('url' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSUrl, 'default' => 'http://www.getmotopress.com/feed/', 'description' => $motopressCELang->CEwpRSSUrlDescription), 'title' => array('type' => 'text', 'label' => $motopressCELang->CEwpRSSFeedTitle, 'default' => '', 'description' => $motopressCELang->CEwpRSSFeedTitleDescription), 'items' => array('type' => 'select', 'label' => $motopressCELang->CEwpRSSQuantity, 'default' => 9, 'description' => $motopressCELang->CEwpRSSQuantityDescription, 'list' => range(1, 20)), 'show_summary' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayContent, 'default' => '', 'description' => ''), 'show_author' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayAuthor, 'default' => '', 'description' => ''), 'show_date' => array('type' => 'checkbox', 'label' => $motopressCELang->CEwpRSSDisplayDate, 'default' => '', 'description' => '')), 50); // search $wpSearchObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_search', $motopressCELang->CEwpRSSSearch, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpRSSSearch, 'description' => $motopressCELang->CEwpRSSSearchDescription)), 35); // tag cloud $wpTagCloudObj = new MPCEObject(MPCEShortcode::PREFIX . 'wp_tagcloud', $motopressCELang->CEwpTagCloud, 'wordpress.png', array('title' => array('type' => 'text', 'label' => $motopressCELang->CEParametersTitle, 'default' => $motopressCELang->CEwpTags, 'description' => $motopressCELang->CEwpTagCloudDescription), 'taxonomy' => array('type' => 'select', 'label' => $motopressCELang->CEwpTagCloudTaxonomy, 'default' => 10, 'description' => '', 'list' => array('post_tag' => $motopressCELang->CEwpTags, 'category' => $motopressCELang->CEwpTagCloudCategories))), 60); /* wp widgets END */ /* Groups */ $gridGroup = new MPCEGroup(); $gridGroup->setId(MPCEShortcode::PREFIX . 'grid'); $gridGroup->setName($motopressCELang->CEGridGroupName); $gridGroup->setShow(false); $gridGroup->addObject(array($rowObj, $rowInnerObj, $spanObj, $spanInnerObj)); $textGroup = new MPCEGroup(); $textGroup->setId(MPCEShortcode::PREFIX . 'text'); $textGroup->setName($motopressCELang->CETextGroupName); $textGroup->setIcon('text.png'); $textGroup->setPosition(0); $textGroup->addObject(array($textObj, $headingObj, $codeObj, $quotesObj, $membersObj)); $imageGroup = new MPCEGroup(); $imageGroup->setId(MPCEShortcode::PREFIX . 'image'); $imageGroup->setName($motopressCELang->CEImageGroupName); $imageGroup->setIcon('image.png'); $imageGroup->setPosition(10); $imageGroup->addObject(array($imageObj, $imageSlider)); $buttonGroup = new MPCEGroup(); $buttonGroup->setId(MPCEShortcode::PREFIX . 'button'); $buttonGroup->setName($motopressCELang->CEButtonGroupName); $buttonGroup->setIcon('button.png'); $buttonGroup->setPosition(20); $buttonGroup->addObject(array($buttonObj, $socialsObj, $socialProfileObj)); $mediaGroup = new MPCEGroup(); $mediaGroup->setId(MPCEShortcode::PREFIX . 'media'); $mediaGroup->setName($motopressCELang->CEMediaGroupName); $mediaGroup->setIcon('media.png'); $mediaGroup->setPosition(30); $mediaGroup->addObject(array($videoObj, $wpAudioObj)); $otherGroup = new MPCEGroup(); $otherGroup->setId(MPCEShortcode::PREFIX . 'other'); $otherGroup->setName($motopressCELang->CEOtherGroupName); $otherGroup->setIcon('other.png'); $otherGroup->setPosition(40); $otherGroup->addObject(array($gMapObj, $spaceObj, $embedObj, $googleChartsObj, $tabsObj, $tabObj, $accordionObj, $accordionItemObj, $tableObj, $postsGridObj)); $wordpressGroup = new MPCEGroup(); $wordpressGroup->setId(MPCEShortcode::PREFIX . 'wordpress'); $wordpressGroup->setName($motopressCELang->CEWordPressGroupName); $wordpressGroup->setIcon('wordpress.png'); $wordpressGroup->setPosition(50); $wordpressGroup->addObject(array($wpArchiveObj, $wpCalendarObj, $wpCategoriesObj, $wpCustomMenuObj, $wpMetaObj, $wpPagesObj, $wpPostsObj, $wpRecentCommentsObj, $wpRSSObj, $wpSearchObj, $wpTagCloudObj, $wpWidgetsAreaObj)); self::$defaultGroup = $otherGroup->getId(); $this->addGroup(array($gridGroup, $textGroup, $imageGroup, $buttonGroup, $mediaGroup, $otherGroup, $wordpressGroup)); }
public function shortcode_atts_common_filter($out, $pairs, $atts) { $basicClasses = trim(MPCEShortcode::getBasicClasses($this->prefix . $this->shortcode)); if (!$this->isContentEditor() && in_array($this->shortcode, array('row', 'row_inner', 'col', 'col_inner')) && !(isset($_POST['action']) && $_POST['action'] == 'motopress_ce_render_template')) { $basicClasses = ''; } $mpClasses = (isset($atts['margin']) ? trim(MPCEShortcode::getMarginClasses($atts['margin'])) : '') . ' ' . $basicClasses . ' ' . (isset($atts['mp_style_classes']) ? trim($atts['mp_style_classes']) : ''); if (method_exists('MPCEShortcode', 'handleCustomStyles')) { $mpClasses .= MPCEShortcode::handleCustomStyles(isset($atts['mp_custom_style']) ? $atts['mp_custom_style'] : '', $this->prefix . $this->shortcode, true); } $out['class'] = isset($out['class']) ? $out['class'] . ' ' . trim($mpClasses) : trim($mpClasses); return $out; }
function motopressCEWpHead() { global $post; global $motopressCESettings; wp_register_style('mpce-bootstrap-grid', plugin_dir_url(__FILE__) . 'bootstrap/bootstrap-grid.min.css', array(), $motopressCESettings['plugin_version']); // wp_register_style('mpce-bootstrap-responsive-utility', plugin_dir_url(__FILE__).'bootstrap-responsive-utility.min.css', array(), $motopressCESettings['plugin_version']); // wp_enqueue_style('mpce-bootstrap-responsive-utility'); wp_register_style('mpce-theme', plugin_dir_url(__FILE__) . 'includes/css/theme.css', array(), $motopressCESettings['plugin_version']); if ($post && !empty($post->post_content) && has_shortcode($post->post_content, 'mp_row') || MPCEShortcode::isContentEditor()) { wp_enqueue_style('mpce-bootstrap-grid'); wp_enqueue_style('mpce-theme'); } if (!wp_script_is('jquery')) { wp_enqueue_script('jquery'); } wp_register_style('mpce-flexslider', plugin_dir_url(__FILE__) . 'flexslider/flexslider.min.css', array(), $motopressCESettings['plugin_version']); wp_register_script('mpce-flexslider', plugin_dir_url(__FILE__) . 'flexslider/jquery.flexslider-min.js', array('jquery'), $motopressCESettings['plugin_version']); /*wp_register_script('mpce-theme', plugin_dir_url(__FILE__).'includes/js/theme.js', array('jquery'), $motopressCESettings['plugin_version']); wp_enqueue_script('mpce-theme');*/ wp_register_script('google-charts-api', 'https://www.google.com/jsapi'); wp_register_script('mp-google-charts', plugin_dir_url(__FILE__) . 'includes/js/mp-google-charts.js', array('jquery', 'google-charts-api'), $motopressCESettings['plugin_version']); wp_register_script('mp-social-share', plugin_dir_url(__FILE__) . 'includes/js/mp-social-share.js', array('jquery'), $motopressCESettings['plugin_version']); wp_register_script('mp-row-fullwidth', plugin_dir_url(__FILE__) . 'includes/js/mp-row-fullwidth.js', array('jquery'), $motopressCESettings['plugin_version']); wp_register_script('mp-video-background', plugin_dir_url(__FILE__) . 'includes/js/mp-video-background.js', array('jquery'), $motopressCESettings['plugin_version']); wp_register_script('mp-youtube-api', '//www.youtube.com/player_api'); wp_register_script('stellar', plugin_dir_url(__FILE__) . 'stellar/jquery.stellar.min.js', array('jquery'), $motopressCESettings['plugin_version']); wp_register_script('mp-row-parallax', plugin_dir_url(__FILE__) . 'includes/js/mp-row-parallax.js', array('jquery', 'stellar'), $motopressCESettings['plugin_version']); $mpGoogleChartsSwitch = array('motopressCE' => '0'); if (isset($_GET['motopress-ce']) && $_GET['motopress-ce'] == 1) { // wp_deregister_style('mpce-bootstrap-responsive-utility'); global $wp_scripts; $migrate = false; if (version_compare($wp_scripts->registered['jquery']->ver, MPCERequirements::MIN_JQUERY_VER, '<')) { $wpjQueryVer = motopressCEGetWPScriptVer('jQuery'); wp_deregister_script('jquery'); wp_register_script('jquery', includes_url() . 'js/jquery/jquery.js', array(), $wpjQueryVer); wp_enqueue_script('jquery'); if (version_compare($wpjQueryVer, '1.9.0', '>')) { if (wp_script_is('jquery-migrate', 'registered')) { wp_enqueue_script('jquery-migrate', array('jquery')); $migrate = true; } } } wp_register_script('mpce-no-conflict', plugin_dir_url(__FILE__) . 'mp/core/noConflict/noConflict.js', array('jquery'), $motopressCESettings['plugin_version']); wp_enqueue_script('mpce-no-conflict'); $jQueryOffset = array_search('jquery', $wp_scripts->queue) + 1; $index = $migrate ? array_search('jquery-migrate', $wp_scripts->queue) : array_search('mpce-no-conflict', $wp_scripts->queue); $length = $index - $jQueryOffset; $slice = array_splice($wp_scripts->queue, $jQueryOffset, $length); $wp_scripts->queue = array_merge($wp_scripts->queue, $slice); /* $wpjQueryUIVer = motopressCEGetWPScriptVer('jQueryUI'); foreach (MPCERequirements::$jQueryUIComponents as $component) { if (wp_script_is($component)) { if (version_compare($wp_scripts->registered[$component]->ver, MPCERequirements::MIN_JQUERYUI_VER, '<')) { wp_deregister_script($component); } } } wp_register_script('mpce-jquery-ui', $motopressCESettings['admin_url'].'load-scripts.php?c=0&load='.implode(',', MPCERequirements::$jQueryUIComponents), array('mpce-no-conflict'), $wpjQueryUIVer); wp_enqueue_script('mpce-jquery-ui'); */ wp_register_script('mpce-tinymce', plugin_dir_url(__FILE__) . 'tinymce/tinymce.min.js', array(), $motopressCESettings['plugin_version']); wp_enqueue_script('mpce-tinymce'); wp_enqueue_style('mpce-flexslider'); wp_enqueue_script('mpce-flexslider'); wp_enqueue_script('google-charts-api'); wp_enqueue_script('mp-google-charts'); wp_enqueue_style('wp-mediaelement'); wp_enqueue_script('wp-mediaelement'); wp_enqueue_script('stellar'); wp_enqueue_script('mp-row-parallax'); wp_enqueue_script('mp-youtube-api'); wp_enqueue_script('mp-video-background'); $mpGoogleChartsSwitch = array('motopressCE' => '1'); } wp_localize_script('mp-google-charts', 'motopressGoogleChartsPHPData', $mpGoogleChartsSwitch); }
<?php if (!defined('ABSPATH')) { exit; } $is_mpce_editor = (isset($_GET['motopress-ce']) or isset($_POST['action']) and $_POST['action'] === 'motopress_ce_render_shortcode'); $mpClasses = ''; if (!empty($mpAtts) and is_plugin_active('motopress-content-editor/motopress-content-editor.php')) { $mpClasses = MPCEShortcode::getBasicClasses('mpsl') . MPCEShortcode::getMarginClasses($mpAtts['margin']) . $mpAtts['mp_style_classes']; } // $sliderOptions // $sliderOptions['options'] -- slider options // $sliderOptions['slides'] -- array of slides // $sliderOptions['slides'][%id%]['options'] -- slide options // $sliderOptions['slides'][%id%]['layers'] -- array of layers // $sliderOptions['slides'][%id%]['layers'][%id%] -- layer options $sliderSettingsDataAttrs = ''; $sliderSettingsDataAttrs .= ' data-full-window-width="' . (($sliderOptions['options']['full_width'] and !$edit_mode) ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-timer="' . (($sliderOptions['options']['enable_timer'] and count($sliderOptions['slides']) > 1 and !$is_mpce_editor) ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-timer-delay="' . $sliderOptions['options']['slider_delay'] . '"'; $sliderSettingsDataAttrs .= ' data-hover-timer="' . ($sliderOptions['options']['hover_timer'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-counter="' . (($sliderOptions['options']['counter'] and !$edit_mode) ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-slider-layout="auto"'; $sliderSettingsDataAttrs .= ' data-grid-width="' . $sliderOptions['options']['width'] . '"'; $sliderSettingsDataAttrs .= ' data-grid-height="' . $sliderOptions['options']['height'] . '"'; $sliderSettingsDataAttrs .= ' data-timer-reverse="' . ($sliderOptions['options']['timer_reverse'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-arrows-show="' . ($sliderOptions['options']['arrows_show'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-thumbnails-show="' . ($sliderOptions['options']['thumbnails_show'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-slideshow-timer-show="' . ($sliderOptions['options']['slideshow_timer_show'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-slideshow-ppb-show="' . ($sliderOptions['options']['slideshow_ppb_show'] ? 'true' : 'false') . '"'; $sliderSettingsDataAttrs .= ' data-controls-hide-on-leave="' . ($sliderOptions['options']['controls_hide_on_leave'] ? 'true' : 'false') . '"';