芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/public_html/wp-content/plugins/slider-1762697276/eps-form-elements.php
url_to) && is_numeric($redirect->url_to)) ? get_post(intval($redirect->url_to)) : null; $post_types = get_post_types(array( 'public' => true ), 'objects'); $html = eps_get_type_select($post_types, $current_post); // Get all the post type select boxes. foreach ($post_types as $post_type) { $html .= eps_get_post_type_selects($post_type->name, $current_post); } // Get the term select box. $html .= eps_get_term_archive_select(); // The default input, javascript will populate this input with the final URL for submission. $html .= '
type) || ((isset($redirect->type) && $redirect->type != 'post')) ? null : ' style="display:none;"') . '" />
Remember: all external URLs have to start with
https://
'; return $html; } /** * * GET_DESTINATION * * This function will output the formatted destination string. * * @return html string * @author WebFactory Ltd * */ function eps_get_destination($redirect = false) { if (isset($redirect->url_to)) { if (is_numeric($redirect->url_to)) { // This redirect points to a post if (get_permalink($redirect->url_to)) { ?>
url_to))); ?>
ID: url_to); ?>
url_to)); ?>
ID: url_to); ?>
DOES NOT EXIST
URL:
url_to)); ?>
Invalid Destination URL'; } } /** * * GET_TYPE_SELECT * * This function will output the available destination types. * * @return html string * @author WebFactory Ltd * */ function eps_get_type_select($post_types, $current_post = false) { $html = '
'; $html .= '
Custom
'; foreach ($post_types as $post_type) { $html .= '
post_type == $post_type->name ? 'selected="selected"' : null) . '>' . $post_type->labels->singular_name . '
'; } $html .= '
Term Archive
'; $html .= '
'; return $html; } /** * * GET_POST_TYPE_SELECT * * This function will output the available post types. * * @return html string * @author WebFactory Ltd * */ function eps_get_post_type_selects($post_type, $current_post = false) { // Start the select. $html = '
post_type == $post_type) ? null : 'style="display:none;"') . '>'; $html .= '
...
'; if (false === ($options = get_transient('post_type_cache_' . $post_type))) { $options = eps_dropdown_pages(array('post_type' => $post_type)); set_transient('post_type_cache_' . $post_type, $options, HOUR_IN_SECONDS); } foreach ($options as $option => $value) { $html .= '
ID == $value ? 'selected="selected"' : null) . ' >' . ucwords($option) . '
'; } $html .= '
'; return $html; } /** * * GET_TERM_ARCHIVE_SELECT * * This function will output a select box with all the taxonomies and terms. * * @return html string * @author WebFactory Ltd * */ function eps_get_term_archive_select() { $taxonomies = get_taxonomies('', 'objects'); if (!$taxonomies) return false; // Start the select. $html = '
'; $html .= '
...
'; // Loop through all taxonomies. foreach ($taxonomies as $tax) { $terms = get_terms($tax->name, array('hide_empty' => false)); // show empty terms. $html .= '
' . $tax->labels->singular_name . '
'; // Loop through all terms in this taxonomy and insert them as options. foreach ($terms as $term) $html .= '
- ' . $term->name . '
'; } $html .= '
'; return $html; } function eps_get_ordered_filter($field, $label, $classes = array()) { global $EPS_Redirects_Plugin; $nextOrder = 'asc'; $arrow = false; if (isset($_GET['orderby']) && sanitize_text_field($_GET['orderby']) == $field) { $arrow = '↓'; if (isset($_GET['order']) && sanitize_text_field($_GET['order']) != 'desc') { $nextOrder = 'desc'; $arrow = '↑'; } } printf( '
%s %s
', esc_attr(implode(' ', $classes)), esc_url($EPS_Redirects_Plugin->admin_url(array('orderby' => $field, 'order' => $nextOrder))), esc_attr($label), esc_attr($arrow) ); }