Plugin Directory

Changeset 1304678


Ignore:
Timestamp:
12/09/2015 09:01:36 PM (10 years ago)
Author:
dileep1984
Message:

Added feed id as custom meta of post suggested by Elliot

Location:
wp-rss-importer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-rss-importer/trunk/admin/class-admin.php

    r1300796 r1304678  
    3838                 update_option('logics_sourcelink',$_POST['logics']['sourcelinktext']);
    3939                 update_option('logics_source_url_meta',$_POST['logics']['source_url_meta']);
     40                 /* Modification  suggested by Elliot */
     41                 update_option('logics_feed_id_meta',$_POST['logics']['feed_id_meta']);
     42                 /*End of modification*/
    4043                 echo 'Updated..';
    4144             }
     
    260263                    if(get_option('logics_source_url_meta') == 1) {
    261264                        add_post_meta( $post_id, 'wpri_sourcelink', $xmltoarray[0] );
     265                    }
     266                    /* Modification  suggested by Elliot */
     267                    if(get_option('logics_feed_id_meta') == 1) {
     268                        add_post_meta( $post_id, 'wpri_feedid', $rss_id );
    262269                    }
     270                    /*End of mod*/
    263271                    wp_set_object_terms( $post_id, $termArray, $rdata['taxid'] );
    264272                    global $wpdb;
  • wp-rss-importer/trunk/admin/templates/setting-rss.php

    r1300796 r1304678  
    1616        <p><input type="checkbox" name="logics[source_url_meta]" value="1" <?php if(get_option('logics_source_url_meta') == 1) { ?> checked <?php } ?> /> Save source URL as custom meta of post for future use</p>
    1717
     18        <!-- Save feed id as custom meta feature added by Elliot Sabitov -->
     19        <p><input type="checkbox" name="logics[feed_id_meta]" value="1" <?php if(get_option('logics_feed_id_meta') == 1) { ?> checked <?php } ?> /> Save Feed ID as custom meta of post for future use</p>
     20        <!-- end of save feed id -->
     21
    1822         <p>
    1923               <input type="hidden" name="logics_actions" value="logics_setting_rss" />
  • wp-rss-importer/trunk/wp-rss-importer.php

    r1292076 r1304678  
    172172                    if(get_option(logics_source_url_meta) == 1) {
    173173                        add_post_meta( $post_id, 'wpri_sourcelink', $xmltoarray[0] );
     174                    }
     175                    /* Modification  suggested by Elliot */
     176                    if(get_option(logics_feed_id_meta) == 1) {
     177                        add_post_meta( $post_id, 'wpri_feedid', $_REQUEST[id] );
    174178                    }
     179                    /*End of mod*/
    175180                    wp_set_object_terms( $post_id, $termArray, $rdata['taxid'] );
    176181                    global $wpdb;
Note: See TracChangeset for help on using the changeset viewer.