예제 #1
0
파일: core.ini.php 프로젝트: pcuervo/odc
 function axiom_ini_get_values($file)
 {
     $rez = array();
     if (!is_array($file)) {
         if (file_exists($file)) {
             $file = axiom_fga($file);
         } else {
             return $rez;
         }
     }
     for ($i = 0; $i < count($file); $i++) {
         $file[$i] = trim(chop($file[$i]));
         if (($pos = axiom_strpos($file[$i], ';')) !== false) {
             $file[$i] = trim(axiom_substr($file[$i], 0, $pos));
         }
         $parts = explode('=', $file[$i]);
         if (count($parts) != 2) {
             continue;
         }
         $key = trim(chop($parts[0]));
         $rez[$key] = trim($parts[1]);
         if (axiom_substr($rez[$key], 0, 1) == '"') {
             $rez[$key] = axiom_substr($rez[$key], 1, axiom_strlen($rez[$key]) - 2);
         } else {
             $rez[$key] *= 1;
         }
     }
     return $rez;
 }
예제 #2
0
파일: core.admin.php 프로젝트: pcuervo/odc
 function axiom_admin_load_scripts()
 {
     axiom_enqueue_script('axiom-debug-script', axiom_get_file_url('js/core.debug.js'), array('jquery'), null, true);
     //if (axiom_options_is_used()) {
     axiom_enqueue_style('axiom-admin-style', axiom_get_file_url('css/core.admin.css'), array(), null);
     //}
     if (axiom_strpos($_SERVER['REQUEST_URI'], 'widgets.php') !== false) {
         axiom_enqueue_style('axiom-fontello-style', axiom_get_file_url('css/fontello-admin/css/fontello-admin.css'), array(), null);
         axiom_enqueue_style('axiom-animations-style', axiom_get_file_url('css/fontello-admin/css/animation.css'), array(), null);
         axiom_enqueue_script('axiom-admin-script', axiom_get_file_url('js/core.admin.js'), array('jquery'), null, true);
     }
 }
예제 #3
0
 function axiom_core_customizer_add_custom_styles($custom_style)
 {
     // Custom fonts
     if (axiom_get_custom_option('typography_custom') == 'yes') {
         $fonts = axiom_get_list_fonts(false);
         $fname = axiom_get_custom_option('typography_p_font');
         if (isset($fonts[$fname])) {
             $fstyle = explode(',', axiom_get_custom_option('typography_p_style'));
             $fname2 = ($pos = axiom_strpos($fname, ' (')) !== false ? axiom_substr($fname, 0, $pos) : $fname;
             $i = in_array('i', $fstyle);
             $u = in_array('u', $fstyle);
             $c = axiom_get_custom_option('typography_p_color');
             $custom_style .= "\n\t\t\t\t\tbody, button, input, select, textarea {\n\t\t\t\t\t\tfont-family: '" . esc_attr($fname2) . "'" . (isset($fonts[$fname]['family']) ? ", " . esc_attr($fonts[$fname]['family']) : '') . ";\n\t\t\t\t\t}\n\t\t\t\t\tbody {\n\t\t\t\t\t\tfont-size: " . esc_attr(axiom_get_custom_option('typography_p_size')) . "px;\n\t\t\t\t\t\tfont-weight: " . esc_attr(axiom_get_custom_option('typography_p_weight')) . ";\n\t\t\t\t\t\tline-height: " . esc_attr(axiom_get_custom_option('typography_p_lineheight')) . "px;\n\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t}\n\t\t\t\t";
         }
         for ($h = 1; $h <= 6; $h++) {
             $fname = axiom_get_custom_option('typography_h' . $h . '_font');
             if (isset($fonts[$fname])) {
                 $fstyle = explode(',', axiom_get_custom_option('typography_h' . $h . '_style'));
                 $fname2 = ($pos = axiom_strpos($fname, ' (')) !== false ? axiom_substr($fname, 0, $pos) : $fname;
                 $i = in_array('i', $fstyle);
                 $u = in_array('u', $fstyle);
                 $c = axiom_get_custom_option('typography_h' . $h . '_color');
                 $custom_style .= "\n\t\t\t\t\t\th" . intval($h) . ", .h" . intval($h) . " {\n\t\t\t\t\t\t\tfont-family: '" . esc_attr($fname2) . "'" . (isset($fonts[$fname]['family']) ? ", " . esc_attr($fonts[$fname]['family']) : '') . ";\n\t\t\t\t\t\t\tfont-size: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_size')) . "px;\n\t\t\t\t\t\t\tfont-weight: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_weight')) . ";\n\t\t\t\t\t\t\tline-height: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_lineheight')) . "px;\n\t\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t\t}\n\t\t\t\t\t\th" . $h . " a, .h" . $h . " a {\n\t\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t}\n\t\t\t\t\t";
             }
         }
     }
     // Submenu width
     $menu_width = axiom_get_theme_option('menu_width');
     if (!empty($menu_width)) {
         $custom_style .= "\n\t\t\t\t/* Submenu width */\n\t\t\t\t.menu_main_wrap .menu_main_nav > li ul {\n\t\t\t\t\twidth: " . intval($menu_width) . "px;\n\t\t\t\t}\n\t\t\t\t.menu_main_wrap .menu_main_nav > li > ul ul {\n\t\t\t\t\tleft:" . intval($menu_width + 4) . "px;\n\t\t\t\t}\n\t\t\t\t.menu_main_wrap .menu_main_nav > li > ul ul.submenu_left {\n\t\t\t\t\tleft:-" . intval($menu_width + 1) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo height
     $logo_height = axiom_get_custom_option('logo_height');
     if (!empty($logo_height)) {
         $custom_style .= "\n\t\t\t\t/* Logo header height */\n\t\t\t\t.menu_main_wrap .logo_main {\n\t\t\t\t\theight:" . intval($logo_height) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo top offset
     $logo_offset = axiom_get_custom_option('logo_offset');
     if (!empty($logo_offset)) {
         $custom_style .= "\n\t\t\t\t/* Logo header top offset */\n\t\t\t\t.menu_main_wrap .logo {\n\t\t\t\t\tmargin-top:" . intval($logo_offset) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo footer height
     $logo_height = axiom_get_theme_option('logo_footer_height');
     if (!empty($logo_height)) {
         $custom_style .= "\n\t\t\t\t/* Logo footer height */\n\t\t\t\t.contacts_wrap .logo img {\n\t\t\t\t\theight:" . intval($logo_height) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Custom css from theme options
     $custom_style .= axiom_get_custom_option('custom_css');
     return $custom_style;
 }
예제 #4
0
    function axiom_shortcodes_vc_add_init_script($output, $tag = '', $atts = array(), $content = '')
    {
        if (isset($_GET['vc_editable']) && $_GET['vc_editable'] == 'true' && (isset($_POST['action']) && $_POST['action'] == 'vc_load_shortcode') && (isset($_POST['shortcodes'][0]['tag']) && $_POST['shortcodes'][0]['tag'] == $tag)) {
            if (axiom_strpos($output, 'axiom_vc_init_shortcodes') === false) {
                $id = "axiom_vc_init_shortcodes_" . str_replace('.', '', mt_rand());
                $output .= '
					<script id="' . esc_attr($id) . '">
						try {
							axiom_init_post_formats();
							axiom_init_shortcodes(jQuery("body").eq(0));
							axiom_scroll_actions();
						} catch (e) { };
					</script>
				';
            }
        }
        return $output;
    }
예제 #5
0
파일: core.date.php 프로젝트: pcuervo/odc
 function axiom_date_to_sql($str)
 {
     if (trim($str) == '') {
         return '';
     }
     $str = strtr(trim($str), '/\\-,', '....');
     if (trim($str) == '00.00.0000' || trim($str) == '00.00.00') {
         return '';
     }
     $pos = axiom_strpos($str, '.');
     $d = trim(axiom_substr($str, 0, $pos));
     $str = axiom_substr($str, $pos + 1);
     $pos = axiom_strpos($str, '.');
     $m = trim(axiom_substr($str, 0, $pos));
     $y = trim(axiom_substr($str, $pos + 1));
     $y = $y < 50 ? $y + 2000 : ($y < 1900 ? $y + 1900 : $y);
     return '' . $y . '-' . (axiom_strlen($m) < 2 ? '0' : '') . $m . '-' . (axiom_strlen($d) < 2 ? '0' : '') . $d;
 }
예제 #6
0
 function axiom_options_show_field($id, $field, $value = null)
 {
     global $AXIOM_GLOBALS;
     // Set start field value
     if ($value !== null) {
         $field['val'] = $value;
     }
     if (!isset($field['val']) || $field['val'] == '') {
         $field['val'] = 'inherit';
     }
     if (!empty($field['subset'])) {
         $sbs = axiom_get_theme_option($field['subset'], '', $AXIOM_GLOBALS['to_data']);
         $field['val'] = isset($field['val'][$sbs]) ? $field['val'][$sbs] : '';
     }
     if (empty($id)) {
         $id = 'axiom_options_id_' . str_replace('.', '', mt_rand());
     }
     if (!isset($field['title'])) {
         $field['title'] = '';
     }
     // Divider before field
     $divider = !isset($field['divider']) && !in_array($field['type'], array('info', 'partition', 'tab', 'toggle')) || isset($field['divider']) && $field['divider'] ? ' axiom_options_divider' : '';
     // Setup default parameters
     if ($field['type'] == 'media') {
         if (!isset($field['before'])) {
             $field['before'] = array('title' => __('Choose image', 'axiom'), 'action' => 'media_upload', 'type' => 'image', 'multiple' => false, 'linked_field' => '', 'captions' => array('choose' => __('Choose image', 'axiom'), 'update' => __('Select image', 'axiom')));
         }
         if (!isset($field['after'])) {
             $field['after'] = array('icon' => 'iconadmin-cancel', 'action' => 'media_reset');
         }
     }
     // Buttons before and after field
     $before = $after = $buttons_classes = '';
     if (!empty($field['before'])) {
         list($before, $class) = axiom_options_action_button($field['before'], 'before');
         $buttons_classes .= $class;
     }
     if (!empty($field['after'])) {
         list($after, $class) = axiom_options_action_button($field['after'], 'after');
         $buttons_classes .= $class;
     }
     if (in_array($field['type'], array('list', 'select', 'fonts')) || $field['type'] == 'socials' && (empty($field['style']) || $field['style'] == 'icons')) {
         $buttons_classes .= ' axiom_options_button_after_small';
     }
     // Is it inherit field?
     $inherit = axiom_is_inherit_option($field['val']) ? 'inherit' : '';
     // Is it cloneable field?
     $cloneable = isset($field['cloneable']) && $field['cloneable'];
     // Prepare field
     if (!$cloneable) {
         $field['val'] = array($field['val']);
     } else {
         if (!is_array($field['val'])) {
             $field['val'] = array($field['val']);
         } else {
             if ($field['type'] == 'socials' && (!isset($field['val'][0]) || !is_array($field['val'][0]))) {
                 $field['val'] = array($field['val']);
             }
         }
     }
     // Field container
     if (axiom_options_is_group($field['type'])) {
         // Close nested containers
         if (empty($field['start']) && (!in_array($field['type'], array('group', 'toggle')) || !empty($field['end']))) {
             echo trim(axiom_options_close_nested_groups($field['type'], !empty($field['end'])));
             if (!empty($field['end'])) {
                 return;
             }
         }
     } else {
         // Start field layout
         if ($field['type'] != 'hidden') {
             echo '<div class="axiom_options_field' . ' axiom_options_field_' . (in_array($field['type'], array('list', 'fonts')) ? 'select' : $field['type']) . (in_array($field['type'], array('media', 'fonts', 'list', 'select', 'socials', 'date', 'time')) ? ' axiom_options_field_text' : '') . ($field['type'] == 'socials' && !empty($field['style']) && $field['style'] == 'images' ? ' axiom_options_field_images' : '') . ($field['type'] == 'socials' && (empty($field['style']) || $field['style'] == 'icons') ? ' axiom_options_field_icons' : '') . (isset($field['dir']) && $field['dir'] == 'vertical' ? ' axiom_options_vertical' : '') . (!empty($field['multiple']) ? ' axiom_options_multiple' : '') . (isset($field['size']) ? ' axiom_options_size_' . esc_attr($field['size']) : '') . (isset($field['class']) ? ' ' . esc_attr($field['class']) : '') . (!empty($field['columns']) ? ' axiom_options_columns axiom_options_columns_' . esc_attr($field['columns']) : '') . $divider . '">' . "\n";
             echo '<label class="axiom_options_field_label' . (!empty($AXIOM_GLOBALS['to_flags']['add_inherit']) && isset($field['std']) ? ' axiom_options_field_label_inherit' : '') . '" for="' . esc_attr($id) . '">' . $field['title'] . (!empty($AXIOM_GLOBALS['to_flags']['add_inherit']) && isset($field['std']) ? '<span id="' . esc_attr($id) . '_inherit" class="axiom_options_button_inherit' . ($inherit ? '' : ' axiom_options_inherit_off') . '" title="' . __('Unlock this field', 'axiom') . '"></span>' : '') . '</label>' . "\n";
             echo '<div class="axiom_options_field_content' . $buttons_classes . ($cloneable ? ' axiom_options_cloneable_area' : '') . '">' . "\n";
         }
     }
     // Parse field type
     foreach ($field['val'] as $clone_num => $clone_val) {
         if ($cloneable) {
             echo '<div class="axiom_options_cloneable_item">' . '<span class="axiom_options_input_button axiom_options_clone_button axiom_options_clone_button_del">-</span>';
         }
         switch ($field['type']) {
             case 'group':
                 echo '<fieldset id="' . esc_attr($id) . '" class="axiom_options_container axiom_options_group axiom_options_content' . esc_attr($divider) . '">';
                 if (!empty($field['title'])) {
                     echo '<legend>' . (!empty($field['icon']) ? '<span class="' . esc_attr($field['icon']) . '"></span>' : '') . esc_html($field['title']) . '</legend>' . "\n";
                 }
                 array_push($AXIOM_GLOBALS['to_flags']['nesting'], 'group');
                 break;
             case 'toggle':
                 array_push($AXIOM_GLOBALS['to_flags']['nesting'], 'toggle');
                 echo '<div id="' . esc_attr($id) . '" class="axiom_options_container axiom_options_toggle' . esc_attr($divider) . '">';
                 echo '<h3 id="' . esc_attr($id) . '_title"' . ' class="axiom_options_toggle_header' . (empty($field['closed']) ? ' ui-state-active' : '') . '"' . (!empty($field['action']) ? ' onclick="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . '>' . (!empty($field['icon']) ? '<span class="axiom_options_toggle_header_icon ' . esc_attr($field['icon']) . '"></span>' : '') . $field['title'] . '<span class="axiom_options_toggle_header_marker iconadmin-left-open"></span>' . '</h3>' . '<div class="axiom_options_content axiom_options_toggle_content"' . (!empty($field['closed']) ? ' style="display:none;"' : '') . '>';
                 break;
             case 'accordion':
                 array_push($AXIOM_GLOBALS['to_flags']['nesting'], 'accordion');
                 if (!empty($field['start'])) {
                     echo '<div id="' . esc_attr($field['start']) . '" class="axiom_options_container axiom_options_accordion' . esc_attr($divider) . '">';
                 }
                 echo '<div id="' . esc_attr($id) . '" class="axiom_options_accordion_item">' . '<h3 id="' . esc_attr($id) . '_title"' . ' class="axiom_options_accordion_header"' . (!empty($field['action']) ? ' onclick="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . '>' . (!empty($field['icon']) ? '<span class="axiom_options_accordion_header_icon ' . esc_attr($field['icon']) . '"></span>' : '') . $field['title'] . '<span class="axiom_options_accordion_header_marker iconadmin-left-open"></span>' . '</h3>' . '<div id="' . esc_attr($id) . '_content" class="axiom_options_content axiom_options_accordion_content">';
                 break;
             case 'tab':
                 array_push($AXIOM_GLOBALS['to_flags']['nesting'], 'tab');
                 if (!empty($field['start'])) {
                     echo '<div id="' . esc_attr($field['start']) . '" class="axiom_options_container axiom_options_tab' . esc_attr($divider) . '">' . '<ul>' . trim(axiom_options_collect_tabs($field['type'], $field['start'])) . '</ul>';
                 }
                 echo '<div id="' . esc_attr($id) . '_content"  class="axiom_options_content axiom_options_tab_content">';
                 break;
             case 'partition':
                 array_push($AXIOM_GLOBALS['to_flags']['nesting'], 'partition');
                 if (!empty($field['start'])) {
                     echo '<div id="' . esc_attr($field['start']) . '" class="axiom_options_container axiom_options_partition' . esc_attr($divider) . '">' . '<ul>' . trim(axiom_options_collect_tabs($field['type'], $field['start'])) . '</ul>';
                 }
                 echo '<div id="' . esc_attr($id) . '_content" class="axiom_options_content axiom_options_partition_content">';
                 break;
             case 'hidden':
                 echo '<input class="axiom_options_input axiom_options_input_hidden" name="' . esc_attr($id) . '" id="' . esc_attr($id) . '" type="hidden" value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '" />';
                 break;
             case 'date':
                 if (isset($field['style']) && $field['style'] == 'inline') {
                     echo '<div class="axiom_options_input_date" id="' . esc_attr($id) . '_calendar"' . ' data-format="' . (!empty($field['format']) ? $field['format'] : 'yy-mm-dd') . '"' . ' data-months="' . (!empty($field['months']) ? max(1, min(3, $field['months'])) : 1) . '"' . ' data-linked-field="' . (!empty($data['linked_field']) ? $data['linked_field'] : $id) . '"' . '></div>' . '<input id="' . esc_attr($id) . '"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['mask']) ? ' data-mask="' . esc_attr($field['mask']) . '"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 } else {
                     echo '<input class="axiom_options_input axiom_options_input_date' . (!empty($field['mask']) ? ' axiom_options_input_masked' : '') . '"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . ' data-format="' . (!empty($field['format']) ? $field['format'] : 'yy-mm-dd') . '"' . ' data-months="' . (!empty($field['months']) ? max(1, min(3, $field['months'])) : 1) . '"' . (!empty($field['mask']) ? ' data-mask="' . esc_attr($field['mask']) . '"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . $before . $after;
                 }
                 break;
             case 'text':
                 echo '<input class="axiom_options_input axiom_options_input_text' . (!empty($field['mask']) ? ' axiom_options_input_masked' : '') . '"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['mask']) ? ' data-mask="' . esc_attr($field['mask']) . '"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . $before . $after;
                 break;
             case 'textarea':
                 $cols = isset($field['cols']) && $field['cols'] > 10 ? $field['cols'] : '40';
                 $rows = isset($field['rows']) && $field['rows'] > 1 ? $field['rows'] : '8';
                 echo '<textarea class="axiom_options_input axiom_options_input_textarea"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' cols="' . esc_attr($cols) . '"' . ' rows="' . esc_attr($rows) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . '>' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '</textarea>';
                 break;
             case 'editor':
                 $cols = isset($field['cols']) && $field['cols'] > 10 ? $field['cols'] : '40';
                 $rows = isset($field['rows']) && $field['rows'] > 1 ? $field['rows'] : '10';
                 wp_editor(axiom_is_inherit_option($clone_val) ? '' : $clone_val, $id . ($cloneable ? '[]' : ''), array('wpautop' => false, 'textarea_rows' => $rows));
                 break;
             case 'spinner':
                 echo '<input class="axiom_options_input axiom_options_input_spinner' . (!empty($field['mask']) ? ' axiom_options_input_masked' : '') . '" name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['mask']) ? ' data-mask="' . esc_attr($field['mask']) . '"' : '') . (isset($field['min']) ? ' data-min="' . esc_attr($field['min']) . '"' : '') . (isset($field['max']) ? ' data-max="' . esc_attr($field['max']) . '"' : '') . (!empty($field['step']) ? ' data-step="' . esc_attr($field['step']) . '"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . '<span class="axiom_options_arrows"><span class="axiom_options_arrow_up iconadmin-up-dir"></span><span class="axiom_options_arrow_down iconadmin-down-dir"></span></span>';
                 break;
             case 'tags':
                 if (!axiom_is_inherit_option($clone_val)) {
                     $tags = explode($AXIOM_GLOBALS['to_delimiter'], $clone_val);
                     if (count($tags) > 0) {
                         foreach ($tags as $tag) {
                             if (empty($tag)) {
                                 continue;
                             }
                             echo '<span class="axiom_options_tag iconadmin-cancel">' . $tag . '</span>';
                         }
                     }
                 }
                 echo '<input class="axiom_options_input_tags"' . ' type="text"' . ' value=""' . ' />' . '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 break;
             case "checkbox":
                 echo '<input type="checkbox" class="axiom_options_input axiom_options_input_checkbox"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' value="true"' . ($clone_val == 'true' ? ' checked="checked"' : '') . (!empty($field['disabled']) ? ' readonly="readonly"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . '<label for="' . esc_attr($id) . '" class="' . (!empty($field['disabled']) ? 'axiom_options_state_disabled' : '') . ($clone_val == 'true' ? ' axiom_options_state_checked' : '') . '"><span class="axiom_options_input_checkbox_image iconadmin-check"></span>' . (!empty($field['label']) ? $field['label'] : $field['title']) . '</label>';
                 break;
             case "radio":
                 foreach ($field['options'] as $key => $title) {
                     echo '<span class="axiom_options_radioitem">' . '<input class="axiom_options_input axiom_options_input_radio" type="radio"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' value="' . esc_attr($key) . '"' . ($clone_val == $key ? ' checked="checked"' : '') . ' id="' . esc_attr($id . '_' . $key) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . '<label for="' . esc_attr($id . '_' . $key) . '"' . ($clone_val == $key ? ' class="axiom_options_state_checked"' : '') . '><span class="axiom_options_input_radio_image iconadmin-circle-empty' . ($clone_val == $key ? ' iconadmin-dot-circled' : '') . '"></span>' . $title . '</label></span>';
                 }
                 break;
             case "switch":
                 $opt = array();
                 foreach ($field['options'] as $key => $title) {
                     $opt[] = array('key' => $key, 'title' => $title);
                     if (count($opt) == 2) {
                         break;
                     }
                 }
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) || empty($clone_val) ? $opt[0]['key'] : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . '<span class="axiom_options_switch' . ($clone_val == $opt[1]['key'] ? ' axiom_options_state_off' : '') . '"><span class="axiom_options_switch_inner iconadmin-circle"><span class="axiom_options_switch_val1" data-value="' . esc_attr($opt[0]['key']) . '">' . $opt[0]['title'] . '</span><span class="axiom_options_switch_val2" data-value="' . esc_attr($opt[1]['key']) . '">' . $opt[1]['title'] . '</span></span></span>';
                 break;
             case 'media':
                 echo '<input class="axiom_options_input axiom_options_input_text axiom_options_input_media"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!isset($field['readonly']) || $field['readonly'] ? ' readonly="readonly"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . $before . $after;
                 if (!empty($clone_val) && !axiom_is_inherit_option($clone_val)) {
                     $info = pathinfo($clone_val);
                     $ext = isset($info['extension']) ? $info['extension'] : '';
                     echo '<a class="axiom_options_image_preview" data-rel="popup" target="_blank" href="' . esc_url($clone_val) . '">' . (!empty($ext) && axiom_strpos('jpg,png,gif', $ext) !== false ? '<img src="' . esc_url($clone_val) . '" alt="" />' : '<span>' . $info['basename'] . '</span>') . '</a>';
                 }
                 break;
             case 'button':
                 list($button, $class) = axiom_options_action_button($field, 'button');
                 echo $button;
                 break;
             case 'range':
                 echo '<div class="axiom_options_input_range" data-step="' . (!empty($field['step']) ? $field['step'] : 1) . '">';
                 echo '<span class="axiom_options_range_scale"><span class="axiom_options_range_scale_filled"></span></span>';
                 if (axiom_strpos($clone_val, $AXIOM_GLOBALS['to_delimiter']) === false) {
                     $clone_val = max($field['min'], intval($clone_val));
                 }
                 if (axiom_strpos($field['std'], $AXIOM_GLOBALS['to_delimiter']) !== false && axiom_strpos($clone_val, $AXIOM_GLOBALS['to_delimiter']) === false) {
                     $clone_val = $field['min'] . ',' . $clone_val;
                 }
                 $sliders = explode($AXIOM_GLOBALS['to_delimiter'], $clone_val);
                 foreach ($sliders as $s) {
                     echo '<span class="axiom_options_range_slider"><span class="axiom_options_range_slider_value">' . intval($s) . '</span><span class="axiom_options_range_slider_button"></span></span>';
                 }
                 echo '<span class="axiom_options_range_min">' . $field['min'] . '</span><span class="axiom_options_range_max">' . $field['max'] . '</span>';
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 echo '</div>';
                 break;
             case "checklist":
                 foreach ($field['options'] as $key => $title) {
                     echo '<span class="axiom_options_listitem' . (axiom_strpos($AXIOM_GLOBALS['to_delimiter'] . $clone_val . $AXIOM_GLOBALS['to_delimiter'], $AXIOM_GLOBALS['to_delimiter'] . $key . $AXIOM_GLOBALS['to_delimiter']) !== false ? ' axiom_options_state_checked' : '') . '"' . ' data-value="' . esc_attr($key) . '"' . '>' . esc_attr($title) . '</span>';
                 }
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 break;
             case 'fonts':
                 foreach ($field['options'] as $key => $title) {
                     $field['options'][$key] = $key;
                 }
             case 'list':
             case 'select':
                 if (!isset($field['options']) && !empty($field['from']) && !empty($field['to'])) {
                     $field['options'] = array();
                     for ($i = $field['from']; $i <= $field['to']; $i += !empty($field['step']) ? $field['step'] : 1) {
                         $field['options'][$i] = $i;
                     }
                 }
                 list($list, $caption) = axiom_options_menu_list($field, $clone_val);
                 if (empty($field['style']) || $field['style'] == 'select') {
                     echo '<input class="axiom_options_input axiom_options_input_select" type="text" value="' . esc_attr($caption) . '"' . ' readonly="readonly"' . ' />' . $before . '<span class="axiom_options_field_after axiom_options_with_action iconadmin-down-open" onclick="axiom_options_action_show_menu(this);return false;"></span>';
                 }
                 echo $list;
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 break;
             case 'images':
                 list($list, $caption) = axiom_options_menu_list($field, $clone_val);
                 if (empty($field['style']) || $field['style'] == 'select') {
                     echo '<div class="axiom_options_caption_image iconadmin-down-open">' . '<span style="background-image: url(' . esc_url($caption) . ')"></span>' . '</div>';
                 }
                 echo $list;
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 break;
             case 'icons':
                 if (isset($field['css']) && $field['css'] != '' && file_exists($field['css'])) {
                     $field['options'] = axiom_parse_icons_classes($field['css']);
                 }
                 list($list, $caption) = axiom_options_menu_list($field, $clone_val);
                 if (empty($field['style']) || $field['style'] == 'select') {
                     echo '<div class="axiom_options_caption_icon iconadmin-down-open"><span class="' . esc_attr($caption) . '"></span></div>';
                 }
                 echo $list;
                 echo '<input name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' type="hidden"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 break;
             case 'socials':
                 if (!is_array($clone_val)) {
                     $clone_val = array('url' => '', 'icon' => '');
                 }
                 list($list, $caption) = axiom_options_menu_list($field, $clone_val);
                 if (empty($field['style']) || $field['style'] == 'icons') {
                     list($after, $class) = axiom_options_action_button(array('action' => empty($field['style']) || $field['style'] == 'icons' ? 'select_icon' : '', 'icon' => (empty($field['style']) || $field['style'] == 'icons') && !empty($clone_val['icon']) ? $clone_val['icon'] : 'iconadmin-users-1'), 'after');
                 } else {
                     $after = '';
                 }
                 echo '<input class="axiom_options_input axiom_options_input_text axiom_options_input_socials' . (!empty($field['mask']) ? ' axiom_options_input_masked' : '') . '"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text" value="' . esc_attr(axiom_is_inherit_option($clone_val['url']) ? '' : $clone_val['url']) . '"' . (!empty($field['mask']) ? ' data-mask="' . esc_attr($field['mask']) . '"' : '') . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />' . $after;
                 if (!empty($field['style']) && $field['style'] == 'images') {
                     echo '<div class="axiom_options_caption_image iconadmin-down-open">' . '<span style="background-image: url(' . esc_url($caption) . ')"></span>' . '</div>';
                 }
                 echo $list;
                 echo '<input name="' . esc_attr($id) . '_icon' . ($cloneable ? '[]' : '') . '" type="hidden" value="' . esc_attr(axiom_is_inherit_option($clone_val['icon']) ? '' : $clone_val['icon']) . '" />';
                 break;
             case "color":
                 echo '<input class="axiom_options_input axiom_options_input_color' . (isset($field['style']) && $field['style'] == 'custom' ? ' axiom_options_input_color_custom' : '') . '"' . ' name="' . esc_attr($id) . ($cloneable ? '[]' : '') . '"' . ' id="' . esc_attr($id) . '"' . ' type="text"' . ' value="' . esc_attr(axiom_is_inherit_option($clone_val) ? '' : $clone_val) . '"' . (!empty($field['action']) ? ' onchange="axiom_options_action_' . esc_attr($field['action']) . '(this);return false;"' : '') . ' />';
                 if (isset($field['style']) && $field['style'] == 'custom') {
                     echo '<span class="axiom_options_input_colorpicker iColorPicker"></span>';
                 }
                 break;
             default:
                 if (function_exists('axiom_show_custom_field')) {
                     echo trim(axiom_show_custom_field($id, $field, $clone_val));
                 }
         }
         if ($cloneable) {
             echo '<input type="hidden" name="' . esc_attr($id) . '_numbers[]" value="' . esc_attr($clone_num) . '" />' . '</div>';
         }
     }
     if (!axiom_options_is_group($field['type']) && $field['type'] != 'hidden') {
         if ($cloneable) {
             echo '<div class="axiom_options_input_button axiom_options_clone_button axiom_options_clone_button_add">' . __('+ Add item', 'axiom') . '</div>';
         }
         if (!empty($AXIOM_GLOBALS['to_flags']['add_inherit']) && isset($field['std'])) {
             echo '<div class="axiom_options_content_inherit"' . ($inherit ? '' : ' style="display:none;"') . '><div>' . __('Inherit', 'axiom') . '</div><input type="hidden" name="' . esc_attr($id) . '_inherit" value="' . esc_attr($inherit) . '" /></div>';
         }
         echo '</div>';
         if (!empty($field['desc'])) {
             echo '<div class="axiom_options_desc">' . $field['desc'] . '</div>' . "\n";
         }
         echo '</div>' . "\n";
     }
 }
예제 #7
0
파일: user-panel.php 프로젝트: pcuervo/odc
<?php

global $AXIOM_GLOBALS;
if (empty($AXIOM_GLOBALS['menu_user'])) {
    $AXIOM_GLOBALS['menu_user'] = axiom_get_nav_menu('menu_user');
}
if (empty($AXIOM_GLOBALS['menu_user'])) {
    ?>
	<ul id="menu_user" class="menu_user_nav">
    <?php 
} else {
    $menu = axiom_substr($AXIOM_GLOBALS['menu_user'], 0, axiom_strlen($AXIOM_GLOBALS['menu_user']) - 5);
    $pos = axiom_strpos($menu, '<ul');
    if ($pos !== false) {
        $menu = axiom_substr($menu, 0, $pos + 3) . axiom_substr($menu, $pos + 3);
    }
    echo str_replace('class=""', '', $menu);
}
?>

<?php 
if (axiom_is_woocommerce_page() && axiom_get_custom_option('show_currency') == 'yes') {
    ?>
	<li class="menu_user_currency">
		<a href="#">$</a>
		<ul>
			<li><a href="#"><b>&#36;</b> <?php 
    _e('Dollar', 'axiom');
    ?>
</a></li>
			<li><a href="#"><b>&euro;</b> <?php 
예제 #8
0
파일: emailer.php 프로젝트: pcuervo/odc
 function axiom_callback_emailer_submit()
 {
     global $_REQUEST;
     if (!wp_verify_nonce($_REQUEST['nonce'], 'ajax_nonce')) {
         die;
     }
     $response = array('error' => '');
     $group = $_REQUEST['group'];
     $email = $_REQUEST['email'];
     if (preg_match('/[\\.\\-_A-Za-z0-9]+?@[\\.\\-A-Za-z0-9]+?[\\ .A-Za-z0-9]{2,}/', $email)) {
         $subscribers = axiom_emailer_group_getlist($group);
         if (isset($subscribers[$group][$email])) {
             $response['error'] = __('E-mail address already in the subscribers list!', 'axiom');
         } else {
             $subscribers[$group][$email] = md5(mt_rand());
             update_option('axiom_emailer_subscribers', $subscribers);
             $subj = sprintf(__('Site %s - Subscribe confirmation', 'axiom'), get_bloginfo('site_name'));
             $url = admin_url('admin-ajax.php');
             $link = $url . (axiom_strpos($url, '?') === false ? '?' : '') . 'action=emailer_confirm&nonce=' . urlencode($subscribers[$group][$email]) . '&email=' . urlencode($email) . '&group=' . urlencode($group);
             $msg = sprintf(__("You or someone else added this e-mail address into our subcribtion list.\nPlease, confirm your wish to receive newsletters from our website by clicking on the link below:\n\n<a href=\"%s\">%s</a>\n\nIf you do not wiish to subscribe to our newsletters, simply ignore this message.", 'axiom'), $link, $link);
             add_filter('wp_mail_content_type', 'axiom_set_html_content_type');
             $sender_name = get_bloginfo('name');
             $sender_email = axiom_get_theme_option('contact_email');
             if (empty($sender_email)) {
                 $sender_email = get_bloginfo('admin_email');
             }
             $headers = 'From: ' . trim($sender_name) . ' <' . trim($sender_email) . '>' . "\r\n";
             $mail = axiom_get_theme_option('mail_function');
             if (!@$mail($email, $subj, nl2br($msg), $headers)) {
                 $response['error'] = __('Error send message!', 'axiom');
             }
             remove_filter('wp_mail_content_type', 'axiom_set_html_content_type');
         }
     } else {
         $response['error'] = __('E-mail address is not valid!', 'axiom');
     }
     echo json_encode($response);
     die;
 }
예제 #9
0
파일: counters.php 프로젝트: pcuervo/odc
    echo esc_attr($post_data['post_id']);
    ?>
"
		data-likes="<?php 
    echo esc_attr($post_data['post_likes']);
    ?>
"
		data-title-like="<?php 
    _e('Like', 'axiom');
    ?>
"
		data-title-dislike="<?php 
    _e('Dislike', 'axiom');
    ?>
"><span class="post_counters_number"><?php 
    echo $post_data['post_likes'];
    ?>
</span></a>
	<?php 
}
if (is_single() && axiom_strpos($post_options['counters'], 'markup') !== false) {
    ?>
	<meta itemprop="interactionCount" content="User<?php 
    echo esc_attr(axiom_strpos($post_options['counters'], 'comments') !== false ? 'Comments' : 'PageVisits');
    ?>
:<?php 
    echo esc_attr(axiom_strpos($post_options['counters'], 'comments') !== false ? $post_data['post_comments'] : $post_data['post_views']);
    ?>
" />
	<?php 
}
예제 #10
0
 function axiom_tribe_events_get_current_taxonomy($tax, $page)
 {
     if (!empty($tax)) {
         return $tax;
     }
     if (axiom_strpos($page, 'tribe') !== false) {
         $tax = TribeEvents::TAXONOMY;
     }
     return $tax;
 }
예제 #11
0
    function axiom_reviews_get_markup($field, $value, $editable = false, $clear = false, $snippets = false)
    {
        $max_level = max(5, (int) axiom_get_custom_option('reviews_max_level'));
        $step = $max_level < 100 ? 0.1 : 1;
        $prec = pow(10, axiom_strpos($step, '.') === false ? 0 : axiom_strlen($step) - axiom_strpos($step, '.') - 1);
        $output = '<div class="reviews_editor">';
        $criterias = $field['options'];
        $marks = explode(',', $value);
        if (is_array($criterias) && count($criterias) > 0) {
            $i = 0;
            foreach ($criterias as $num => $sb) {
                if (empty($sb)) {
                    continue;
                }
                if ($clear || !isset($marks[$i]) || $marks[$i] == '' || axiom_is_inherit_option($marks[$i])) {
                    $marks[$i] = 0;
                }
                $marks[$i] = min($max_level, max(0, round($marks[$i] * $prec) / $prec + 0));
                $output .= '<div class="reviews_item reviews_max_level_' . esc_attr($max_level) . '" data-max-level="' . esc_attr($max_level) . '" data-step="' . esc_attr($step) . '">' . '<div class="reviews_criteria">' . $sb . '</div>' . trim(axiom_reviews_get_summary_stars($marks[$i], $editable)) . '</div>';
                $i++;
            }
        }
        $output .= '</div>';
        $output .= isset($field['accept']) && $field['accept'] ? '<div class="reviews_accept">' . do_shortcode('[trx_button]' . __('Accept your votes', 'axiom') . '[/trx_button]') . '</div>' : '';
        $avg = axiom_reviews_get_average_rating($value);
        $avg = min($max_level, max(0, round($avg * $prec) / $prec + 0));
        $output .= '
            <div class="reviews_summary">
				<div class="reviews_item reviews_max_level_' . esc_attr($max_level) . '" data-step="' . esc_attr($step) . '">
					<div class="reviews_criteria">' . (isset($field['descr']) ? $field['descr'] : __('Summary', 'axiom')) . '</div>
					' . trim(axiom_reviews_get_summary_stars($avg, false, $snippets)) . '
				</div>
            </div>
		';
        return $output;
    }
예제 #12
0
 function axiom_get_feedburner_counter($account)
 {
     $rss = get_transient("feedburnercounter");
     if ($rss !== false) {
         return $rss;
     }
     $rss = '?';
     $url = esc_url('http://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=' . $account);
     $headers = get_headers($url);
     if (axiom_strpos($headers[0], '200')) {
         $xml = axiom_fgc($url);
         preg_match('/circulation="(\\d+)"/', $xml, $match);
         if ($match[1] != 0) {
             $rss = $match[1];
             set_transient("feedburnercounter", $rss, 60 * 60);
         }
     }
     return $rss;
 }
예제 #13
0
파일: calendar.php 프로젝트: pcuervo/odc
    /**
     * Displays the widget settings controls on the widget panel.
     * Make use of the get_field_id() and get_field_name() function
     * when creating your form elements. This handles the confusing stuff.
     */
    function form($instance)
    {
        // Set up some default widget settings
        $instance = wp_parse_args((array) $instance, array('title' => '', 'post_type' => 'post'));
        $title = $instance['title'];
        $post_type = $instance['post_type'];
        $posts_types = axiom_get_list_posts_types(false);
        ?>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
"><?php 
        _e('Widget title:', 'axiom');
        ?>
</label>
			<input id="<?php 
        echo esc_attr($this->get_field_id('title'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('title'));
        ?>
" value="<?php 
        echo esc_attr($title);
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('post_type'));
        ?>
_1"><?php 
        _e('Post type:', 'axiom');
        ?>
</label><br>
			<?php 
        $i = 0;
        foreach ($posts_types as $type => $type_title) {
            $i++;
            echo '<span class="post_type" style="display:inline-block; white-space: nowrap; overflow: hidden; width:33.3333%; height: 1.5em; line-height: 1.5em;"><input type="checkbox" id="' . esc_attr($this->get_field_id('post_type') . '_' . intval($i)) . '" name="' . esc_attr($this->get_field_name('post_type')) . '[]" value="' . esc_attr($type) . '"' . (axiom_strpos($post_type, $type) !== false ? ' checked="checked"' : '') . '><label for="' . esc_attr($this->get_field_id('post_type') . '_' . intval($i)) . '">' . $type_title . '</label></span>';
        }
        ?>
			</select>
			<br><span class="description"><?php 
        _e('Attention! If you check custom post types, please check also settings in the correspond plugins and enable display this posts in the blog!', 'axiom');
        ?>
</span>
		</p>

	<?php 
    }
예제 #14
0
파일: shortcodes.php 프로젝트: pcuervo/odc
function axiom_sc_twitter($atts, $content = null)
{
    if (axiom_sc_in_shortcode_blogger()) {
        return '';
    }
    extract(axiom_sc_html_decode(shortcode_atts(array("user" => "", "consumer_key" => "", "consumer_secret" => "", "token_key" => "", "token_secret" => "", "count" => "3", "controls" => "yes", "interval" => "", "autoheight" => "no", "align" => "", "bg_tint" => "", "bg_color" => "", "bg_image" => "", "bg_overlay" => "", "bg_texture" => "", "id" => "", "class" => "", "animation" => "", "css" => "", "width" => "", "height" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)));
    $twitter_username = $user ? $user : axiom_get_theme_option('twitter_username');
    $twitter_consumer_key = $consumer_key ? $consumer_key : axiom_get_theme_option('twitter_consumer_key');
    $twitter_consumer_secret = $consumer_secret ? $consumer_secret : axiom_get_theme_option('twitter_consumer_secret');
    $twitter_token_key = $token_key ? $token_key : axiom_get_theme_option('twitter_token_key');
    $twitter_token_secret = $token_secret ? $token_secret : axiom_get_theme_option('twitter_token_secret');
    $twitter_count = max(1, $count ? $count : intval(axiom_get_theme_option('twitter_count')));
    if (empty($id)) {
        $id = "sc_testimonials_" . str_replace('.', '', mt_rand());
    }
    if (empty($width)) {
        $width = "100%";
    }
    if (!empty($height) && axiom_sc_param_is_on($autoheight)) {
        $autoheight = "no";
    }
    if (empty($interval)) {
        $interval = mt_rand(5000, 10000);
    }
    if ($bg_image > 0) {
        $attach = wp_get_attachment_image_src($bg_image, 'full');
        if (isset($attach[0]) && $attach[0] != '') {
            $bg_image = $attach[0];
        }
    }
    if ($bg_overlay > 0) {
        if ($bg_color == '') {
            $bg_color = apply_filters('axiom_filter_get_theme_bgcolor', '');
        }
        $rgb = axiom_hex2rgb($bg_color);
    }
    $ms = axiom_get_css_position_from_values($top, $right, $bottom, $left);
    $ws = axiom_get_css_position_from_values('', '', '', '', $width);
    $hs = axiom_get_css_position_from_values('', '', '', '', '', $height);
    $css .= $ms . $hs . $ws;
    $output = '';
    if (!empty($twitter_consumer_key) && !empty($twitter_consumer_secret) && !empty($twitter_token_key) && !empty($twitter_token_secret)) {
        $data = axiom_get_twitter_data(array('mode' => 'user_timeline', 'consumer_key' => $twitter_consumer_key, 'consumer_secret' => $twitter_consumer_secret, 'token' => $twitter_token_key, 'secret' => $twitter_token_secret));
        if ($data && isset($data[0]['text'])) {
            axiom_enqueue_slider('swiper');
            $output = ($bg_color != '' || $bg_image != '' || $bg_overlay > 0 || $bg_texture > 0 || axiom_strlen($bg_texture) > 2 ? '<div class="sc_twitter_wrap sc_section' . ($bg_tint ? ' bg_tint_' . esc_attr($bg_tint) : '') . ($align && $align != 'none' && $align != 'inherit' ? ' align' . esc_attr($align) : '') . '"' . ' style="' . ($bg_color !== '' && $bg_overlay == 0 ? 'background-color:' . esc_attr($bg_color) . ';' : '') . ($bg_image !== '' ? 'background-image:url(' . esc_url($bg_image) . ');' : '') . '"' . (!axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . '>' . '<div class="sc_section_overlay' . ($bg_texture > 0 ? ' texture_bg_' . esc_attr($bg_texture) : '') . '"' . ' style="' . ($bg_overlay > 0 ? 'background-color:rgba(' . (int) $rgb['r'] . ',' . (int) $rgb['g'] . ',' . (int) $rgb['b'] . ',' . min(1, max(0, $bg_overlay)) . ');' : '') . (axiom_strlen($bg_texture) > 2 ? 'background-image:url(' . esc_url($bg_texture) . ');' : '') . '"' . ($bg_overlay > 0 ? ' data-overlay="' . esc_attr($bg_overlay) . '" data-bg_color="' . esc_attr($bg_color) . '"' : '') . '>' : '') . '<div class="sc_twitter sc_slider_swiper sc_slider_nopagination swiper-slider-container"' . (axiom_sc_param_is_on($controls) ? ' sc_slider_controls' : ' sc_slider_nocontrols') . (axiom_sc_param_is_on($autoheight) ? ' sc_slider_height_auto' : '') . ($hs ? ' sc_slider_height_fixed' : '') . (!empty($class) ? ' ' . esc_attr($class) : '') . ($bg_color == '' && $bg_image == '' && $bg_overlay == 0 && ($bg_texture == '' || $bg_texture == '0') && $align && $align != 'none' && $align != 'inherit' ? ' align' . esc_attr($align) : '') . '"' . ($bg_color == '' && $bg_image == '' && $bg_overlay == 0 && ($bg_texture == '' || $bg_texture == '0') && !axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . (!empty($width) && axiom_strpos($width, '%') === false ? ' data-old-width="' . esc_attr($width) . '"' : '') . (!empty($height) && axiom_strpos($height, '%') === false ? ' data-old-height="' . esc_attr($height) . '"' : '') . ((int) $interval > 0 ? ' data-interval="' . esc_attr($interval) . '"' : '') . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . '>' . '<div class="slides swiper-wrapper">';
            $cnt = 0;
            foreach ($data as $tweet) {
                if (axiom_substr($tweet['text'], 0, 1) == '@') {
                    continue;
                }
                $output .= '<div class="swiper-slide" data-style="' . esc_attr($ws . $hs) . '" style="' . esc_attr($ws . $hs) . '">' . '<div class="sc_twitter_item">' . '<span class="sc_twitter_icon icon-twitter"></span>' . '<div class="sc_twitter_content">' . '<a href="' . esc_url('https://twitter.com/' . $twitter_username) . '" class="sc_twitter_author" target="_blank">@' . esc_html($tweet['user']['screen_name']) . '</a> ' . force_balance_tags(axiom_prepare_twitter_text($tweet)) . '</div>' . '</div>' . '</div>';
                if (++$cnt >= $twitter_count) {
                    break;
                }
            }
            $output .= '</div>' . '<div class="sc_slider_controls_wrap"><a class="sc_slider_prev" href="#"></a><a class="sc_slider_next" href="#"></a></div>' . '</div>' . ($bg_color != '' || $bg_image != '' || $bg_overlay > 0 || $bg_texture > 0 || axiom_strlen($bg_texture) > 2 ? '</div></div>' : '');
        }
    }
    return apply_filters('axiom_shortcode_output', $output, 'trx_twitter', $atts, $content);
}
예제 #15
0
 function replace_uploads($str)
 {
     if (is_array($str)) {
         foreach ($str as $k => $v) {
             $str[$k] = $this->replace_uploads($v);
         }
     } else {
         if (is_string($str)) {
             while (($pos = axiom_strpos($str, "/{$this->options['uploads_folder']}/")) !== false) {
                 $pos0 = $pos;
                 while ($pos0) {
                     if (axiom_substr($str, $pos0, 5) == 'http:') {
                         break;
                     }
                     $pos0--;
                 }
                 $str = ($pos0 > 0 ? axiom_substr($str, 0, $pos0) : '') . $this->uploads_url . axiom_substr($str, $pos + axiom_strlen($this->options['uploads_folder']) + 1);
             }
         }
     }
     return $str;
 }
예제 #16
0
파일: slider.php 프로젝트: pcuervo/odc
 } else {
     if ($slider == 'royal' && axiom_exists_royalslider()) {
         $slider_alias = get_new_royalslider($slider_alias);
         if (!empty($slider_alias)) {
             $slider_html = do_shortcode('[rev_slider ' . esc_attr($slider_alias) . ']');
         }
         axiom_enqueue_style('new-royalslider-core-css', NEW_ROYALSLIDER_PLUGIN_URL . 'lib/royalslider/royalslider.css', array(), null);
         axiom_enqueue_script('new-royalslider-main-js', NEW_ROYALSLIDER_PLUGIN_URL . 'lib/royalslider/jquery.royalslider.min.js', array('jquery'), NEW_ROYALSLIDER_WP_VERSION, true);
     } else {
         if ($slider == 'swiper') {
             $slider_pagination = axiom_get_custom_option("slider_pagination");
             $slider_alias = axiom_get_custom_option("slider_category");
             $slider_orderby = axiom_get_custom_option("slider_orderby");
             $slider_order = axiom_get_custom_option("slider_order");
             $slider_count = $slider_ids = axiom_get_custom_option("slider_posts");
             if (axiom_strpos($slider_ids, ',') !== false) {
                 $slider_alias = '';
                 $slider_count = 0;
             } else {
                 $slider_ids = '';
                 if (empty($slider_count)) {
                     $slider_count = 3;
                 }
             }
             $slider_interval = axiom_get_custom_option("slider_interval");
             if ($slider_count > 0 || !empty($slider_ids)) {
                 $slider_html = do_shortcode('[trx_slider' . ' custom="no"' . ' crop="no"' . ' controls="0"' . ' engine="' . esc_attr($slider) . '"' . ' height="' . max(100, axiom_get_custom_option('slider_height')) . '"' . ' titles="' . esc_attr(axiom_get_custom_option("slider_infobox")) . '"' . ($slider_interval ? ' interval="' . esc_attr($slider_interval) . '"' : '') . ($slider_alias ? ' cat="' . esc_attr($slider_alias) . '"' : '') . ($slider_ids ? ' ids="' . esc_attr($slider_ids) . '"' : '') . ($slider_count ? ' count="' . esc_attr($slider_count) . '"' : '') . ($slider_orderby ? ' orderby="' . esc_attr($slider_orderby) . '"' : '') . ($slider_order ? ' order="' . esc_attr($slider_order) . '"' : '') . ($slider_pagination ? ' pagination="' . esc_attr($slider_pagination) . '"' : '') . '][/trx_slider]');
             }
         }
     }
 }
예제 #17
0
    function axiom_template_single_portfolio_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $avg_author = 0;
        $avg_users = 0;
        if (!$post_data['post_protected'] && $post_options['reviews'] && axiom_get_custom_option('show_reviews') == 'yes') {
            $avg_author = $post_data['post_reviews_author'];
            $avg_users = $post_data['post_reviews_users'];
        }
        $show_title = axiom_get_custom_option('show_post_title') == 'yes' && (axiom_get_custom_option('show_post_title_on_quotes') == 'yes' || !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote')));
        axiom_open_wrapper('<article class="' . join(' ', get_post_class('itemscope' . ' post_item' . ' post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']))) . '"' . ' itemscope itemtype="http://schema.org/' . ($avg_author > 0 || $avg_users > 0 ? 'Review' : 'Article') . '">');
        require axiom_get_file_dir('templates/parts/prev-next-posts.php');
        if ($show_title) {
            ?>
			<h1 itemprop="<?php 
            echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
            ?>
" class="post_title entry-title"><?php 
            echo $post_data['post_title'];
            ?>
</h1>
			<?php 
        }
        if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        require axiom_get_file_dir('templates/parts/reviews-block.php');
        axiom_open_wrapper('<section class="post_content" itemprop="' . ($avg_author > 0 || $avg_users > 0 ? 'reviewBody' : 'articleBody') . '">');
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
            echo get_the_password_form();
        } else {
            if (axiom_strpos($post_data['post_content'], axiom_sc_reviews_placeholder()) === false) {
                $post_data['post_content'] = do_shortcode('[trx_reviews]') . $post_data['post_content'];
            }
            echo trim(axiom_sc_gap_wrapper(axiom_sc_reviews_wrapper($post_data['post_content'])));
            require axiom_get_file_dir('templates/parts/single-pagination.php');
            if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
                ?>
				<div class="post_info">
					<span class="post_info_item post_info_tags"><?php 
                _e('in', 'axiom');
                ?>
 <?php 
                echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links);
                ?>
</span>
				</div>
				<?php 
            }
        }
        axiom_close_wrapper();
        // .post_content
        if (!$post_data['post_protected']) {
            if ($post_data['post_edit_enable']) {
                require axiom_get_file_dir('templates/parts/editor-area.php');
            }
            require axiom_get_file_dir('templates/parts/author-info.php');
            require axiom_get_file_dir('templates/parts/share.php');
            require axiom_get_file_dir('templates/parts/related-posts.php');
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        axiom_close_wrapper();
        // .post_item
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
예제 #18
0
파일: type.team.php 프로젝트: pcuervo/odc
 function axiom_team_get_current_taxonomy($tax, $page)
 {
     if (!empty($tax)) {
         return $tax;
     }
     if (axiom_strpos($page, 'team') !== false) {
         $tax = 'team_group';
     }
     return $tax;
 }
예제 #19
0
 function axiom_woocommerce_get_current_taxonomy($tax, $page)
 {
     if (!empty($tax)) {
         return $tax;
     }
     if (axiom_strpos($page, 'woocommerce') !== false) {
         $tax = 'product_cat';
     }
     return $tax;
 }
예제 #20
0
파일: core.html.php 프로젝트: pcuervo/odc
 function axiom_get_css_selector_property($css, $selector, $prop)
 {
     $rez = '';
     if (!file_exists($css)) {
         return $rez;
     }
     $file = axiom_fga($css);
     foreach ($file as $row) {
         if (($pos = axiom_strpos($row, $selector)) === false) {
             continue;
         }
         if (($pos2 = axiom_strpos($row, $prop . ':', $pos)) !== false && ($pos3 = axiom_strpos($row, ';', $pos2)) !== false && $pos2 < $pos3) {
             $rez = trim(chop(axiom_substr($row, $pos2 + axiom_strlen($prop) + 1, $pos3 - $pos2 - axiom_strlen($prop) - 1)));
             break;
         }
     }
     return $rez;
 }
예제 #21
0
파일: core.theme.php 프로젝트: pcuervo/odc
 function axiom_enqueue_portfolio($hover = '')
 {
     if (axiom_get_theme_option('debug_mode') == 'yes' || axiom_get_theme_option('packed_scripts') == 'no' || !file_exists(axiom_get_file_dir('css/__packed.css'))) {
         axiom_enqueue_style('axiom-portfolio-style', axiom_get_file_url('css/core.portfolio.css'), array(), null);
         if (axiom_strpos($hover, 'effect_dir') !== false) {
             axiom_enqueue_script('hoverdir', axiom_get_file_url('js/hover/jquery.hoverdir.js'), array(), null, true);
         }
     }
 }
예제 #22
0
파일: core.wp.php 프로젝트: pcuervo/odc
 function axiom_query_posts_where($where, $query)
 {
     global $wpdb;
     if (is_admin() || $query->is_attachment) {
         return $where;
     }
     if (axiom_strpos($where, 'post_status') === false && (!isset($_REQUEST['preview']) || $_REQUEST['preview'] != 'true') && (!isset($_REQUEST['vc_editable']) || $_REQUEST['vc_editable'] != 'true')) {
         if (current_user_can('read_private_pages') && current_user_can('read_private_posts')) {
             $where .= " AND (" . esc_sql($wpdb->posts) . ".post_status='publish' OR " . esc_sql($wpdb->posts) . ".post_status='private')";
         } else {
             $where .= " AND " . esc_sql($wpdb->posts) . ".post_status='publish'";
         }
     }
     return $where;
 }
예제 #23
0
            }
        }
    }
    if (axiom_strpos($show_counters, 'stars') !== false && $post_counters > 0) {
        if (axiom_strpos($post_counters, '.') === false) {
            $post_counters .= '.0';
        }
        if (axiom_get_custom_option('show_reviews') == 'yes') {
            $output .= '<div class="post_rating reviews_summary blog_reviews">' . '<div class="criteria_summary criteria_row">' . trim(axiom_reviews_get_summary_stars($post_counters, false, false, 5)) . '</div>' . '</div>';
        }
    }
}
if ($show_date || $show_counters || $show_author) {
    $output .= '<div class="post_info">';
    $post_date = date("M d, Y", strtotime($post_date));
    if ($show_date) {
        $output .= '<span class="post_info_item post_info_posted">' . ($post_link ? '<a href="' . esc_url($post_link) . '" class="post_info_date">' : '') . $post_date . ($post_link ? '</a>' : '') . '</span>';
    }
    if ($show_author) {
        $post_author_id = $post->post_author;
        $post_author_name = get_the_author_meta('display_name', $post_author_id);
        $post_author_url = get_author_posts_url($post_author_id, '');
        $output .= '<span class="post_info_item post_info_posted_by">' . __('by', 'axiom') . ' ' . ($post_link ? '<a href="' . esc_url($post_author_url) . '" class="post_info_author">' : '') . $post_author_name . ($post_link ? '</a>' : '') . '</span>';
    }
    if ($show_counters && axiom_strpos($show_counters, 'stars') === false) {
        $post_counters_link = axiom_strpos($show_counters, 'comments') !== false ? get_comments_link($post_id) : $post_link;
        $output .= '<span class="post_info_item post_info_counters">' . ($post_link ? '<a href="' . esc_url($post_counters_link) . '"' : '<span') . ' class="post_counters_item ' . esc_attr($post_counters_icon) . '">' . '<span class="post_counters_number">' . $post_counters . '</span>' . ($post_link ? '</a>' : '</span>') . '</span>';
    }
    $output .= '</div>';
}
$output .= '</div>' . '</article>';
예제 #24
0
파일: core.lists.php 프로젝트: pcuervo/odc
 function axiom_get_list_templates($mode = '')
 {
     global $AXIOM_GLOBALS;
     if (isset($AXIOM_GLOBALS['list_templates_' . $mode])) {
         $list = $AXIOM_GLOBALS['list_templates_' . $mode];
     } else {
         $list = array();
         foreach ($AXIOM_GLOBALS['registered_templates'] as $k => $v) {
             if ($mode == '' || axiom_strpos($v['mode'], $mode) !== false) {
                 $list[$k] = !empty($v['title']) ? $v['title'] : axiom_strtoproper($v['layout']);
             }
         }
         $AXIOM_GLOBALS['list_templates_' . $mode] = $list;
     }
     return $list;
 }
예제 #25
0
 function axiom_strclear($text, $tags = array())
 {
     if (empty($text)) {
         return $text;
     }
     if (!is_array($tags)) {
         if ($tags != '') {
             $tags = explode($tags, ',');
         } else {
             $tags = array();
         }
     }
     $text = trim(chop($text));
     if (count($tags) > 0) {
         foreach ($tags as $tag) {
             $open = '<' . esc_attr($tag);
             $close = '</' . esc_attr($tag) . '>';
             if (axiom_substr($text, 0, axiom_strlen($open)) == $open) {
                 $pos = axiom_strpos($text, '>');
                 if ($pos !== false) {
                     $text = axiom_substr($text, $pos + 1);
                 }
             }
             if (axiom_substr($text, -axiom_strlen($close)) == $close) {
                 $text = axiom_substr($text, 0, axiom_strlen($text) - axiom_strlen($close));
             }
             $text = trim(chop($text));
         }
     }
     return $text;
 }
예제 #26
0
        }
    }
    // Author marks
    if ($reviews_first_author || !$reviews_second_hide) {
        $field["id"] = "reviews_marks_author";
        $field["descr"] = strip_tags($post_data['post_excerpt']);
        $field["accept"] = false;
        $marks = axiom_reviews_marks_to_display(axiom_reviews_marks_prepare(axiom_get_custom_option('reviews_marks'), count($field['options'])));
        $output .= '<div id="author_marks" class="sc_tabs_content">' . trim(axiom_reviews_get_markup($field, $marks, false, false, $reviews_first_author)) . '</div>';
    }
    // Users marks
    if (!$reviews_first_author || !$reviews_second_hide) {
        $marks = axiom_reviews_marks_to_display(axiom_reviews_marks_prepare(get_post_meta($post_data['post_id'], 'reviews_marks2', true), count($field['options'])));
        $users = max(0, get_post_meta($post_data['post_id'], 'reviews_users', true));
        $field["id"] = "reviews_marks_users";
        $field["descr"] = sprintf(__("Summary rating from <b>%s</b> user's marks.", 'axiom'), $users) . ' ' . (!isset($_COOKIE['axiom_votes']) || axiom_strpos($_COOKIE['axiom_votes'], ',' . $post_data['post_id'] . ',') === false ? __('You can set own marks for this article - just click on stars above and press "Accept".', 'axiom') : __('Thanks for your vote!', 'axiom'));
        $field["accept"] = $allow_user_marks;
        $output .= '<div id="users_marks" class="sc_tabs_content"' . (!$output ? ' style="display: block;"' : '') . '>' . trim(axiom_reviews_get_markup($field, $marks, $allow_user_marks, false, !$reviews_first_author)) . '</div>';
    }
    $reviews_markup .= $output . '</div>';
    if ($allow_user_marks) {
        axiom_enqueue_script('jquery-ui-draggable', false, array('jquery', 'jquery-ui-core'), null, true);
        $reviews_markup .= '
			<script type="text/javascript">
				jQuery(document).ready(function() {
					AXIOM_GLOBALS["reviews_allow_user_marks"] = ' . ($allow_user_marks ? 'true' : 'false') . ';
					AXIOM_GLOBALS["reviews_max_level"] = ' . $max_level . ';
					AXIOM_GLOBALS["reviews_levels"] = "' . trim(axiom_get_theme_option('reviews_criterias_levels')) . '";
					AXIOM_GLOBALS["reviews_vote"] = "' . (isset($_COOKIE['axiom_votes']) ? $_COOKIE['axiom_votes'] : '') . '";
					AXIOM_GLOBALS["reviews_marks"] = "' . $marks . '".split(",");
					AXIOM_GLOBALS["reviews_users"] = ' . max(0, $users) . ';
예제 #27
0
    function axiom_template_single_standard_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $avg_author = 0;
        $avg_users = 0;
        if (!$post_data['post_protected'] && $post_options['reviews'] && axiom_get_custom_option('show_reviews') == 'yes') {
            $avg_author = $post_data['post_reviews_author'];
            $avg_users = $post_data['post_reviews_users'];
        }
        $show_title = axiom_get_custom_option('show_post_title') == 'yes' && (axiom_get_custom_option('show_post_title_on_quotes') == 'yes' || !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote')));
        $title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
        axiom_open_wrapper('<article class="' . join(' ', get_post_class('itemscope' . ' post_item post_item_single' . ' post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']))) . '"' . ' itemscope itemtype="http://schema.org/' . ($avg_author > 0 || $avg_users > 0 ? 'Review' : 'Article') . '">');
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        if ($show_title && $post_options['location'] == 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="<?php 
            echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
            ?>
" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
		<?php 
        }
        if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || axiom_get_custom_option('show_featured_image') == 'yes' && $post_data['post_thumb'])) {
            ?>
			<section class="post_featured">
			<?php 
            if (!empty($post_options['dedicated'])) {
                echo $post_options['dedicated'];
            } else {
                axiom_enqueue_popup();
                ?>
				<div class="post_thumb" data-image="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" data-title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
">
					<a class="hover_icon hover_icon_view" href="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
"><?php 
                echo $post_data['post_thumb'];
                ?>
</a>
				</div>
				<?php 
            }
            ?>
			</section>
			<?php 
        }
        if ($show_title && $post_options['location'] != 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="<?php 
            echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
            ?>
" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
			<?php 
        }
        if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
            $info_parts = array('snippets' => true);
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        require axiom_get_file_dir('templates/parts/reviews-block.php');
        axiom_open_wrapper('<section class="post_content" itemprop="' . ($avg_author > 0 || $avg_users > 0 ? 'reviewBody' : 'articleBody') . '">');
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
            echo get_the_password_form();
        } else {
            global $AXIOM_GLOBALS;
            if (axiom_strpos($post_data['post_content'], axiom_sc_reviews_placeholder()) === false) {
                $post_data['post_content'] = do_shortcode('[trx_reviews]') . $post_data['post_content'];
            }
            echo trim(axiom_sc_gap_wrapper(axiom_sc_reviews_wrapper($post_data['post_content'])));
            require axiom_get_file_dir('templates/parts/single-pagination.php');
            if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
                ?>
				<div class="post_info post_info_bottom">
					<span class="post_info_item post_info_tags"><?php 
                _e('Tags:', 'axiom');
                ?>
 <?php 
                echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links);
                ?>
</span>
				</div>
				<?php 
            }
        }
        axiom_close_wrapper();
        // .post_content
        if (!$post_data['post_protected']) {
            if ($post_data['post_edit_enable']) {
                require axiom_get_file_dir('templates/parts/editor-area.php');
            }
            require axiom_get_file_dir('templates/parts/author-info.php');
            require axiom_get_file_dir('templates/parts/share.php');
        }
        $sidebar_present = !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main'));
        if (!$sidebar_present) {
            axiom_close_wrapper();
        }
        // .post_item
        require axiom_get_file_dir('templates/parts/related-posts.php');
        if ($sidebar_present) {
            axiom_close_wrapper();
        }
        // .post_item
        if (!$post_data['post_protected']) {
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
예제 #28
0
파일: core.media.php 프로젝트: pcuervo/odc
 function axiom_get_first_url($post_text)
 {
     $src = '';
     if (($pos_start = axiom_strpos($post_text, 'http')) !== false) {
         for ($i = $pos_start; $i < axiom_strlen($post_text); $i++) {
             $ch = axiom_substr($post_text, $i, 1);
             if (axiom_strpos("< \n\"\\']", $ch) !== false) {
                 break;
             }
             $src .= $ch;
         }
     }
     return $src;
 }