fixing the parallax ajax function so that categories are carried over
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 17 May 2018 14:43:46 +0000 (10:43 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 17 May 2018 14:43:46 +0000 (10:43 -0400)
inc/ajax.php
inc/blog.php

index 0525fa6..88cffe6 100644 (file)
@@ -6,7 +6,10 @@
        // Pull all the pages into an array
        $options_pages_obj = get_pages('sort_column=post_parent,menu_order');
 
-       $options_categories_obj = get_categories();
+    
+    $taxonomy = 'parallax_posts_category';
+    $terms = get_terms($taxonomy);
+    $options_categories_obj = $terms;
 
     $countsettings = esc_attr( $_REQUEST['count_section'] );
     $args = array(
@@ -62,7 +65,7 @@
 <select name="accesspress_parallax[parallax_section][<?php echo $countsettings; ?>][category]" class="of-input">
        <option value=""><?php _e('Select a Category:', 'accesspress-parallax') ?></option>
 <?php foreach ($options_categories_obj as $category) { ?>
-       <option value="<?php echo absint( $category->cat_ID ); ?>"><?php echo esc_html( $category->cat_name ); ?></option>
+       <option value="<?php echo absint( $category->term_id ); ?>"><?php echo esc_html( $category->name ); ?></option>
 <?php } ?>
 </select>
 </div>
index 6d50f02..631d1d4 100644 (file)
@@ -39,8 +39,8 @@ function panels_custom_post_type() {
         'add_new_item'          => __( 'Add New Panel Post' ),
         'add_new'               => __( 'Add New' ),
         'new_item'              => __( 'New Panel Post' ),
-        'edit_item'             => __( 'Edit Room' ),
-        'update_item'           => __( 'Update Room' ),
+        'edit_item'             => __( 'Edit Panel' ),
+        'update_item'           => __( 'Update Panel' ),
         'view_item'             => __( 'View Panel Post' ),
         'search_items'          => __( 'Search Panel Posts' ),
         'not_found'             => __( 'Not found' ),