File tree Expand file tree Collapse file tree 6 files changed +33
-45
lines changed
Expand file tree Collapse file tree 6 files changed +33
-45
lines changed Original file line number Diff line number Diff line change 66 "magento/magento-composer-installer" : " *"
77 },
88 "type" : " magento2-module" ,
9+ "version" : " 0.1.1" ,
910 "autoload" : {
1011 "files" : [
1112 " src/registration.php"
1415 "Skywire\\ WordpressApi\\ " : " src"
1516 }
1617 }
17- }
18+ }
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ protected abstract function _getRoute($id = '');
150150 */
151151 protected function _parseRoute ($ id = '' )
152152 {
153- $ apiPath = trim ( $ this ->scopeConfig ->getValue ('skywire_wordpress_api/api/path ' ), ' / ' );
153+ $ apiPath = $ this ->scopeConfig ->getValue ('skywire_wordpress_api/api/path ' );
154154 $ route = str_replace (':id ' , $ id , $ this ->_getRoute ());
155155 $ route = trim ($ route , '/ ' );
156156
@@ -229,4 +229,4 @@ protected function _applyAuth(\Zend_Rest_Client $client)
229229 $ client ->getHttpClient ()->setAuth ($ username , $ password );
230230 }
231231 }
232- }
232+ }
Original file line number Diff line number Diff line change 1616 <field id =" path" translate =" label" type =" text" sortOrder =" 10" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
1717 <label >WP API Path</label >
1818 <comment >e.g. /wp-json/wp/v2</comment >
19- <validate >required-entry validate-url</validate >
2019 </field >
2120 <field id =" username" translate =" label" type =" text" sortOrder =" 20" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
2221 <label >Username</label >
2928 </group >
3029 </section >
3130 </system >
32- </config >
31+ </config >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
3- <module name =" Skywire_WordpressApi" setup_version =" 0.1.0 " >
3+ <module name =" Skywire_WordpressApi" setup_version =" 0.1.1 " >
44 </module >
5- </config >
5+ </config >
Original file line number Diff line number Diff line change 11<?php /* @var Skywire\WordpressApi\Block\Post $block */ ?>
22<?php $ post = $ block ->getPost () ?>
33<article class="row post">
4- <div class="medium-4 medium-push-8 columns">
5- <div class='hex-wrapper'>
6- <?php if ($ image = $ block ->getFeaturedImage ()): ?>
7- <div class="feature-img" style="background-image:url('<?php echo $ image ; ?> ');"></div>
8- <?php endif ; ?>
9- </div>
4+ <?php if ($ image = $ block ->getFeaturedImage ()): ?>
5+ <div class="feature-img" style="background-image:url('<?php echo $ image ; ?> ');"></div>
6+ <?php endif ; ?>
7+
8+ <div class="entry-header">
9+ <h2 class="entry-title">
10+ <a href="<?php echo $ block ->getPostUrl (); ?> ">
11+ <?php echo $ post ->getTitle ()->getRendered (); ?>
12+ </a>
13+ </h2>
1014 </div>
1115
12- <div class="medium-8 medium-pull-4 columns">
13- <div class="entry-header">
14- <h2 class="entry-title">
15- <a href="<?php echo $ block ->getPostUrl (); ?> ">
16- <?php echo $ post ->getTitle ()->getRendered (); ?>
17- </a>
18- </h2>
19- </div>
20- <div class="entry-summary">
21- <p><?php echo $ post ->getExcerpt ()->getRendered (); ?> </p>
22- <p><a href="<?php echo $ block ->getPostUrl (); ?> " class="more-link"><?php echo __ ('Read more ' ); ?> </a>
23- </p>
24- </div>
16+ <div class="entry-summary">
17+ <p><?php echo $ post ->getExcerpt ()->getRendered (); ?> </p>
18+ <p><a href="<?php echo $ block ->getPostUrl (); ?> " class="more-link"><?php echo __ ('Read more ' ); ?> </a></p>
2519 </div>
2620</article>
Original file line number Diff line number Diff line change 11<?php /* @var Skywire\WordpressApi\Block\Post $block */ ?>
22<?php $ post = $ block ->getPost () ?>
33<article class="row post">
4- <div class="medium-4 medium-push-8 columns">
5- <div class='hex-wrapper'>
6- <?php if ($ image = $ block ->getFeaturedImage ()): ?>
7- <div class="feature-img" style="background-image:url('<?php echo $ image ; ?> ');"></div>
8- <?php endif ; ?>
9- </div>
4+ <?php if ($ image = $ block ->getFeaturedImage ()): ?>
5+ <div class="feature-img" style="background-image:url('<?php echo $ image ; ?> ');"></div>
6+ <?php endif ; ?>
7+
8+ <div class="entry-header">
9+ <h2 class="entry-title">
10+ <a href="<?php echo $ block ->getPostUrl (); ?> ">
11+ <?php echo $ post ->getTitle ()->getRendered (); ?>
12+ </a>
13+ </h2>
1014 </div>
1115
12- <div class="medium-8 medium-pull-4 columns">
13- <div class="entry-header">
14- <h2 class="entry-title">
15- <a href="<?php echo $ block ->getPostUrl (); ?> ">
16- <?php echo $ post ->getTitle ()->getRendered (); ?>
17- </a>
18- </h2>
19- </div>
20- <div class="entry-summary">
21- <p><?php echo $ post ->getExcerpt ()->getRendered (); ?> </p>
22- <p><a href="<?php echo $ block ->getPostUrl (); ?> " class="more-link"><?php echo __ ('Read more ' ); ?> </a>
23- </p>
24- </div>
16+ <div class="entry-summary">
17+ <p><?php echo $ post ->getExcerpt ()->getRendered (); ?> </p>
18+ <p><a href="<?php echo $ block ->getPostUrl (); ?> " class="more-link"><?php echo __ ('Read more ' ); ?> </a></p>
2519 </div>
2620</article>
You can’t perform that action at this time.
0 commit comments