backward.php
4 years ago
get_taxonomies_by_object_type.php
4 years ago
pmxe_filter.php
4 years ago
pmxe_functions.php
4 years ago
pmxe_prepare_price.php
4 years ago
pmxe_render_xml_attributes.php
4 years ago
pmxe_render_xml_element.php
4 years ago
pmxe_render_xml_text.php
4 years ago
str_getcsv.php
4 years ago
wp_all_export_check_children_assign.php
4 years ago
wp_all_export_generate_export_file.php
4 years ago
wp_all_export_get_cpt_name.php
4 years ago
wp_all_export_get_export_format.php
4 years ago
wp_all_export_is_compatible.php
4 years ago
wp_all_export_parse_field_name.php
4 years ago
wp_all_export_posts_join.php
4 years ago
wp_all_export_posts_where.php
4 years ago
wp_all_export_pre_user_query.php
4 years ago
wp_all_export_prepare_template_csv.php
4 years ago
wp_all_export_prepare_template_xml.php
4 years ago
wp_all_export_rand_char.php
4 years ago
wp_all_export_remove_colons.php
4 years ago
wp_all_export_remove_source.php
4 years ago
wp_all_export_reverse_rules_html.php
4 years ago
wp_all_export_rmdir.php
4 years ago
wp_all_export_secure_file.php
4 years ago
wp_all_export_url_title.php
4 years ago
wp_all_export_write_article.php
4 years ago
wp_redirect_or_javascript.php
4 years ago
wp_all_export_reverse_rules_html.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! function_exists('wp_all_export_reverse_rules_html') ) { |
| 4 | function wp_all_export_reverse_rules_html($filter_rules_hierarhy, $parent_rule, &$rulenumber, $condition_labels){ |
| 5 | $child_rules = array(); |
| 6 | foreach ($filter_rules_hierarhy as $j => $rule) if ($rule->parent_id == $parent_rule->item_id and $rule->item_id != $parent_rule->item_id) { $child_rules[] = $rule; } |
| 7 | |
| 8 | if (!empty($child_rules)){ |
| 9 | ?> |
| 10 | <ol> |
| 11 | <?php |
| 12 | foreach ($child_rules as $rule){ |
| 13 | |
| 14 | $condition_label = in_array($rule->element, array('post_date', 'user_registered', 'comment_date')) ? $condition_labels['date'][$rule->condition] : $condition_labels['default'][$rule->condition]; |
| 15 | |
| 16 | $rulenumber++; |
| 17 | |
| 18 | ?> |
| 19 | <li id="item_<?php echo $rulenumber;?>" class="dragging"> |
| 20 | <div class="drag-element"> |
| 21 | <input type="hidden" value="<?php echo $rule->element; ?>" class="wp_all_export_xml_element" name="wp_all_export_xml_element[<?php echo $rulenumber; ?>]"/> |
| 22 | <input type="hidden" value="<?php echo $rule->condition; ?>" class="wp_all_export_rule" name="wp_all_export_rule[<?php echo $rulenumber; ?>]"/> |
| 23 | <input type="hidden" value="<?php echo $rule->value; ?>" class="wp_all_export_value" name="wp_all_export_value[<?php echo $rulenumber; ?>]"/> |
| 24 | <span class="rule_element"><?php echo empty($rule->title) ? $rule->element : $rule->title; ?></span> |
| 25 | <span class="rule_as_is"><?php echo $condition_label; ?></span> |
| 26 | <span class="rule_condition_value"><?php echo $rule->value; ?></span> |
| 27 | <span class="condition <?php if ($rulenumber == count($filter_rules_hierarhy)):?>last_condition<?php endif; ?>"> |
| 28 | <label for="rule_and_<?php echo $rulenumber; ?>">AND</label> |
| 29 | <input id="rule_and_<?php echo $rulenumber; ?>" type="radio" value="and" name="rule[<?php echo $rulenumber; ?>]" <?php if ($rule->clause == 'AND'): ?>checked="checked"<?php endif; ?> class="rule_condition"/> |
| 30 | <label for="rule_or_<?php echo $rulenumber; ?>">OR</label> |
| 31 | <input id="rule_or_<?php echo $rulenumber; ?>" type="radio" value="or" name="rule[<?php echo $rulenumber; ?>]" <?php if ($rule->clause == 'OR'): ?>checked="checked"<?php endif; ?> class="rule_condition"/> |
| 32 | </span> |
| 33 | </div> |
| 34 | <a href="javascript:void(0);" class="icon-item remove-ico"></a> |
| 35 | <?php echo wp_all_export_reverse_rules_html($filter_rules_hierarhy, $rule, $rulenumber, $condition_labels); ?> |
| 36 | </li> |
| 37 | <?php |
| 38 | } |
| 39 | ?> |
| 40 | </ol> |
| 41 | <?php |
| 42 | } |
| 43 | } |
| 44 | } |