array()); $form = apply_filters("gform_admin_pre_render_" . $form_id, apply_filters("gform_admin_pre_render", $form)); if(isset($form['id'])) echo ""; else echo ""; ?>

', '') ?>
">

 
;">
">
" alt="" title="" />
    " style="position: relative;">
;">
">
" alt="" title="" />

' . __("Delete Form", "gravityforms") . ''; echo apply_filters("gform_form_delete_link", $delete_link); } $button_text = rgar($form,"id") > 0 ? __("Update Form", "gravityforms") : __("Save Form", "gravityforms"); $isNew = rgar($form, "id") > 0 ? 0 : 1; $save_button = ''; $save_button = apply_filters("gform_save_form_button", $save_button); echo $save_button; ?>
"; } } //Hierarchical category functions copied from WordPress core and modified. private static function _cat_rows( $categories, &$count, &$output, $parent = 0, $level = 0, $page = 1, $per_page = 9999999 ) { if ( empty($categories) ) { $args = array('hide_empty' => 0); if ( !empty($_POST['search']) ) $args['search'] = $_POST['search']; $categories = get_categories( $args ); } if ( !$categories ) return false; $children = self::_get_term_hierarchy('category'); $start = ($page - 1) * $per_page; $end = $start + $per_page; $i = -1; foreach ( $categories as $category ) { if ( $count >= $end ) break; $i++; if ( $category->parent != $parent ) continue; // If the page starts in a subtree, print the parents. if ( $count == $start && $category->parent > 0 ) { $my_parents = array(); while ( $my_parent) { $my_parent = get_category($my_parent); $my_parents[] = $my_parent; if ( !$my_parent->parent ) break; $my_parent = $my_parent->parent; } $num_parents = count($my_parents); while( $my_parent = array_pop($my_parents) ) { self::_cat_row( $my_parent, $level - $num_parents, $output ); $num_parents--; } } if ( $count >= $start ) self::_cat_row( $category, $level, $output ); //unset($categories[$i]); // Prune the working set $count++; if ( isset($children[$category->term_id]) ) self::_cat_rows( $categories, $count, $output, $category->term_id, $level + 1, $page, $per_page ); } } private static function _cat_row( $category, $level, &$output, $name_override = false ) { static $row_class = ''; $cat = get_category( $category, OBJECT, 'display' ); $default_cat_id = (int) get_option( 'default_category' ); $pad = str_repeat( '— ', $level ); $name = ( $name_override ? $name_override : $pad . ' ' . $cat->name ); $cat->count = number_format_i18n( $cat->count ); $output .=" $name "; } private static function _get_term_hierarchy($taxonomy) { if ( !is_taxonomy_hierarchical($taxonomy) ) return array(); $children = get_option("{$taxonomy}_children"); if ( is_array($children) ) return $children; $children = array(); $terms = get_terms($taxonomy, 'get=all'); foreach ( $terms as $term ) { if ( $term->parent > 0 ) $children[$term->parent][] = $term->term_id; } update_option("{$taxonomy}_children", $children); return $children; } private static function insert_variable_prepopulate($element_id, $callback=""){ ?>