Plugin Directory

Changeset 2099357


Ignore:
Timestamp:
06/02/2019 02:27:13 PM (7 years ago)
Author:
chartspms
Message:

Dynamic URL and description added to snippets

Location:
chartsbeds/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chartsbeds/trunk/chartsbeds_admin.php

    r2095290 r2099357  
    5656    $snPropname = $_POST['cbsnippet_propname'];
    5757    update_option('cbsnippet_propname', $snPropname);
    58     $snPageurl = $_POST['cbsnippet_pageurl'];
    59     update_option('cbsnippet_pageurl', $snPageurl);
     58    $snDesc = $_POST['cbsnippet_description'];
     59    update_option('cbsnippet_description', $snDesc);
    6060    $snCountry = $_POST['cbsnippet_country'];
    6161    update_option('cbsnippet_country', $snCountry);
     
    8686
    8787    $snPropname = get_option('cbsnippet_propname');
    88     $snPageurl = get_option('cbsnippet_pageurl');
     88    $snDesc = get_option('cbsnippet_description');
    8989    $snCountry = get_option('cbsnippet_country');
    9090    $snCity = get_option('cbsnippet_city');
     
    149149            <p><input type="text" name="cbsnippet_propname" id="cbsnippet_propname" value="<?php echo $snPropname ?>" size="110"></p>
    150150
    151             <?php _e("Reviews page url:" ); ?>
    152             <p><input type="text" name="cbsnippet_pageurl" id="cbsnippet_pageurl" value="<?php echo $snPageurl ?>" size="110"></p>
     151            <?php _e("Description:" ); ?>
     152            <p><textarea rows="4" cols="112" style="resize: none;" name="cbsnippet_description" id="cbsnippet_description"><?php echo $snDesc ?></textarea></p>
    153153
    154154            <?php _e("Country:" ); ?>
  • chartsbeds/trunk/chartsbeds_rich_snippets.php

    r2095586 r2099357  
    99
    1010    $pName = get_option("cbsnippet_propname");
    11     $pUrl = get_option("cbsnippet_pageurl");
     11    $pDesc = get_option("cbsnippet_description");
    1212    $pCountry = get_option("cbsnippet_country");
    1313    $pCity = get_option("cbsnippet_city");
     
    1616    $pPhone = get_option("cbsnippet_phone");
    1717    $pPrice = get_option("cbsnippet_price");
    18     $pLogo = get_option("cbsnippet_logo");;
     18    $pLogo = get_option("cbsnippet_logo");
     19    global $wp;
     20    $pUrl = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
    1921
    2022    $snipOut = '
     
    2426            "@type": "LodgingBusiness",
    2527            "name": "'.$pName.'",
     28            "description":"'.$pDesc.'",
    2629            "url": "'.$pUrl.'",
    2730            "image": "'.$pLogo.'",
Note: See TracChangeset for help on using the changeset viewer.