Version Description
(13, April 2020) = * [+] New - Added Gutenberg block support. Now use plugin easily with Gutenberg! * [+] New - Added 'align' and 'extra_class' parameter for slider shortcode. Now both slider shortcode are support twenty-ninteent and twenty-twenty theme gutenberg block align and additional class feature. * [*] Tweak - Code optimization and performance improvements.
Download this release
Release Info
Developer | wponlinesupport |
Plugin | WP Responsive Recent Post Slider |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.3
- assets/css/blocks.editor.build.css +1 -0
- assets/js/blocks.build.js +1 -0
- includes/admin/class-wprps-admin.php +33 -2
- includes/admin/settings/hire-us.php +13 -13
- includes/admin/settings/premium.php +1 -1
- includes/admin/supports/gutenberg-block.php +276 -0
- includes/admin/wprps-how-it-work.php +16 -16
- includes/shortcodes/wppsac-carousel.php +65 -52
- includes/shortcodes/wppsac-slider.php +77 -64
- includes/wppsac-function.php +33 -25
- languages/wp-responsive-recent-post-slider-en_US-wprps-free-block-js.json +1 -0
- readme.txt +10 -2
- templates/carousel/design-1.php +43 -32
- templates/slider/design-1.php +50 -40
- templates/slider/design-2.php +46 -35
- templates/slider/design-3.php +42 -31
- templates/slider/design-4.php +56 -45
- wp-recent-post-slider.php +60 -8
assets/css/blocks.editor.build.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wpos-guten-shrt{border:1px solid #ccc;padding:8px;line-height:22px;background-color:#eee;font-size:13px;text-align:center;color:#32373c;font-family:arial, sans-serif}.wpos-guten-shrt-title span{border-bottom:2px solid #32373c;margin-bottom:10px;display:inline-block;font-size:16px;font-weight:600}.wpos-guten-shrt .wpos-guten-shrt-footer{margin:10px 0 0 0}.wpos-guten-shrt .wpos-guten-shrt-footer span{display:block;border-top:2px solid #ccc;width:50px;margin:5px auto}.components-disabled{opacity:0.5}.components-disabled .wpos-hidden-opts-desc a{pointer-events:auto}
|
assets/js/blocks.build.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){function t(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var r=n(2),s=(n.n(r),n(3)),l=(n.n(s),n(4)),o=n(5),__=wp.i18n.__,p=wp.blocks.registerBlockType;p("wprps/recent-post-slider",{title:__("Recent Post Slider","wp-responsive-recent-post-slider"),description:__("Display recent post in a slider view with various layouts.","wp-responsive-recent-post-slider"),icon:"slides",category:"wpos_guten_block",keywords:[__("wpos"),__("recent post slider","wp-responsive-recent-post-slider"),__("recent-post-slider")],supports:{html:!1,multiple:!0},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t,"data-block-type":"wprpsp-slider"}},edit:l.a,save:function(){return null}}),p("wprps/recent-post-carousel",{title:__("Recent Carousel Slider","wp-responsive-recent-post-slider"),description:__("Display recent post in a carousel slider view with various layouts.","wp-responsive-recent-post-slider"),icon:"slides",category:"wpos_guten_block",keywords:[__("wpos"),__("recent carousel slider","wp-responsive-recent-post-slider"),__("recent-post-carousel")],supports:{html:!1,multiple:!0},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t,"data-block-type":"wprpsp-carousel"}},edit:o.a,save:function(){return null}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.element,i=p.Component,a=p.Fragment,c=wp.components,d=c.PanelBody,m=c.Disabled,w=c.TextControl,u=c.ToggleControl,v=c.RangeControl,h=c.SelectControl,__=wp.i18n.__,g=(wp.data.select,wp.editor),f=g.InspectorControls,E=g.BlockControls,b=g.BlockAlignmentToolbar,y=function(e){function t(){r(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={isLoading:!1},e}return l(t,e),o(t,[{key:"ObjToString",value:function(e){var t=wp.blocks.getBlockAttributes("wprps/recent-post-slider"),n=["content_tail"],r="";for(var s in e)e.hasOwnProperty(s)&&"undefined"!==typeof e[s]&&e[s]!==t[s]&&(""!=jQuery.trim(e[s])||jQuery.inArray(s,n)>=0)&&(r+=s+'="'+e[s]+'" ');return r}},{key:"GetBooleanDropdown",value:function(){return[{value:"true",label:__("True","wp-responsive-recent-post-slider")},{value:"false",label:__("False","wp-responsive-recent-post-slider")}]}},{key:"GetDesigns",value:function(){return[{value:"design-1",label:__("Design 1","wp-responsive-recent-post-slider")},{value:"design-2",label:__("Design 2","wp-responsive-recent-post-slider")},{value:"design-3",label:__("Design 3","wp-responsive-recent-post-slider")},{value:"design-4",label:__("Design 4","wp-responsive-recent-post-slider")}]}},{key:"GetLinkTargetDropdown",value:function(){return[{value:"self",label:__("Same Window","wp-responsive-recent-post-slider")},{value:"blank",label:__("New Window","wp-responsive-recent-post-slider")}]}},{key:"GetPostOrderby",value:function(){return[{value:"date",label:__("Post Date","wp-responsive-recent-post-slider")},{value:"modified",label:__("Post Modified Date","wp-responsive-recent-post-slider")},{value:"title",label:__("Post Title","wp-responsive-recent-post-slider")},{value:"name",label:__("Post Slug","wp-responsive-recent-post-slider")},{value:"ID",label:__("Post ID","wp-responsive-recent-post-slider")},{value:"rand",label:__("Random","wp-responsive-recent-post-slider")},{value:"menu_order",label:__("Menu Order (Sort Order)","wp-responsive-recent-post-slider")}]}},{key:"GetPostOrder",value:function(){return[{value:"desc",label:__("Descending","wp-responsive-recent-post-slider")},{value:"asc",label:__("Ascending","wp-responsive-recent-post-slider")}]}},{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(e){var t=wp.data.select("core/editor").getEditorSettings(),n=t.alignWide;e.attributes;n||this.props.setAttributes({align:void 0})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.design,s=t.show_date,l=t.show_author,o=t.show_category_name,p=t.show_content,i=t.content_words_limit,c=t.show_read_more,g=t.dots,y=t.arrows,_=t.autoplay,k=t.autoplay_interval,P=t.speed,C=t.post_type,B=t.taxonomy,D=t.limit,W=t.category,O=t.posts,N=t.hide_post,S=t.media_size,G=t.align,U=(t.className,this.state.isLoading,wp.element.createElement(f,null,wp.element.createElement(d,{title:__("General Parameters","wp-responsive-recent-post-slider")},wp.element.createElement(h,{label:__("Design","wp-responsive-recent-post-slider"),value:r,options:this.GetDesigns(),onChange:function(e){return n({design:e})}}),wp.element.createElement(u,{label:__("Show Date","wp-responsive-recent-post-slider"),checked:!!s,onChange:function(){return n({show_date:!s})}}),wp.element.createElement(u,{label:__("Show Author","wp-responsive-recent-post-slider"),checked:!!l,onChange:function(){return n({show_author:!l})}}),wp.element.createElement(u,{label:__("Show Category Name","wp-responsive-recent-post-slider"),checked:!!o,onChange:function(){return n({show_category_name:!o})}}),wp.element.createElement(u,{label:__("Show Content","wp-responsive-recent-post-slider"),checked:!!p,onChange:function(){return n({show_content:!p})}}),p&&wp.element.createElement(v,{label:__("Content Words limit","wp-responsive-recent-post-slider"),value:i,onChange:function(e){return n({content_words_limit:e})},min:1,help:__("Enter content word limit.","wp-responsive-recent-post-slider")}),p&&wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Content Tail","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Display dots after the post content as continue reading. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),p&&wp.element.createElement(h,{label:__("Read More","wp-responsive-recent-post-slider"),value:c,options:this.GetBooleanDropdown(),onChange:function(e){return n({show_read_more:e})}}),p&&wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Read More Text","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter read more text. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Link Behaviour","wp-responsive-recent-post-slider"),onChange:function(e){return n({link_target:e})},help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose link target behaviour. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Media Size","wp-responsive-recent-post-slider"),value:S,onChange:function(e){return n({media_size:e})},help:__("Choose WordPress registered image size. e.g thumbnail, medium, large, full.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(v,{label:__("Image Height","wp-responsive-recent-post-slider"),min:0,help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Control height of the featured image. You can enter any numeric number. e.g 500. Leave empty for default height. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Image Fit","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Fill the post image in a whole container. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))}))),wp.element.createElement(d,{title:__("Slider Parameters","wp-responsive-recent-post-slider"),initialOpen:!1},wp.element.createElement(h,{label:__("Dots","wp-responsive-recent-post-slider"),value:g,options:this.GetBooleanDropdown(),onChange:function(e){return n({dots:e})},help:__("Show pagination dots.","wp-responsive-recent-post-slider")}),wp.element.createElement(h,{label:__("Arrows","wp-responsive-recent-post-slider"),value:y,options:this.GetBooleanDropdown(),onChange:function(e){return n({arrows:e})},help:__("Show prev - next arrows.","wp-responsive-recent-post-slider")}),wp.element.createElement(h,{label:__("Autoplay","wp-responsive-recent-post-slider"),value:_,options:this.GetBooleanDropdown(),onChange:function(e){return n({autoplay:e})}}),"true"==_&&wp.element.createElement(v,{label:__("Autoplay Interval","wp-responsive-recent-post-slider"),value:k,onChange:function(e){return n({autoplay_interval:e})},min:1,help:__("Enter autoplay interval speed.","wp-responsive-recent-post-slider")}),wp.element.createElement(v,{label:__("Speed","wp-responsive-recent-post-slider"),value:P,onChange:function(e){return n({speed:e})},min:1,help:__("Enter slide speed.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Fade","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enable fade effect. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Loop","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enable infinite loop for continuous sliding. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Pause On Hover","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Pause slider autoplay on hover. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Pause On Focus","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Pause slider autoplay when slider element is focused. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(v,{label:__("Nav Slides","wp-responsive-recent-post-slider"),min:0,help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter number of slider navigation column. Note: This parameter default work with design-17, design-18, design-19, design-20. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))}))),wp.element.createElement(d,{title:__("Query Parameters","wp-responsive-recent-post-slider"),initialOpen:!1},wp.element.createElement(w,{label:__("Post Type","wp-responsive-recent-post-slider"),value:C,onChange:function(e){return n({post_type:e})},help:wp.element.createElement("span",{title:__("Note: Be sure you have added valid post type name otherwise no result will be displayed.","wp-responsive-recent-post-slider")},__("Enter registered post type name. You can find it on plugin setting page.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(w,{label:__("Taxonomy","wp-responsive-recent-post-slider"),value:B,onChange:function(e){return n({taxonomy:e})},help:wp.element.createElement("span",{title:__("Note: Be sure you have added valid taxonomy name otherwise no result will be displayed.","wp-responsive-recent-post-slider")},__("Enter registered taxonomy name. You can find it on plugin setting page.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(v,{label:__("Limit","wp-responsive-recent-post-slider"),value:D,onChange:function(e){return n({limit:e})},min:-1,help:__("Enter number of post to be displayed. Enter -1 to display all.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Order By","wp-responsive-recent-post-slider"),options:this.GetPostOrderby(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose option to set order of post by date, title, name etc.. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Order","wp-responsive-recent-post-slider"),options:this.GetPostOrder(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose option to set post in acesding and descending order. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Display Specific Category","wp-responsive-recent-post-slider"),value:W,onChange:function(e){return n({category:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant category listing page.","wp-responsive-recent-post-slider")},__("Enter category id to display categories wise.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Display Child Category","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("If you are using parent category then whether to display child category or not. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Exclude Category","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Exclude post category. Works only if `Category` field is empty. You can pass multiple ids with comma seperated. You can find id at relevant category listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Display Specific Posts","wp-responsive-recent-post-slider"),value:O,onChange:function(e){return n({posts:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant post listing page.","wp-responsive-recent-post-slider")},__("Enter id of the post which you want to display.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(w,{label:__("Exclude Post","wp-responsive-recent-post-slider"),value:N,onChange:function(e){return n({hide_post:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant post listing page.","wp-responsive-recent-post-slider")},__("Enter id of the post which you do not want to display.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Include Author","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter author id to display posts of particular author. You can pass multiple ids with comma seperated. You can find id at users listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Exclude Author","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter author id to hide post of particular author. Works only if `Include Author` field is empty. You can pass multiple ids with comma seperated. You can find id at relevant users listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Display Sticky Posts","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Display sticky posts or not. Note: sticky posts only be displayed at front side. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(v,{label:__("Query Offset","wp-responsive-recent-post-slider"),min:0,help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Exclude number of posts from starting. e.g if you pass 5 then it will skip first five post. Note: This will not work with limit=-1. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})))));return wp.element.createElement(a,null,U,wp.element.createElement(E,null,wp.element.createElement(b,{value:G,onChange:function(e){return n({align:e})},controls:["wide","full"]})),wp.element.createElement("div",{className:this.props.className},this.renderOutput()))}},{key:"renderOutput",value:function(){var e=this.props.attributes,t=this.ObjToString(e);t=t.trim();var n=t?"[recent_post_slider "+t+"]":"[recent_post_slider]";return wp.element.createElement("div",{class:"wpos-guten-shrt"},wp.element.createElement("div",{class:"wpos-guten-shrt-title"},wp.element.createElement("span",null,__("WP Responsive Recent Post Slider/Carousel - Slider","wp-responsive-recent-post-slider"))),n,wp.element.createElement("div",{class:"wpos-guten-shrt-footer"},wp.element.createElement("span",null),__("Do you want to check demo of this plugin.","wp-responsive-recent-post-slider")," ",wp.element.createElement("a",{href:Wprpsf_Block.free_demo_link,target:"_blank"},__("Click here","wp-responsive-recent-post-slider"))),wp.element.createElement("div",{class:"wpos-guten-shrt-footer"},__("Do you also want to check premium version demo of this plugin.","wp-responsive-recent-post-slider")," ",wp.element.createElement("a",{href:Wprpsf_Block.pro_demo_link,target:"_blank"},__("Click here","wp-responsive-recent-post-slider"))))}}]),t}(i);t.a=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=wp.element,i=p.Component,a=p.Fragment,c=wp.components,d=c.PanelBody,m=c.Disabled,w=c.TextControl,u=c.ToggleControl,v=c.RangeControl,h=c.SelectControl,__=wp.i18n.__,g=(wp.data.select,wp.editor),f=g.InspectorControls,E=g.BlockControls,b=g.BlockAlignmentToolbar,y=function(e){function t(){r(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={isLoading:!1},e}return l(t,e),o(t,[{key:"ObjToString",value:function(e){var t=wp.blocks.getBlockAttributes("wprps/recent-post-carousel"),n=["content_tail"],r="";for(var s in e)e.hasOwnProperty(s)&&"undefined"!==typeof e[s]&&e[s]!==t[s]&&(""!=jQuery.trim(e[s])||jQuery.inArray(s,n)>=0)&&(r+=s+'="'+e[s]+'" ');return r}},{key:"GetBooleanDropdown",value:function(){return[{value:"true",label:__("True","wp-responsive-recent-post-slider")},{value:"false",label:__("False","wp-responsive-recent-post-slider")}]}},{key:"GetDesigns",value:function(){return[{value:"design-1",label:__("Design 1","wp-responsive-recent-post-slider")}]}},{key:"GetLinkTargetDropdown",value:function(){return[{value:"self",label:__("Same Window","wp-responsive-recent-post-slider")},{value:"blank",label:__("New Window","wp-responsive-recent-post-slider")}]}},{key:"GetPostOrderby",value:function(){return[{value:"date",label:__("Post Date","wp-responsive-recent-post-slider")},{value:"modified",label:__("Post Modified Date","wp-responsive-recent-post-slider")},{value:"title",label:__("Post Title","wp-responsive-recent-post-slider")},{value:"name",label:__("Post Slug","wp-responsive-recent-post-slider")},{value:"ID",label:__("Post ID","wp-responsive-recent-post-slider")},{value:"rand",label:__("Random","wp-responsive-recent-post-slider")},{value:"menu_order",label:__("Menu Order (Sort Order)","wp-responsive-recent-post-slider")}]}},{key:"GetPostOrder",value:function(){return[{value:"desc",label:__("Descending","wp-responsive-recent-post-slider")},{value:"asc",label:__("Ascending","wp-responsive-recent-post-slider")}]}},{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(e){var t=wp.data.select("core/editor").getEditorSettings(),n=t.alignWide;e.attributes;n||this.props.setAttributes({align:void 0})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.design,s=t.show_date,l=t.show_author,o=t.show_category_name,p=t.show_content,i=t.content_words_limit,c=t.show_read_more,g=t.slides_to_show,y=t.slides_to_scroll,_=t.dots,k=t.arrows,P=t.autoplay,C=t.autoplay_interval,B=t.speed,D=t.post_type,W=t.taxonomy,O=t.limit,N=t.category,S=t.posts,G=t.hide_post,U=t.media_size,x=t.align,T=(t.className,this.state.isLoading,wp.element.createElement(f,null,wp.element.createElement(d,{title:__("General Parameters","wp-responsive-recent-post-slider")},wp.element.createElement(h,{label:__("Design","wp-responsive-recent-post-slider"),value:r,options:this.GetDesigns(),onChange:function(e){return n({design:e})}}),wp.element.createElement(u,{label:__("Show Date","wp-responsive-recent-post-slider"),checked:!!s,onChange:function(){return n({show_date:!s})}}),wp.element.createElement(u,{label:__("Show Author","wp-responsive-recent-post-slider"),checked:!!l,onChange:function(){return n({show_author:!l})}}),wp.element.createElement(u,{label:__("Show Category Name","wp-responsive-recent-post-slider"),checked:!!o,onChange:function(){return n({show_category_name:!o})}}),wp.element.createElement(u,{label:__("Show Content","wp-responsive-recent-post-slider"),checked:!!p,onChange:function(){return n({show_content:!p})}}),p&&wp.element.createElement(v,{label:__("Content Words limit","wp-responsive-recent-post-slider"),value:i,onChange:function(e){return n({content_words_limit:e})},min:1,help:__("Enter content word limit.","wp-responsive-recent-post-slider")}),p&&wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Content Tail","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Display dots after the post content as continue reading. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),p&&wp.element.createElement(h,{label:__("Read More","wp-responsive-recent-post-slider"),value:c,options:this.GetBooleanDropdown(),onChange:function(e){return n({show_read_more:e})}}),p&&wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Read More Text","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter read more text. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Link Behaviour","wp-responsive-recent-post-slider"),onChange:function(e){return n({link_target:e})},help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose link target behaviour. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Media Size","wp-responsive-recent-post-slider"),value:U,onChange:function(e){return n({media_size:e})},help:__("Choose WordPress registered image size. e.g thumbnail, medium, large, full.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(v,{label:__("Image Height","wp-responsive-recent-post-slider"),min:0,help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Control height of the featured image. You can enter any numeric number. e.g 500. Leave empty for default height. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Image Fit","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Fill the post image in a whole container. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))}))),wp.element.createElement(d,{title:__("Slider Parameters","wp-responsive-recent-post-slider"),initialOpen:!1},wp.element.createElement(v,{label:__("Slide To Show","wp-responsive-recent-post-slider"),value:g,onChange:function(e){return n({slides_to_show:e})},min:1,help:__("Enter number for Slide to show at a time.","wp-responsive-recent-post-slider")}),wp.element.createElement(v,{label:__("Slide To Scroll","wp-responsive-recent-post-slider"),value:y,onChange:function(e){return n({slides_to_scroll:e})},min:1,help:__("Enter number to scroll slider at a time.","wp-responsive-recent-post-slider")}),wp.element.createElement(h,{label:__("Dots","wp-responsive-recent-post-slider"),value:_,options:this.GetBooleanDropdown(),onChange:function(e){return n({dots:e})},help:__("Show pagination dots.","wp-responsive-recent-post-slider")}),wp.element.createElement(h,{label:__("Arrows","wp-responsive-recent-post-slider"),value:k,options:this.GetBooleanDropdown(),onChange:function(e){return n({arrows:e})},help:__("Show prev - next arrows.","wp-responsive-recent-post-slider")}),wp.element.createElement(h,{label:__("Autoplay","wp-responsive-recent-post-slider"),value:P,options:this.GetBooleanDropdown(),onChange:function(e){return n({autoplay:e})}}),"true"==P&&wp.element.createElement(v,{label:__("Autoplay Interval","wp-responsive-recent-post-slider"),value:C,onChange:function(e){return n({autoplay_interval:e})},min:1,help:__("Enter autoplay interval speed.","wp-responsive-recent-post-slider")}),wp.element.createElement(v,{label:__("Speed","wp-responsive-recent-post-slider"),value:B,onChange:function(e){return n({speed:e})},min:1,help:__("Enter slide speed.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Loop","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enable infinite loop for continuous sliding. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Centermode","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enable centered view with partial prev/next slides. Use with odd numbered `Slides to Scroll` and `Slider Column` counts. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Pause On Hover","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Pause slider autoplay on hover. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Pause On Focus","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Pause slider autoplay when slider element is focused. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))}))),wp.element.createElement(d,{title:__("Query Parameters","wp-responsive-recent-post-slider"),initialOpen:!1},wp.element.createElement(w,{label:__("Post Type","wp-responsive-recent-post-slider"),value:D,onChange:function(e){return n({post_type:e})},help:wp.element.createElement("span",{title:__("Note: Be sure you have added valid post type name otherwise no result will be displayed.","wp-responsive-recent-post-slider")},__("Enter registered post type name. You can find it on plugin setting page.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(w,{label:__("Taxonomy","wp-responsive-recent-post-slider"),value:W,onChange:function(e){return n({taxonomy:e})},help:wp.element.createElement("span",{title:__("Note: Be sure you have added valid taxonomy name otherwise no result will be displayed.","wp-responsive-recent-post-slider")},__("Enter registered taxonomy name. You can find it on plugin setting page.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(v,{label:__("Limit","wp-responsive-recent-post-slider"),value:O,onChange:function(e){return n({limit:e})},min:-1,help:__("Enter number of post to be displayed. Enter -1 to display all.","wp-responsive-recent-post-slider")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Order By","wp-responsive-recent-post-slider"),options:this.GetPostOrderby(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose option to set order of post by date, title, name etc.. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Order","wp-responsive-recent-post-slider"),options:this.GetPostOrder(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Choose option to set post in acesding and descending order. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Display Specific Category","wp-responsive-recent-post-slider"),value:N,onChange:function(e){return n({category:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant category listing page.","wp-responsive-recent-post-slider")},__("Enter category id to display categories wise.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Display Child Category","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("If you are using parent category then whether to display child category or not. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Exclude Category","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Exclude post category. Works only if `Category` field is empty. You can pass multiple ids with comma seperated. You can find id at relevant category listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(w,{label:__("Display Specific Posts","wp-responsive-recent-post-slider"),value:S,onChange:function(e){return n({posts:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant post listing page.","wp-responsive-recent-post-slider")},__("Enter id of the post which you want to display.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(w,{label:__("Exclude Post","wp-responsive-recent-post-slider"),value:G,onChange:function(e){return n({hide_post:e})},help:wp.element.createElement("span",{title:__("You can pass multiple ids with comma seperated. You can find id at relevant post listing page.","wp-responsive-recent-post-slider")},__("Enter id of the post which you do not want to display.","wp-responsive-recent-post-slider")," [?]")}),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Include Author","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter author id to display posts of particular author. You can pass multiple ids with comma seperated. You can find id at users listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(w,{label:__("Exclude Author","wp-responsive-recent-post-slider"),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Enter author id to hide post of particular author. Works only if `Include Author` field is empty. You can pass multiple ids with comma seperated. You can find id at relevant users listing page. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(h,{label:__("Display Sticky Posts","wp-responsive-recent-post-slider"),options:this.GetBooleanDropdown(),help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Display sticky posts or not. Note: sticky posts only be displayed at front side. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})),wp.element.createElement(m,null,wp.element.createElement(v,{label:__("Query Offset","wp-responsive-recent-post-slider"),min:0,help:wp.element.createElement("div",{className:"wpos-hidden-opts-desc"},wp.element.createElement("span",null,__("Exclude number of posts from starting. e.g if you pass 5 then it will skip first five post. Note: This will not work with limit=-1. Upgarade to ","wp-responsive-recent-post-slider"),wp.element.createElement("a",{href:Wprpsf_Block.pro_link,target:"_blank"},__("Premium version ","wp-responsive-recent-post-slider")),__("to get this option.","wp-responsive-recent-post-slider")))})))));return wp.element.createElement(a,null,T,wp.element.createElement(E,null,wp.element.createElement(b,{value:x,onChange:function(e){return n({align:e})},controls:["wide","full"]})),wp.element.createElement("div",{className:this.props.className},this.renderOutput()))}},{key:"renderOutput",value:function(){var e=this.props.attributes,t=this.ObjToString(e);t=t.trim();var n=t?"[recent_post_carousel "+t+"]":"[recent_post_carousel]";return wp.element.createElement("div",{class:"wpos-guten-shrt"},wp.element.createElement("div",{class:"wpos-guten-shrt-title"},wp.element.createElement("span",null,__("WP Responsive Recent Post Slider/Carousel - Carousel Slider","wp-responsive-recent-post-slider"))),n,wp.element.createElement("div",{class:"wpos-guten-shrt-footer"},wp.element.createElement("span",null),__("Do you want to check demo of this plugin.","wp-responsive-recent-post-slider")," ",wp.element.createElement("a",{href:Wprpsf_Block.free_demo_link,target:"_blank"},__("Click here","wp-responsive-recent-post-slider"))),wp.element.createElement("div",{class:"wpos-guten-shrt-footer"},__("Do you also want to check premium version demo of this plugin.","wp-responsive-recent-post-slider")," ",wp.element.createElement("a",{href:Wprpsf_Block.pro_demo_link,target:"_blank"},__("Click here","wp-responsive-recent-post-slider"))))}}]),t}(i);t.a=y}]);
|
includes/admin/class-wprps-admin.php
CHANGED
@@ -17,10 +17,16 @@ class Wprps_Admin {
|
|
17 |
function __construct() {
|
18 |
|
19 |
// Action to add admin menu
|
20 |
-
add_action( 'admin_menu', array($this, 'wprps_register_menu'), 12 );
|
21 |
|
22 |
// Admin init process
|
23 |
-
add_action( 'admin_init', array($this, 'wprps_admin_init_process') );
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
/**
|
@@ -63,6 +69,31 @@ class Wprps_Admin {
|
|
63 |
set_transient( 'wprps_install_notice', true, 604800 );
|
64 |
}
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
$wprps_admin = new Wprps_Admin();
|
17 |
function __construct() {
|
18 |
|
19 |
// Action to add admin menu
|
20 |
+
add_action( 'admin_menu', array( $this, 'wprps_register_menu'), 12 );
|
21 |
|
22 |
// Admin init process
|
23 |
+
add_action( 'admin_init', array( $this, 'wprps_admin_init_process') );
|
24 |
+
|
25 |
+
// Action to add custom column to post listing
|
26 |
+
add_filter('manage_edit-category_columns', array( $this, 'wppsac_category_manage_columns' ) );
|
27 |
+
|
28 |
+
// Action to add custom column data to post listing
|
29 |
+
add_filter('manage_category_custom_column', array( $this, 'wppsac_category_columns' ) , 10, 3);
|
30 |
}
|
31 |
|
32 |
/**
|
69 |
set_transient( 'wprps_install_notice', true, 604800 );
|
70 |
}
|
71 |
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Add custom column to Logo listing page
|
75 |
+
*
|
76 |
+
* @package WP Responsive Recent Post Slider
|
77 |
+
* @since 1.0.0
|
78 |
+
*/
|
79 |
+
function wppsac_category_manage_columns($columns) {
|
80 |
+
$new_columns['wpos_shortcode'] = __( 'Category ID', 'wp-responsive-recent-post-slider' );
|
81 |
+
$columns = wppsac_add_array( $columns, $new_columns, 2 );
|
82 |
+
return $columns;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Add custom column data to Logo listing page
|
87 |
+
*
|
88 |
+
* @package WP Responsive Recent Post Slider
|
89 |
+
* @since 1.0.0
|
90 |
+
*/
|
91 |
+
function wppsac_category_columns($ouput, $column_name, $tax_id) {
|
92 |
+
if( $column_name == 'wpos_shortcode' ) {
|
93 |
+
$ouput .= $tax_id;
|
94 |
+
}
|
95 |
+
return $ouput;
|
96 |
+
}
|
97 |
}
|
98 |
|
99 |
$wprps_admin = new Wprps_Admin();
|
includes/admin/settings/hire-us.php
CHANGED
@@ -17,10 +17,10 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
17 |
<div class="support-data">
|
18 |
<h3 style="margin-bottom:5px;"><?php _e( 'Highlight of Hiring:', 'wp-responsive-recent-post-slider' ); ?></h3>
|
19 |
<ul>
|
20 |
-
<li
|
21 |
-
<li
|
22 |
-
<li
|
23 |
-
<li
|
24 |
</ul>
|
25 |
</div>
|
26 |
|
@@ -60,20 +60,20 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
60 |
<thead>
|
61 |
<tr>
|
62 |
<th>
|
63 |
-
<h2
|
64 |
<p>$20 USD</p>
|
65 |
</th>
|
66 |
<th>
|
67 |
-
<h2
|
68 |
<p>$99 USD</p>
|
69 |
</th>
|
70 |
<th>
|
71 |
-
<h2
|
72 |
<p>$499 USD</p>
|
73 |
-
<p class="promo"
|
74 |
</th>
|
75 |
<th>
|
76 |
-
<h2
|
77 |
<p>$999 USD</p>
|
78 |
</th>
|
79 |
</tr>
|
@@ -81,10 +81,10 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
81 |
|
82 |
<tfoot>
|
83 |
<tr>
|
84 |
-
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=6&ref=wposthemeplugin" target="_blank"
|
85 |
-
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=3&ref=wposthemeplugin" target="_blank"
|
86 |
-
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=4&ref=wposthemeplugin" target="_blank"
|
87 |
-
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=5&ref=wposthemeplugin" target="_blank"
|
88 |
</tr>
|
89 |
</tfoot>
|
90 |
</table>
|
17 |
<div class="support-data">
|
18 |
<h3 style="margin-bottom:5px;"><?php _e( 'Highlight of Hiring:', 'wp-responsive-recent-post-slider' ); ?></h3>
|
19 |
<ul>
|
20 |
+
<li><?php _e( 'Hire once, get unlimited jobs done', 'wp-responsive-recent-post-slider'); ?></li>
|
21 |
+
<li><?php _e( 'Quick ticket support, quick solution', 'wp-responsive-recent-post-slider'); ?></li>
|
22 |
+
<li><?php _e( 'Any sort of WP work with no extra cost', 'wp-responsive-recent-post-slider'); ?></li>
|
23 |
+
<li><?php _e( 'Dedicated expert working only for you!', 'wp-responsive-recent-post-slider'); ?></li>
|
24 |
</ul>
|
25 |
</div>
|
26 |
|
60 |
<thead>
|
61 |
<tr>
|
62 |
<th>
|
63 |
+
<h2><?php _e( 'Hire us for 1 Hr', 'wp-responsive-recent-post-slider'); ?></h2>
|
64 |
<p>$20 USD</p>
|
65 |
</th>
|
66 |
<th>
|
67 |
+
<h2><?php _e( 'Hire us for 5 Hrs', 'wp-responsive-recent-post-slider'); ?></h2>
|
68 |
<p>$99 USD</p>
|
69 |
</th>
|
70 |
<th>
|
71 |
+
<h2><?php _e( 'Hire us for 30 Hrs', 'wp-responsive-recent-post-slider'); ?></h2>
|
72 |
<p>$499 USD</p>
|
73 |
+
<p class="promo"><?php _e( 'Our most valuable package!', 'wp-responsive-recent-post-slider'); ?></p>
|
74 |
</th>
|
75 |
<th>
|
76 |
+
<h2><?php _e( 'Hire us for 70 Hrs', 'wp-responsive-recent-post-slider'); ?></h2>
|
77 |
<p>$999 USD</p>
|
78 |
</th>
|
79 |
</tr>
|
81 |
|
82 |
<tfoot>
|
83 |
<tr>
|
84 |
+
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=6&ref=wposthemeplugin" target="_blank"><?php _e( 'Hire Us', 'wp-responsive-recent-post-slider'); ?></a></td>
|
85 |
+
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=3&ref=wposthemeplugin" target="_blank"><?php _e( 'Hire Us', 'wp-responsive-recent-post-slider'); ?></a></td>
|
86 |
+
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=4&ref=wposthemeplugin" target="_blank"><?php _e( 'Hire Us', 'wp-responsive-recent-post-slider'); ?></a></td>
|
87 |
+
<td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=5&ref=wposthemeplugin" target="_blank"><?php _e( 'Hire Us', 'wp-responsive-recent-post-slider'); ?></a></td>
|
88 |
</tr>
|
89 |
</tfoot>
|
90 |
</table>
|
includes/admin/settings/premium.php
CHANGED
@@ -131,7 +131,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
131 |
</tr>
|
132 |
<tr>
|
133 |
<th>Gutenberg Block Supports <span>Use this plugin with Gutenberg easily</span></th>
|
134 |
-
<td><i class="dashicons dashicons-
|
135 |
<td><i class="dashicons dashicons-yes"></i></td>
|
136 |
</tr>
|
137 |
<tr>
|
131 |
</tr>
|
132 |
<tr>
|
133 |
<th>Gutenberg Block Supports <span>Use this plugin with Gutenberg easily</span></th>
|
134 |
+
<td><i class="dashicons dashicons-yes"></i></td>
|
135 |
<td><i class="dashicons dashicons-yes"></i></td>
|
136 |
</tr>
|
137 |
<tr>
|
includes/admin/supports/gutenberg-block.php
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Blocks Initializer
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 2.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit; // Exit if accessed directly.
|
11 |
+
}
|
12 |
+
|
13 |
+
function wprps_register_guten_block() {
|
14 |
+
|
15 |
+
// Block Editor Script
|
16 |
+
wp_register_script( 'wprps-free-block-js', WPRPS_URL.'assets/js/blocks.build.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-components' ), WPRPS_VERSION, true );
|
17 |
+
wp_localize_script( 'wprps-free-block-js', 'Wprpsf_Block', array(
|
18 |
+
'pro_demo_link' => 'https://demo.wponlinesupport.com/prodemo/post-slider-pro/',
|
19 |
+
'free_demo_link' => 'https://demo.wponlinesupport.com/recent-post-slider-demo/',
|
20 |
+
'pro_link' => WPRPS_PLUGIN_LINK,
|
21 |
+
));
|
22 |
+
|
23 |
+
// Register block and explicit attributes for grid
|
24 |
+
register_block_type( 'wprps/recent-post-slider', array(
|
25 |
+
'attributes' => array(
|
26 |
+
|
27 |
+
'limit' => array(
|
28 |
+
'type' => 'number',
|
29 |
+
'default' => 10,
|
30 |
+
),
|
31 |
+
'design' => array(
|
32 |
+
'type' => 'string',
|
33 |
+
'default' => 'design-1',
|
34 |
+
),
|
35 |
+
'category' => array(
|
36 |
+
'type' => 'string',
|
37 |
+
'default' => '',
|
38 |
+
),
|
39 |
+
'show_date' => array(
|
40 |
+
'type' => 'boolean',
|
41 |
+
'default' => true,
|
42 |
+
),
|
43 |
+
'show_category_name' => array(
|
44 |
+
'type' => 'boolean',
|
45 |
+
'default' => true,
|
46 |
+
),
|
47 |
+
'show_content' => array(
|
48 |
+
'type' => 'boolean',
|
49 |
+
'default' => true,
|
50 |
+
),
|
51 |
+
'content_words_limit' => array(
|
52 |
+
'type' => 'number',
|
53 |
+
'default' => 20,
|
54 |
+
),
|
55 |
+
'dots' => array(
|
56 |
+
'type' => 'string',
|
57 |
+
'default' => 'true',
|
58 |
+
),
|
59 |
+
'arrows' => array(
|
60 |
+
'type' => 'string',
|
61 |
+
'default' => 'true',
|
62 |
+
),
|
63 |
+
'autoplay' => array(
|
64 |
+
'type' => 'string',
|
65 |
+
'default' => 'true',
|
66 |
+
),
|
67 |
+
'autoplay_interval' => array(
|
68 |
+
'type' => 'number',
|
69 |
+
'default' => 3000,
|
70 |
+
),
|
71 |
+
'speed' => array(
|
72 |
+
'type' => 'number',
|
73 |
+
'default' => 500,
|
74 |
+
),
|
75 |
+
'posts' => array(
|
76 |
+
'type' => 'string',
|
77 |
+
'default' => '',
|
78 |
+
),
|
79 |
+
'hide_post' => array(
|
80 |
+
'type' => 'string',
|
81 |
+
'default' => '',
|
82 |
+
),
|
83 |
+
'post_type' => array(
|
84 |
+
'type' => 'string',
|
85 |
+
'default' => 'post',
|
86 |
+
),
|
87 |
+
'taxonomy' => array(
|
88 |
+
'type' => 'string',
|
89 |
+
'default' => 'category',
|
90 |
+
),
|
91 |
+
'show_author' => array(
|
92 |
+
'type' => 'boolean',
|
93 |
+
'default' => true,
|
94 |
+
),
|
95 |
+
'show_read_more' => array(
|
96 |
+
'type' => 'string',
|
97 |
+
'default' => 'true',
|
98 |
+
),
|
99 |
+
'media_size' => array(
|
100 |
+
'type' => 'string',
|
101 |
+
'default' => 'full',
|
102 |
+
),
|
103 |
+
'align' => array(
|
104 |
+
'type' => 'string',
|
105 |
+
'default' => '',
|
106 |
+
),
|
107 |
+
'className' => array(
|
108 |
+
'type' => 'string',
|
109 |
+
'default' => '',
|
110 |
+
),
|
111 |
+
),
|
112 |
+
'render_callback' => 'wprps_recent_post_slider',
|
113 |
+
));
|
114 |
+
|
115 |
+
//Register block, and explicitly define the attributes for slider
|
116 |
+
register_block_type( 'wprps/recent-post-carousel', array(
|
117 |
+
'attributes' => array(
|
118 |
+
'limit' => array(
|
119 |
+
'type' => 'number',
|
120 |
+
'default' => 10,
|
121 |
+
),
|
122 |
+
'design' => array(
|
123 |
+
'type' => 'string',
|
124 |
+
'default' => 'design-1',
|
125 |
+
),
|
126 |
+
'category' => array(
|
127 |
+
'type' => 'string',
|
128 |
+
'default' => '',
|
129 |
+
),
|
130 |
+
'show_date' => array(
|
131 |
+
'type' => 'boolean',
|
132 |
+
'default' => true,
|
133 |
+
),
|
134 |
+
'show_category_name' => array(
|
135 |
+
'type' => 'boolean',
|
136 |
+
'default' => true,
|
137 |
+
),
|
138 |
+
'show_content' => array(
|
139 |
+
'type' => 'boolean',
|
140 |
+
'default' => true,
|
141 |
+
),
|
142 |
+
'content_words_limit' => array(
|
143 |
+
'type' => 'number',
|
144 |
+
'default' => 20,
|
145 |
+
),
|
146 |
+
'slides_to_show' => array(
|
147 |
+
'type' => 'number',
|
148 |
+
'default' => 3,
|
149 |
+
),
|
150 |
+
'slides_to_scroll' => array(
|
151 |
+
'type' => 'number',
|
152 |
+
'default' => 1,
|
153 |
+
),
|
154 |
+
'dots' => array(
|
155 |
+
'type' => 'string',
|
156 |
+
'default' => 'true',
|
157 |
+
),
|
158 |
+
'arrows' => array(
|
159 |
+
'type' => 'string',
|
160 |
+
'default' => 'true',
|
161 |
+
),
|
162 |
+
'autoplay' => array(
|
163 |
+
'type' => 'string',
|
164 |
+
'default' => 'true',
|
165 |
+
),
|
166 |
+
'autoplay_interval' => array(
|
167 |
+
'type' => 'number',
|
168 |
+
'default' => 3000,
|
169 |
+
),
|
170 |
+
'speed' => array(
|
171 |
+
'type' => 'number',
|
172 |
+
'default' => 600,
|
173 |
+
),
|
174 |
+
'posts' => array(
|
175 |
+
'type' => 'string',
|
176 |
+
'default' => '',
|
177 |
+
),
|
178 |
+
'hide_post' => array(
|
179 |
+
'type' => 'string',
|
180 |
+
'default' => '',
|
181 |
+
),
|
182 |
+
'post_type' => array(
|
183 |
+
'type' => 'string',
|
184 |
+
'default' => 'post',
|
185 |
+
),
|
186 |
+
'taxonomy' => array(
|
187 |
+
'type' => 'string',
|
188 |
+
'default' => 'category',
|
189 |
+
),
|
190 |
+
'show_author' => array(
|
191 |
+
'type' => 'boolean',
|
192 |
+
'default' => true,
|
193 |
+
),
|
194 |
+
'show_read_more' => array(
|
195 |
+
'type' => 'string',
|
196 |
+
'default' => 'true',
|
197 |
+
),
|
198 |
+
'media_size' => array(
|
199 |
+
'type' => 'string',
|
200 |
+
'default' => 'full',
|
201 |
+
),
|
202 |
+
'align' => array(
|
203 |
+
'type' => 'string',
|
204 |
+
'default' => '',
|
205 |
+
),
|
206 |
+
'className' => array(
|
207 |
+
'type' => 'string',
|
208 |
+
'default' => '',
|
209 |
+
),
|
210 |
+
),
|
211 |
+
'render_callback' => 'wprps_post_carousel',
|
212 |
+
));
|
213 |
+
|
214 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
215 |
+
wp_set_script_translations( 'wprps-free-block-js', 'wp-responsive-recent-post-slider', WPRPS_DIR . '/languages' );
|
216 |
+
}
|
217 |
+
|
218 |
+
}
|
219 |
+
add_action( 'init', 'wprps_register_guten_block' );
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Enqueue Gutenberg block assets for both frontend + backend.
|
223 |
+
*
|
224 |
+
* @package WP Responsive Recent Post Slider
|
225 |
+
* @since 2.3
|
226 |
+
*/
|
227 |
+
function wprps_block_assets() {
|
228 |
+
}
|
229 |
+
add_action( 'enqueue_block_assets', 'wprps_block_assets' );
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Enqueue Gutenberg block assets for backend editor.
|
233 |
+
*
|
234 |
+
* @uses {wp-blocks} for block type registration & related functions.
|
235 |
+
* @uses {wp-element} for WP Element abstraction — structure of blocks.
|
236 |
+
* @uses {wp-i18n} to internationalize the block's text.
|
237 |
+
* @uses {wp-editor} for WP editor styles.
|
238 |
+
*
|
239 |
+
* @package WP Responsive Recent Post Slider
|
240 |
+
* @since 2.3
|
241 |
+
*/
|
242 |
+
function wprps_editor_assets() {
|
243 |
+
|
244 |
+
// Block Editor CSS
|
245 |
+
if( ! wp_style_is( 'wpos-free-guten-block-css', 'registered' ) ) {
|
246 |
+
wp_register_style( 'wpos-free-guten-block-css', WPRPS_URL.'assets/css/blocks.editor.build.css', array( 'wp-edit-blocks' ), WPRPS_VERSION );
|
247 |
+
}
|
248 |
+
|
249 |
+
// Block Editor Script
|
250 |
+
wp_enqueue_style( 'wpos-free-guten-block-css' );
|
251 |
+
wp_enqueue_script( 'wprps-free-block-js' );
|
252 |
+
|
253 |
+
}
|
254 |
+
add_action( 'enqueue_block_editor_assets', 'wprps_editor_assets' );
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Adds an extra category to the block inserter
|
258 |
+
*
|
259 |
+
* @package WP Responsive Recent Post Slider
|
260 |
+
* @since 2.3
|
261 |
+
*/
|
262 |
+
function wprps_add_block_category( $categories ) {
|
263 |
+
|
264 |
+
$guten_cats = wp_list_pluck( $categories, 'slug' );
|
265 |
+
|
266 |
+
if( ! in_array( 'wpos_guten_block', $guten_cats ) ) {
|
267 |
+
$categories[] = array(
|
268 |
+
'slug' => 'wpos_guten_block',
|
269 |
+
'title' => __('WPOS Blocks', 'wp-responsive-recent-post-slider'),
|
270 |
+
'icon' => null,
|
271 |
+
);
|
272 |
+
}
|
273 |
+
|
274 |
+
return $categories;
|
275 |
+
}
|
276 |
+
add_filter( 'block_categories', 'wprps_add_block_category' );
|
includes/admin/wprps-how-it-work.php
CHANGED
@@ -170,7 +170,7 @@ function wprps_howitwork_page() { ?>
|
|
170 |
<ul>
|
171 |
<li><?php _e('Step-1. This plugin create a menu "Recent Post Slider".', 'wp-responsive-recent-post-slider'); ?></li>
|
172 |
<li><?php _e('Step-2. This plugin get all the latest POST from WordPress Post section with a simple shortcode', 'wp-responsive-recent-post-slider'); ?></li>
|
173 |
-
<li><?php _e('Step-3. If you need a <b>Featured Post</b> OR <b>Trending/Popular Post</b> plugin then try our plugins', 'wp-responsive-recent-post-slider'); ?> <a href="https://wordpress.org/plugins/featured-post-creative/" target="_blank"
|
174 |
|
175 |
</ul>
|
176 |
</td>
|
@@ -227,21 +227,21 @@ function wprps_howitwork_page() { ?>
|
|
227 |
</h3>
|
228 |
<div class="inside">
|
229 |
<ul class="wpos-list">
|
230 |
-
<li
|
231 |
-
<li
|
232 |
-
<li
|
233 |
-
<li
|
234 |
-
<li
|
235 |
-
<li
|
236 |
-
<li
|
237 |
-
<li
|
238 |
-
<li
|
239 |
-
<li
|
240 |
-
<li
|
241 |
-
<li
|
242 |
-
<li
|
243 |
</ul>
|
244 |
-
<div class="upgrade-to-pro"
|
245 |
<a class="button button-primary wpos-button-full" href="https://www.wponlinesupport.com/wp-plugin/wp-responsive-recent-post-slider/?ref=WposPratik&utm_source=WP&utm_medium=WP-Plugins&utm_campaign=Upgrade-PRO" target="_blank"><?php _e('Go Premium ', 'wp-responsive-recent-post-slider'); ?></a>
|
246 |
<p><a class="button button-primary wpos-button-full" href="http://demo.wponlinesupport.com/prodemo/post-slider-pro/" target="_blank"><?php _e('View PRO Demo ', 'wp-responsive-recent-post-slider'); ?></a> </p>
|
247 |
</div><!-- .inside -->
|
@@ -257,7 +257,7 @@ function wprps_howitwork_page() { ?>
|
|
257 |
<span><?php _e( 'Help to improve this plugin!', 'wp-responsive-recent-post-slider' ); ?></span>
|
258 |
</h3>
|
259 |
<div class="inside">
|
260 |
-
<p
|
261 |
</div><!-- .inside -->
|
262 |
</div><!-- #general -->
|
263 |
</div><!-- .meta-box-sortables ui-sortable -->
|
170 |
<ul>
|
171 |
<li><?php _e('Step-1. This plugin create a menu "Recent Post Slider".', 'wp-responsive-recent-post-slider'); ?></li>
|
172 |
<li><?php _e('Step-2. This plugin get all the latest POST from WordPress Post section with a simple shortcode', 'wp-responsive-recent-post-slider'); ?></li>
|
173 |
+
<li><?php _e('Step-3. If you need a <b>Featured Post</b> OR <b>Trending/Popular Post</b> plugin then try our plugins', 'wp-responsive-recent-post-slider'); ?> <a href="https://wordpress.org/plugins/featured-post-creative/" target="_blank"><?php _e( 'Featured Post', 'wp-responsive-recent-post-slider' ); ?></a> and <a href="https://wordpress.org/plugins/wp-trending-post-slider-and-widget/" target="_blank"><?php _e( 'Trending/Popular Post', 'wp-responsive-recent-post-slider' ); ?></a></li>
|
174 |
|
175 |
</ul>
|
176 |
</td>
|
227 |
</h3>
|
228 |
<div class="inside">
|
229 |
<ul class="wpos-list">
|
230 |
+
<li><?php _e('60+ designs', 'wp-responsive-recent-post-slider' ); ?></li>
|
231 |
+
<li><?php _e('Recent Post Slider with 25 designs', 'wp-responsive-recent-post-slider' ); ?></li>
|
232 |
+
<li><?php _e('Recent Post Carousel with 30 designs', 'wp-responsive-recent-post-slider' ); ?></li>
|
233 |
+
<li><?php _e('Recent gridbox slider with 8 designs', 'wp-responsive-recent-post-slider' ); ?></li>
|
234 |
+
<li><?php _e('3 Widgets (Post slider, Post List/Slider-1, Post List/Slider-2)', 'wp-responsive-recent-post-slider' ); ?></li>
|
235 |
+
<li><?php _e('Drag & Drop order change', 'wp-responsive-recent-post-slider' ); ?></li>
|
236 |
+
<li><?php _e('Custom CSS option', 'wp-responsive-recent-post-slider' ); ?></li>
|
237 |
+
<li><?php _e('Gutenberg Block Supports', 'wp-responsive-recent-post-slider' ); ?></li>
|
238 |
+
<li><?php _e('Visual Composer Support', 'wp-responsive-recent-post-slider' ); ?></li>
|
239 |
+
<li><?php _e('WP Templating Features', 'wp-responsive-recent-post-slider' ); ?></li>
|
240 |
+
<li><?php _e('Slider RTL support', 'wp-responsive-recent-post-slider' ); ?></li>
|
241 |
+
<li><?php _e('Fully responsive', 'wp-responsive-recent-post-slider' ); ?></li>
|
242 |
+
<li><?php _e('100% Multi language', 'wp-responsive-recent-post-slider' ); ?></li>
|
243 |
</ul>
|
244 |
+
<div class="upgrade-to-pro"><?php echo __( 'Gain access to <strong>Responsive Recent Post Slider</strong> included in <br /><strong>Essential Plugin Bundle', 'wp-responsive-recent-post-slider' ); ?></div>
|
245 |
<a class="button button-primary wpos-button-full" href="https://www.wponlinesupport.com/wp-plugin/wp-responsive-recent-post-slider/?ref=WposPratik&utm_source=WP&utm_medium=WP-Plugins&utm_campaign=Upgrade-PRO" target="_blank"><?php _e('Go Premium ', 'wp-responsive-recent-post-slider'); ?></a>
|
246 |
<p><a class="button button-primary wpos-button-full" href="http://demo.wponlinesupport.com/prodemo/post-slider-pro/" target="_blank"><?php _e('View PRO Demo ', 'wp-responsive-recent-post-slider'); ?></a> </p>
|
247 |
</div><!-- .inside -->
|
257 |
<span><?php _e( 'Help to improve this plugin!', 'wp-responsive-recent-post-slider' ); ?></span>
|
258 |
</h3>
|
259 |
<div class="inside">
|
260 |
+
<p><?php _e( 'Enjoyed this plugin? You can help by rate this plugin ', 'wp-responsive-recent-post-slider' ); ?><a href="https://wordpress.org/support/plugin/wp-responsive-recent-post-slider/reviews/" target="_blank"><?php _e( '5 stars!', 'wp-responsive-recent-post-slider' ); ?></a></p>
|
261 |
</div><!-- .inside -->
|
262 |
</div><!-- #general -->
|
263 |
</div><!-- .meta-box-sortables ui-sortable -->
|
includes/shortcodes/wppsac-carousel.php
CHANGED
@@ -1,33 +1,42 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
// Exit if accessed directly
|
4 |
if ( !defined( 'ABSPATH' ) ) exit;
|
5 |
|
6 |
-
function
|
7 |
|
8 |
extract(shortcode_atts(array(
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
'posts' => array(),
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
31 |
), $atts));
|
32 |
|
33 |
$unique = wppsac_get_unique();
|
@@ -53,6 +62,9 @@ function get_wppsac_carousel( $atts, $content = null ) {
|
|
53 |
$media_size = !empty($media_size) ? $media_size : 'full'; // you can use thumbnail, medium, medium_large, large, full
|
54 |
$exclude_post = !empty($hide_post) ? explode(',', $hide_post) : array();
|
55 |
$posts = !empty($posts) ? explode(',', $posts) : array();
|
|
|
|
|
|
|
56 |
|
57 |
// For RTL
|
58 |
if( empty($rtl) && is_rtl() ) {
|
@@ -81,17 +93,17 @@ function get_wppsac_carousel( $atts, $content = null ) {
|
|
81 |
|
82 |
// WP Query Parameters
|
83 |
$args = array (
|
84 |
-
'post_type'
|
85 |
-
'post_status'
|
86 |
-
'orderby'
|
87 |
-
'order'
|
88 |
-
'posts_per_page'
|
89 |
-
'post__not_in'
|
90 |
-
'post__in'
|
91 |
);
|
92 |
|
93 |
// Category Parameter
|
94 |
-
if($cat != "") {
|
95 |
|
96 |
$args['tax_query'] = array(
|
97 |
array(
|
@@ -104,25 +116,26 @@ function get_wppsac_carousel( $atts, $content = null ) {
|
|
104 |
$query = new WP_Query($args);
|
105 |
$post_count = $query->post_count;
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
127 |
}
|
128 |
-
add_shortcode('recent_post_carousel', '
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_carousel' Shortcode
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
|
9 |
// Exit if accessed directly
|
10 |
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
|
12 |
+
function wprps_post_carousel( $atts, $content = null ) {
|
13 |
|
14 |
extract(shortcode_atts(array(
|
15 |
+
'limit' => '10',
|
16 |
+
'design' => 'design-1',
|
17 |
+
'category' => '',
|
18 |
+
'show_date' => 'true',
|
19 |
+
'show_category_name' => 'true',
|
20 |
+
'show_content' => 'true',
|
21 |
+
'content_words_limit' => '20',
|
22 |
+
'slides_to_show' => '3',
|
23 |
+
'slides_to_scroll' => '1',
|
24 |
+
'dots' => 'true',
|
25 |
+
'arrows' => 'true',
|
26 |
+
'autoplay' => 'true',
|
27 |
+
'autoplay_interval' => '3000',
|
28 |
+
'speed' => '500',
|
29 |
+
'hide_post' => array(),
|
30 |
'posts' => array(),
|
31 |
+
'post_type' => 'post',
|
32 |
+
'taxonomy' => 'category',
|
33 |
+
'show_author' => 'true',
|
34 |
+
'show_read_more' => 'true',
|
35 |
+
'media_size' => 'full',
|
36 |
+
'rtl' => 'false',
|
37 |
+
'className' => '',
|
38 |
+
'align' => '',
|
39 |
+
'extra_class' => '',
|
40 |
), $atts));
|
41 |
|
42 |
$unique = wppsac_get_unique();
|
62 |
$media_size = !empty($media_size) ? $media_size : 'full'; // you can use thumbnail, medium, medium_large, large, full
|
63 |
$exclude_post = !empty($hide_post) ? explode(',', $hide_post) : array();
|
64 |
$posts = !empty($posts) ? explode(',', $posts) : array();
|
65 |
+
$align = !empty( $align ) ? 'align'.$align : '';
|
66 |
+
$extra_class = $extra_class .' '. $align .' '. $className;
|
67 |
+
$extra_class = wppsac_sanitize_html_classes( $extra_class );
|
68 |
|
69 |
// For RTL
|
70 |
if( empty($rtl) && is_rtl() ) {
|
93 |
|
94 |
// WP Query Parameters
|
95 |
$args = array (
|
96 |
+
'post_type' => $post_type,
|
97 |
+
'post_status' => array( 'publish' ),
|
98 |
+
'orderby' => 'date',
|
99 |
+
'order' => 'DESC',
|
100 |
+
'posts_per_page' => $posts_per_page,
|
101 |
+
'post__not_in' => $exclude_post,
|
102 |
+
'post__in' => $posts,
|
103 |
);
|
104 |
|
105 |
// Category Parameter
|
106 |
+
if( $cat != "") {
|
107 |
|
108 |
$args['tax_query'] = array(
|
109 |
array(
|
116 |
$query = new WP_Query($args);
|
117 |
$post_count = $query->post_count;
|
118 |
|
119 |
+
if ( $query->have_posts() ) :
|
120 |
+
?>
|
121 |
+
<div class="wppsac-slick-carousel-wrp wppsac-clearfix <?php echo $extra_class; ?>">
|
122 |
+
<div id="wppsac-post-carousel-<?php echo $unique; ?>" class="wppsac-post-carousel <?php echo $design; ?>">
|
123 |
+
<?php
|
124 |
+
while ( $query->have_posts() ) : $query->the_post();
|
125 |
+
$post_id = isset($post->ID) ? $post->ID : '';
|
126 |
+
$cat_list = wppsac_get_category_list($post->ID, $taxonomy);
|
127 |
+
$feat_image = wppsac_get_post_featured_image( $post->ID, $media_size, true );
|
128 |
+
if( $design_file ) {
|
129 |
+
include( $design_file );
|
130 |
+
}
|
131 |
+
endwhile; ?>
|
132 |
+
</div>
|
133 |
+
<div class="wppsac-carousel-conf wppsac-hide" data-conf="<?php echo htmlspecialchars(json_encode($carousel_conf)); ?>"></div>
|
134 |
+
</div>
|
135 |
+
<?php
|
136 |
+
endif;
|
137 |
+
wp_reset_postdata();
|
138 |
+
|
139 |
+
return ob_get_clean();
|
140 |
}
|
141 |
+
add_shortcode('recent_post_carousel', 'wprps_post_carousel');
|
includes/shortcodes/wppsac-slider.php
CHANGED
@@ -1,54 +1,66 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
// Exit if accessed directly
|
4 |
if ( !defined( 'ABSPATH' ) ) exit;
|
5 |
|
6 |
-
function
|
7 |
|
8 |
extract(shortcode_atts(array(
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
'posts' => array(),
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
), $atts));
|
30 |
|
31 |
-
$unique
|
32 |
-
$shortcode_designs
|
33 |
-
$posts_per_page
|
34 |
-
$cat
|
35 |
-
$design
|
36 |
-
$showCategory
|
37 |
-
$showContent
|
38 |
-
$showDate
|
39 |
-
$showAuthor
|
40 |
-
$showreadmore
|
41 |
-
$words_limit
|
42 |
-
$dots
|
43 |
-
$arrows
|
44 |
-
$autoplay
|
45 |
-
$autoplay_interval
|
46 |
-
$speed
|
47 |
-
$post_type
|
48 |
-
$taxonomy
|
49 |
-
$media_size
|
50 |
-
$exclude_post
|
51 |
-
$posts
|
|
|
|
|
|
|
52 |
|
53 |
// For RTL
|
54 |
if( empty($rtl) && is_rtl() ) {
|
@@ -58,7 +70,7 @@ function get_wppsac_slider( $atts, $content = null ) {
|
|
58 |
} else {
|
59 |
$rtl = 'false';
|
60 |
}
|
61 |
-
|
62 |
// Shortcode file
|
63 |
$design_file_path = WPRPS_DIR . '/templates/slider/' . $design . '.php';
|
64 |
$design_file = (file_exists($design_file_path)) ? $design_file_path : '';
|
@@ -100,25 +112,26 @@ function get_wppsac_slider( $atts, $content = null ) {
|
|
100 |
$query = new WP_Query($args);
|
101 |
$post_count = $query->post_count;
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
123 |
}
|
124 |
-
add_shortcode('recent_post_slider', '
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_slider' Shortcode
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
|
9 |
// Exit if accessed directly
|
10 |
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
|
12 |
+
function wprps_recent_post_slider( $atts, $content = null ) {
|
13 |
|
14 |
extract(shortcode_atts(array(
|
15 |
+
'limit' => '10',
|
16 |
+
'design' => 'design-1',
|
17 |
+
'category' => '',
|
18 |
+
'show_date' => 'true',
|
19 |
+
'show_category_name' => 'true',
|
20 |
+
'show_content' => 'true',
|
21 |
+
'content_words_limit' => '20',
|
22 |
+
'dots' => 'true',
|
23 |
+
'arrows' => 'true',
|
24 |
+
'autoplay' => 'true',
|
25 |
+
'autoplay_interval' => '3000',
|
26 |
+
'speed' => '500',
|
27 |
'posts' => array(),
|
28 |
+
'hide_post' => array(),
|
29 |
+
'post_type' => 'post',
|
30 |
+
'taxonomy' => 'category',
|
31 |
+
'show_author' => 'true',
|
32 |
+
'show_read_more' => 'true',
|
33 |
+
'media_size' => 'full',
|
34 |
+
'rtl' => 'false',
|
35 |
+
'className' => '',
|
36 |
+
'align' => '',
|
37 |
+
'extra_class' => '',
|
38 |
), $atts));
|
39 |
|
40 |
+
$unique = wppsac_get_unique();
|
41 |
+
$shortcode_designs = wppsac_slider_designs();
|
42 |
+
$posts_per_page = !empty($limit) ? $limit : '-1';
|
43 |
+
$cat = (!empty($category)) ? explode(',', $category) : '';
|
44 |
+
$design = ($design && (array_key_exists(trim($design), $shortcode_designs))) ? trim($design) : 'design-1';
|
45 |
+
$showCategory = ( $show_category_name == 'false' ) ? false : true;
|
46 |
+
$showContent = ( $show_content == 'false' ) ? false : true;
|
47 |
+
$showDate = ( $show_date == 'false') ? false : true;
|
48 |
+
$showAuthor = ( $show_author == 'false') ? false : true;
|
49 |
+
$showreadmore = ( $show_read_more == 'false') ? false : true;
|
50 |
+
$words_limit = !empty( $content_words_limit ) ? $content_words_limit : 20;
|
51 |
+
$dots = ( $dots == 'false' ) ? 'false' : 'true';
|
52 |
+
$arrows = ( $arrows == 'false' ) ? 'false' : 'true';
|
53 |
+
$autoplay = ( $autoplay == 'false' ) ? 'false' : 'true';
|
54 |
+
$autoplay_interval = (!empty($autoplay_interval)) ? $autoplay_interval : 3000;
|
55 |
+
$speed = (!empty($speed)) ? $speed : 500;
|
56 |
+
$post_type = !empty($post_type) ? $post_type : 'post';
|
57 |
+
$taxonomy = !empty($taxonomy) ? $taxonomy : 'category';
|
58 |
+
$media_size = !empty($media_size) ? $media_size : 'full'; // you can use thumbnail, medium, medium_large, large, full
|
59 |
+
$exclude_post = !empty($hide_post) ? explode(',', $hide_post) : array();
|
60 |
+
$posts = !empty($posts) ? explode(',', $posts) : array();
|
61 |
+
$align = !empty( $align ) ? 'align'.$align : '';
|
62 |
+
$extra_class = $extra_class .' '. $align .' '. $className;
|
63 |
+
$extra_class = wppsac_sanitize_html_classes( $extra_class );
|
64 |
|
65 |
// For RTL
|
66 |
if( empty($rtl) && is_rtl() ) {
|
70 |
} else {
|
71 |
$rtl = 'false';
|
72 |
}
|
73 |
+
|
74 |
// Shortcode file
|
75 |
$design_file_path = WPRPS_DIR . '/templates/slider/' . $design . '.php';
|
76 |
$design_file = (file_exists($design_file_path)) ? $design_file_path : '';
|
112 |
$query = new WP_Query($args);
|
113 |
$post_count = $query->post_count;
|
114 |
|
115 |
+
if ( $query->have_posts() ) :
|
116 |
+
?>
|
117 |
+
<div class="wppsac-slick-slider-wrp wppsac-clearfix <?php echo $extra_class; ?>">
|
118 |
+
<div id="wppsac-post-slider-<?php echo $unique; ?>" class="wppsac-post-slider <?php echo $design; ?>">
|
119 |
+
<?php
|
120 |
+
while ( $query->have_posts() ) : $query->the_post();
|
121 |
+
$post_id = isset($post->ID) ? $post->ID : '';
|
122 |
+
$cat_list = wppsac_get_category_list($post->ID, $taxonomy);
|
123 |
+
$feat_image = wppsac_get_post_featured_image( $post->ID, $media_size, true );
|
124 |
+
if( $design_file ) {
|
125 |
+
include( $design_file );
|
126 |
+
}
|
127 |
+
endwhile; ?>
|
128 |
+
</div>
|
129 |
+
<div class="wppsac-slider-conf wppsac-hide" data-conf="<?php echo htmlspecialchars(json_encode($slider_conf)); ?>"></div>
|
130 |
+
</div>
|
131 |
+
<?php
|
132 |
+
endif;
|
133 |
+
wp_reset_postdata();
|
134 |
+
|
135 |
+
return ob_get_clean();
|
136 |
}
|
137 |
+
add_shortcode('recent_post_slider', 'wprps_recent_post_slider');
|
includes/wppsac-function.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
// Exit if accessed directly
|
10 |
if ( !defined( 'ABSPATH' ) ) exit;
|
|
|
11 |
/**
|
12 |
* Function to get plugin image sizes array
|
13 |
*
|
@@ -20,6 +21,7 @@ function wppsac_get_unique() {
|
|
20 |
|
21 |
return $unique;
|
22 |
}
|
|
|
23 |
/**
|
24 |
* Function to get post featured image
|
25 |
*
|
@@ -36,11 +38,10 @@ function wppsac_get_post_featured_image( $post_id = '', $size = 'full') {
|
|
36 |
return $image;
|
37 |
}
|
38 |
|
39 |
-
|
40 |
/**
|
41 |
* Function to get Taxonomies list
|
42 |
*
|
43 |
-
* @package WP Responsive Recent Post Slider
|
44 |
* @since 1.3.3
|
45 |
*/
|
46 |
function wppsac_get_category_list( $post_id = 0, $taxonomy = '' ) {
|
@@ -58,6 +59,29 @@ function wppsac_get_category_list( $post_id = 0, $taxonomy = '' ) {
|
|
58 |
}
|
59 |
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
/**
|
62 |
* Function to get shortcode designs
|
63 |
*
|
@@ -87,7 +111,6 @@ function wppsac_carousel_designs() {
|
|
87 |
return apply_filters('wppsac_carousel_designs', $design_arr );
|
88 |
}
|
89 |
|
90 |
-
|
91 |
/**
|
92 |
* Function to add array after specific key
|
93 |
*
|
@@ -110,32 +133,17 @@ function wppsac_add_array(&$array, $value, $index, $from_last = false) {
|
|
110 |
return $array;
|
111 |
}
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
$new_columns['wpos_shortcode'] = __( 'Category ID', 'wp-responsive-recent-post-slider' );
|
120 |
-
$columns = wppsac_add_array( $columns, $new_columns, 2 );
|
121 |
-
return $columns;
|
122 |
-
}
|
123 |
-
|
124 |
-
function wppsac_category_columns($ouput, $column_name, $tax_id) {
|
125 |
-
if( $column_name == 'wpos_shortcode' ) {
|
126 |
-
$ouput .= $tax_id;
|
127 |
-
|
128 |
-
}
|
129 |
-
return $ouput;
|
130 |
-
|
131 |
-
}
|
132 |
-
|
133 |
-
// Manage conetnt limit
|
134 |
function wprps_limit_words($string, $word_limit)
|
135 |
{
|
136 |
if( !empty($string) ) {
|
137 |
$content = strip_shortcodes( $string ); // Strip shortcodes
|
138 |
$content = wp_trim_words( $string, $word_limit, '...' );
|
139 |
-
|
140 |
}
|
141 |
}
|
8 |
|
9 |
// Exit if accessed directly
|
10 |
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
|
12 |
/**
|
13 |
* Function to get plugin image sizes array
|
14 |
*
|
21 |
|
22 |
return $unique;
|
23 |
}
|
24 |
+
|
25 |
/**
|
26 |
* Function to get post featured image
|
27 |
*
|
38 |
return $image;
|
39 |
}
|
40 |
|
|
|
41 |
/**
|
42 |
* Function to get Taxonomies list
|
43 |
*
|
44 |
+
* @package WP Responsive Recent Post Slider
|
45 |
* @since 1.3.3
|
46 |
*/
|
47 |
function wppsac_get_category_list( $post_id = 0, $taxonomy = '' ) {
|
59 |
}
|
60 |
|
61 |
|
62 |
+
/**
|
63 |
+
* Sanitize Multiple HTML class
|
64 |
+
*
|
65 |
+
* @package WP Responsive Recent Post Slider
|
66 |
+
* @since 2.3
|
67 |
+
*/
|
68 |
+
function wppsac_sanitize_html_classes($classes, $sep = " ") {
|
69 |
+
$return = "";
|
70 |
+
|
71 |
+
if( !is_array($classes) ) {
|
72 |
+
$classes = explode($sep, $classes);
|
73 |
+
}
|
74 |
+
|
75 |
+
if( !empty($classes) ) {
|
76 |
+
foreach($classes as $class){
|
77 |
+
$return .= sanitize_html_class($class) . " ";
|
78 |
+
}
|
79 |
+
$return = trim( $return );
|
80 |
+
}
|
81 |
+
|
82 |
+
return $return;
|
83 |
+
}
|
84 |
+
|
85 |
/**
|
86 |
* Function to get shortcode designs
|
87 |
*
|
111 |
return apply_filters('wppsac_carousel_designs', $design_arr );
|
112 |
}
|
113 |
|
|
|
114 |
/**
|
115 |
* Function to add array after specific key
|
116 |
*
|
133 |
return $array;
|
134 |
}
|
135 |
|
136 |
+
/**
|
137 |
+
* Function to Manage conetnt limit
|
138 |
+
*
|
139 |
+
* @package wp-responsive-recent-post-slider
|
140 |
+
* @since 1.2.5
|
141 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
function wprps_limit_words($string, $word_limit)
|
143 |
{
|
144 |
if( !empty($string) ) {
|
145 |
$content = strip_shortcodes( $string ); // Strip shortcodes
|
146 |
$content = wp_trim_words( $string, $word_limit, '...' );
|
147 |
+
return $content;
|
148 |
}
|
149 |
}
|
languages/wp-responsive-recent-post-slider-en_US-wprps-free-block-js.json
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=2; plural=n != 1;","lang":"en_US"},"https://github.com/ahmadawais/create-guten-block/":[null,""],"https://www.wponlinesupport.com":[null,""],"WP OnlineSupport":[null,""],"WP Responsive Recent Post Slider - Gutenberg":[null,""],"WP Responsive Recent Post Slider Gutenberg.":[null,""],"WPOS Blocks":[null,""]}}}
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Stable tag: trunk
|
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
Add and display Responsive WordPresss Recent Post Slider and Carousel on your website with 4 designs (Slider) and 1 designs (Carousel) using a shortcode. Also
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -26,7 +26,7 @@ You can also try our FREE plugin [Recent Posts Widget Designer](https://wordpres
|
|
26 |
|
27 |
Display unlimited number of WordPresss posts slider and carousel in a single page or post with different sets of options like category, limit, navigation type.
|
28 |
|
29 |
-
**Also
|
30 |
|
31 |
= Here is the plugin shortcode example =
|
32 |
|
@@ -120,6 +120,7 @@ Where designs are : design-1, design-2, design-3, design-4. You can use same par
|
|
120 |
>
|
121 |
|
122 |
= Features include: =
|
|
|
123 |
* Post slider
|
124 |
* Post carousel
|
125 |
* Easy to add.
|
@@ -157,9 +158,16 @@ Where designs are : design-1, design-2, design-3, design-4. You can use same par
|
|
157 |
4. Design-4
|
158 |
5. Also work with Gutenberg shortcode block.
|
159 |
6. Category shortcode for post
|
|
|
|
|
160 |
|
161 |
== Changelog ==
|
162 |
|
|
|
|
|
|
|
|
|
|
|
163 |
= 2.2.5 (24, Jan 2020) =
|
164 |
* [*] New : Added new shortcode parameter "posts" for both shortcode.
|
165 |
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Add and display Responsive WordPresss Recent Post Slider and Carousel on your website with 4 designs (Slider) and 1 designs (Carousel) using a shortcode. Also added Gutenberg block support.
|
11 |
|
12 |
== Description ==
|
13 |
|
26 |
|
27 |
Display unlimited number of WordPresss posts slider and carousel in a single page or post with different sets of options like category, limit, navigation type.
|
28 |
|
29 |
+
**Also added Gutenberg block support.**
|
30 |
|
31 |
= Here is the plugin shortcode example =
|
32 |
|
120 |
>
|
121 |
|
122 |
= Features include: =
|
123 |
+
* Added Gutenberg block support.
|
124 |
* Post slider
|
125 |
* Post carousel
|
126 |
* Easy to add.
|
158 |
4. Design-4
|
159 |
5. Also work with Gutenberg shortcode block.
|
160 |
6. Category shortcode for post
|
161 |
+
7. Gutenberg Block
|
162 |
+
8. Gutenberg Block Support
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
+
= 2.3 (13, April 2020) =
|
167 |
+
* [+] New - Added Gutenberg block support. Now use plugin easily with Gutenberg!
|
168 |
+
* [+] New - Added 'align' and 'extra_class' parameter for slider shortcode. Now both slider shortcode are support twenty-ninteent and twenty-twenty theme gutenberg block align and additional class feature.
|
169 |
+
* [*] Tweak - Code optimization and performance improvements.
|
170 |
+
|
171 |
= 2.2.5 (24, Jan 2020) =
|
172 |
* [*] New : Added new shortcode parameter "posts" for both shortcode.
|
173 |
|
templates/carousel/design-1.php
CHANGED
@@ -1,47 +1,58 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
// Exit if accessed directly
|
3 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
|
|
4 |
|
5 |
<div class="wppsac-carousel-slides">
|
6 |
<?php if( has_post_thumbnail() ) { ?>
|
7 |
-
|
8 |
<a href="<?php the_permalink(); ?>">
|
9 |
-
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
10 |
</a>
|
11 |
-
|
12 |
<?php } ?>
|
13 |
<div class="wppsac-post-content-position">
|
14 |
-
<?php if($showCategory) { ?>
|
15 |
-
|
16 |
<?php echo $cat_list; ?>
|
17 |
</div>
|
18 |
<?php } ?>
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
<?php if($showDate || $showAuthor)
|
23 |
<div class="wppsac-post-date">
|
24 |
-
<?php
|
25 |
-
|
26 |
-
<?php
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_carousel' Design 1 Shortcodes HTML
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
// Exit if accessed directly
|
10 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
?>
|
12 |
|
13 |
<div class="wppsac-carousel-slides">
|
14 |
<?php if( has_post_thumbnail() ) { ?>
|
15 |
+
<div class="wppsac-post-image-bg">
|
16 |
<a href="<?php the_permalink(); ?>">
|
17 |
+
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
18 |
</a>
|
19 |
+
</div>
|
20 |
<?php } ?>
|
21 |
<div class="wppsac-post-content-position">
|
22 |
+
<?php if( $showCategory ) { ?>
|
23 |
+
<div class="wppsac-post-categories">
|
24 |
<?php echo $cat_list; ?>
|
25 |
</div>
|
26 |
<?php } ?>
|
27 |
+
<h2 class="wppsac-post-title">
|
28 |
+
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
29 |
+
</h2>
|
30 |
+
<?php if( $showDate || $showAuthor ) { ?>
|
31 |
<div class="wppsac-post-date">
|
32 |
+
<?php if($showAuthor) { ?>
|
33 |
+
<span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span>
|
34 |
+
<?php }
|
35 |
+
$authorPar = ( $showAuthor && $showDate ) ? ' / ' : '';
|
36 |
+
echo $authorPar;
|
37 |
+
if( $showDate ) { echo get_the_date(); } ?>
|
38 |
+
</div>
|
39 |
+
<?php } ?>
|
40 |
|
41 |
+
<?php if( $showContent ) { ?>
|
42 |
+
<div class="wppsac-post-content">
|
43 |
+
<?php
|
44 |
+
$customExcerpt = get_the_excerpt();
|
45 |
+
if ( has_excerpt($post->ID) ) { ?>
|
46 |
+
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
47 |
+
<?php } else {
|
48 |
+
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
49 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
50 |
+
<?php } ?>
|
51 |
+
|
52 |
+
<?php if( $showreadmore ) { ?>
|
53 |
+
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
54 |
+
<?php } ?>
|
55 |
+
</div>
|
56 |
+
<?php } ?>
|
57 |
+
</div>
|
58 |
</div>
|
templates/slider/design-1.php
CHANGED
@@ -1,50 +1,60 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
// Exit if accessed directly
|
3 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
|
|
4 |
|
5 |
<div class="wppsac-post-slides">
|
6 |
<div class="wppsac-post-content-position">
|
7 |
<div class="wppsac-post-content-left wp-medium-8 wpcolumns">
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<?php if($showDate || $showAuthor)
|
17 |
<div class="wppsac-post-date">
|
18 |
-
<?php
|
19 |
-
|
20 |
-
<?php
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
33 |
-
<?php } ?>
|
34 |
-
|
35 |
-
<?php if($showreadmore) { ?>
|
36 |
-
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
37 |
-
<?php } ?>
|
38 |
-
|
39 |
-
</div>
|
40 |
<?php } ?>
|
41 |
-
|
42 |
-
|
43 |
-
<a href="<?php the_permalink(); ?>">
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
49 |
</div>
|
50 |
-
</div>
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_slider' Design 1 Shortcodes HTML
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
// Exit if accessed directly
|
10 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
?>
|
12 |
|
13 |
<div class="wppsac-post-slides">
|
14 |
<div class="wppsac-post-content-position">
|
15 |
<div class="wppsac-post-content-left wp-medium-8 wpcolumns">
|
16 |
+
<?php if( $showCategory ) { ?>
|
17 |
+
<div class="wppsac-post-categories">
|
18 |
+
<?php echo $cat_list; ?>
|
19 |
+
</div>
|
20 |
+
<?php } ?>
|
21 |
+
<h2 class="wppsac-post-title">
|
22 |
+
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
23 |
+
</h2>
|
24 |
+
<?php if( $showDate || $showAuthor ) { ?>
|
25 |
<div class="wppsac-post-date">
|
26 |
+
<?php if( $showAuthor ) { ?>
|
27 |
+
<span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span>
|
28 |
+
<?php }
|
29 |
+
$authorPar = ( $showAuthor && $showDate ) ? ' / ' : '';
|
30 |
+
echo $authorPar;
|
31 |
+
if( $showDate ) { echo get_the_date(); } ?>
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
|
35 |
+
<?php if( $showContent ) { ?>
|
36 |
+
<div class="wppsac-post-content">
|
37 |
+
<?php
|
38 |
+
$customExcerpt = get_the_excerpt();
|
39 |
+
if ( has_excerpt($post->ID) ) { ?>
|
40 |
+
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
41 |
+
<?php } else {
|
42 |
+
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
43 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<?php } ?>
|
45 |
+
|
46 |
+
<?php if( $showreadmore ) { ?>
|
47 |
+
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
48 |
+
<?php } ?>
|
49 |
+
</div>
|
50 |
+
<?php } ?>
|
51 |
+
</div>
|
52 |
+
<div class="wppsac-post-image-bg">
|
53 |
+
<a href="<?php the_permalink(); ?>">
|
54 |
+
<?php if( has_post_thumbnail() ) { ?>
|
55 |
+
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
56 |
+
<?php } ?>
|
57 |
+
</a>
|
58 |
</div>
|
59 |
+
</div>
|
60 |
+
</div>
|
templates/slider/design-2.php
CHANGED
@@ -1,49 +1,60 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
// Exit if accessed directly
|
3 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
4 |
-
|
|
|
|
|
5 |
<div class="wppsac-post-content-position">
|
6 |
<!-- Content-left/right -->
|
7 |
<div class="wppsac-post-content-left wp-medium-6 wpcolumns">
|
8 |
<div class="wppsac-post-inner-content">
|
9 |
-
<?php if($showCategory) { ?>
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
32 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
33 |
-
<?php } ?>
|
34 |
-
|
35 |
-
<?php if($showreadmore) { ?>
|
36 |
-
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
37 |
-
<?php } ?>
|
38 |
-
|
39 |
-
</div>
|
40 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
42 |
</div>
|
43 |
<div class="wppsac-post-image-bg">
|
44 |
<a href="<?php the_permalink(); ?>">
|
45 |
-
<?php if( has_post_thumbnail()
|
46 |
-
|
47 |
<?php } ?>
|
48 |
</a>
|
49 |
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_slider' Design 2 Shortcodes HTML
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
// Exit if accessed directly
|
10 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
?>
|
12 |
+
|
13 |
+
<div class="wppsac-post-slides">
|
14 |
<div class="wppsac-post-content-position">
|
15 |
<!-- Content-left/right -->
|
16 |
<div class="wppsac-post-content-left wp-medium-6 wpcolumns">
|
17 |
<div class="wppsac-post-inner-content">
|
18 |
+
<?php if( $showCategory ) { ?>
|
19 |
+
<div class="wppsac-post-categories">
|
20 |
+
<?php echo $cat_list; ?>
|
21 |
+
</div>
|
22 |
+
<?php } ?>
|
23 |
+
<h2 class="wppsac-post-title">
|
24 |
+
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
25 |
+
</h2>
|
26 |
+
<?php if( $showDate || $showAuthor ) { ?>
|
27 |
+
<div class="wppsac-post-date">
|
28 |
+
<?php if( $showAuthor ) { ?>
|
29 |
+
<span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span>
|
30 |
+
<?php }
|
31 |
+
$authorPar = ( $showAuthor && $showDate ) ? ' / ' : '';
|
32 |
+
echo $authorPar;
|
33 |
+
if( $showDate ) { echo get_the_date(); } ?>
|
34 |
+
</div>
|
35 |
+
<?php } ?>
|
36 |
+
<?php if( $showContent ) { ?>
|
37 |
+
<div class="wppsac-post-content">
|
38 |
+
<?php
|
39 |
+
$customExcerpt = get_the_excerpt();
|
40 |
+
if (has_excerpt($post->ID)) { ?>
|
41 |
+
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
42 |
+
<?php } else {
|
43 |
+
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
44 |
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
<?php } ?>
|
46 |
+
|
47 |
+
<?php if( $showreadmore ) { ?>
|
48 |
+
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
49 |
+
<?php } ?>
|
50 |
+
</div>
|
51 |
+
<?php } ?>
|
52 |
</div>
|
53 |
</div>
|
54 |
<div class="wppsac-post-image-bg">
|
55 |
<a href="<?php the_permalink(); ?>">
|
56 |
+
<?php if( has_post_thumbnail() ) { ?>
|
57 |
+
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
58 |
<?php } ?>
|
59 |
</a>
|
60 |
</div>
|
templates/slider/design-3.php
CHANGED
@@ -1,51 +1,62 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
// Exit if accessed directly
|
3 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
|
|
4 |
|
5 |
-
|
6 |
<div class="wppsac-post-overlay">
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
<div class="wppsac-post-categories">
|
16 |
-
|
17 |
-
|
18 |
<?php } ?>
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
</div>
|
30 |
-
<?php }
|
31 |
|
32 |
-
<?php if($showContent) {
|
33 |
<div class="wppsac-post-content">
|
34 |
<?php
|
35 |
$customExcerpt = get_the_excerpt();
|
36 |
-
if (has_excerpt($post->ID)) { ?>
|
37 |
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
38 |
<?php } else {
|
39 |
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
40 |
-
|
41 |
<?php } ?>
|
42 |
|
43 |
-
<?php if($showreadmore) { ?>
|
44 |
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
45 |
<?php } ?>
|
46 |
</div>
|
47 |
<?php } ?>
|
48 |
-
|
49 |
</div>
|
50 |
-
|
51 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_slider' Design 3 Shortcodes HTML
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
// Exit if accessed directly
|
10 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
?>
|
12 |
|
13 |
+
<div class="wppsac-post-slides">
|
14 |
<div class="wppsac-post-overlay">
|
15 |
+
<div class="wppsac-post-image-bg">
|
16 |
+
<a href="<?php the_permalink(); ?>">
|
17 |
+
<?php if( has_post_thumbnail() ) { ?>
|
18 |
+
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
19 |
+
<?php } ?>
|
20 |
+
</a>
|
21 |
+
</div>
|
22 |
+
<?php if( $showCategory ) { ?>
|
23 |
<div class="wppsac-post-categories">
|
24 |
+
<?php echo $cat_list; ?>
|
25 |
+
</div>
|
26 |
<?php } ?>
|
27 |
+
<div class="wppsac-post-short-content">
|
28 |
+
<div class="wppsac-item-meta bottom">
|
29 |
+
<h2 class="wppsac-post-title">
|
30 |
+
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
31 |
+
</h2>
|
32 |
+
<?php if( $showDate || $showAuthor ) { ?>
|
33 |
+
<div class="wppsac-post-date">
|
34 |
+
<?php if($showAuthor) { ?>
|
35 |
+
<span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span>
|
36 |
+
<?php }
|
37 |
+
$authorPar = ( $showAuthor && $showDate ) ? ' / ' : '';
|
38 |
+
echo $authorPar;
|
39 |
+
if( $showDate ) { echo get_the_date(); } ?>
|
40 |
</div>
|
41 |
+
<?php } ?>
|
42 |
|
43 |
+
<?php if( $showContent ) { ?>
|
44 |
<div class="wppsac-post-content">
|
45 |
<?php
|
46 |
$customExcerpt = get_the_excerpt();
|
47 |
+
if ( has_excerpt($post->ID) ) { ?>
|
48 |
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
49 |
<?php } else {
|
50 |
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
51 |
+
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
52 |
<?php } ?>
|
53 |
|
54 |
+
<?php if( $showreadmore ) { ?>
|
55 |
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
56 |
<?php } ?>
|
57 |
</div>
|
58 |
<?php } ?>
|
59 |
+
</div>
|
60 |
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
templates/slider/design-4.php
CHANGED
@@ -1,52 +1,63 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
// Exit if accessed directly
|
3 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
4 |
-
|
|
|
|
|
5 |
<div class="wppsac-post-list">
|
6 |
<div class="wppsac-post-list-content">
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
<div class="<?php if (!empty($feat_image)) { ?> wp-medium-7 <?php } else { ?> wp-medium-12 <?php } ?> wpcolumns">
|
15 |
-
<?php if($showCategory) { ?>
|
16 |
-
<div class="wppsac-post-categories">
|
17 |
-
<?php echo $cat_list; ?>
|
18 |
-
</div>
|
19 |
-
<?php } ?>
|
20 |
-
<h2 class="wppsac-post-title">
|
21 |
-
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
22 |
-
</h2>
|
23 |
-
<?php if($showDate || $showAuthor) { ?>
|
24 |
-
<div class="wppsac-post-date">
|
25 |
-
<?php if($showAuthor) { ?> <span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span><?php } ?>
|
26 |
-
<?php echo ($showAuthor && $showDate) ? ' / ' : '' ?>
|
27 |
-
<?php if($showDate) { echo get_the_date(); } ?>
|
28 |
-
</div>
|
29 |
-
<?php } ?>
|
30 |
-
<?php if($showContent) { ?>
|
31 |
-
<div class="wppsac-post-content">
|
32 |
-
<?php
|
33 |
-
$customExcerpt = get_the_excerpt();
|
34 |
-
if (has_excerpt($post->ID)) { ?>
|
35 |
-
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
36 |
-
<?php } else {
|
37 |
-
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
38 |
-
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
39 |
-
<?php } ?>
|
40 |
-
|
41 |
-
<?php if($showreadmore) { ?>
|
42 |
-
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
43 |
-
<?php } ?>
|
44 |
-
|
45 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
50 |
</div>
|
51 |
-
|
52 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* 'recent_post_slider' Design 4 Shortcodes HTML
|
4 |
+
*
|
5 |
+
* @package WP Responsive Recent Post Slider
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
// Exit if accessed directly
|
10 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
11 |
+
?>
|
12 |
+
|
13 |
+
<div class="wppsac-post-slides">
|
14 |
<div class="wppsac-post-list">
|
15 |
<div class="wppsac-post-list-content">
|
16 |
+
<?php if ( ! empty($feat_image) ) { ?>
|
17 |
+
<div class="wp-medium-5 wpcolumns">
|
18 |
+
<div class="wppsac-post-image-bg">
|
19 |
+
<a href="<?php the_permalink(); ?>">
|
20 |
+
<img src="<?php echo esc_url($feat_image); ?>" alt="<?php the_title_attribute(); ?>" />
|
21 |
+
</a>
|
22 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</div>
|
24 |
+
<?php } ?>
|
25 |
+
<div class="<?php if ( ! empty($feat_image) ) { ?> wp-medium-7 <?php } else { ?> wp-medium-12 <?php } ?> wpcolumns">
|
26 |
+
<?php if( $showCategory ) { ?>
|
27 |
+
<div class="wppsac-post-categories">
|
28 |
+
<?php echo $cat_list; ?>
|
29 |
+
</div>
|
30 |
<?php } ?>
|
31 |
+
<h2 class="wppsac-post-title">
|
32 |
+
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
33 |
+
</h2>
|
34 |
+
<?php if( $showDate || $showAuthor ) { ?>
|
35 |
+
<div class="wppsac-post-date">
|
36 |
+
<?php if($showAuthor) { ?>
|
37 |
+
<span><?php esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?> <?php the_author(); ?></span>
|
38 |
+
<?php }
|
39 |
+
$authorPar = ( $showAuthor && $showDate ) ? ' / ' : '';
|
40 |
+
echo $authorPar;
|
41 |
+
if( $showDate ) { echo get_the_date(); } ?>
|
42 |
+
</div>
|
43 |
+
<?php } ?>
|
44 |
+
<?php if ($showContent ) { ?>
|
45 |
+
<div class="wppsac-post-content">
|
46 |
+
<?php
|
47 |
+
$customExcerpt = get_the_excerpt();
|
48 |
+
if (has_excerpt($post->ID)) { ?>
|
49 |
+
<div class="wppsac-sub-content"><?php echo $customExcerpt ; ?></div>
|
50 |
+
<?php } else {
|
51 |
+
$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
|
52 |
+
<div class="wppsac-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>
|
53 |
+
<?php } ?>
|
54 |
|
55 |
+
<?php if($showreadmore) { ?>
|
56 |
+
<a class="wppsac-readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
|
57 |
+
<?php } ?>
|
58 |
+
</div>
|
59 |
+
<?php } ?>
|
60 |
+
</div>
|
61 |
</div>
|
62 |
+
</div>
|
63 |
+
</div>
|
wp-recent-post-slider.php
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
* Plugin URI: https://www.wponlinesupport.com/plugins/
|
5 |
* Text Domain: wp-responsive-recent-post-slider
|
6 |
* Domain Path: /languages/
|
7 |
-
* Description: Add and display Responsive WordPresss Recent Post Slider and Carousel on your website with 4 designs (Slider) and 1 designs (Carousel) using a shortcode. Also
|
8 |
* Author: WP OnlineSupport
|
9 |
-
* Version: 2.
|
10 |
* Author URI: https://www.wponlinesupport.com/
|
11 |
*
|
12 |
* @package WordPress
|
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
24 |
* @since 1.0.0
|
25 |
*/
|
26 |
if( !defined( 'WPRPS_VERSION' ) ) {
|
27 |
-
define( 'WPRPS_VERSION', '2.
|
28 |
}
|
29 |
if( !defined( 'WPRPS_DIR' ) ) {
|
30 |
define( 'WPRPS_DIR', dirname( __FILE__ ) ); // Plugin dir
|
@@ -35,12 +35,18 @@ if( !defined( 'WPRPS_URL' ) ) {
|
|
35 |
if( !defined( 'WPRPS_POST_TYPE' ) ) {
|
36 |
define( 'WPRPS_POST_TYPE', 'post' ); // Plugin post type
|
37 |
}
|
38 |
-
|
39 |
-
|
40 |
-
function wprps_load_textdomain() {
|
41 |
-
load_plugin_textdomain( 'wp-responsive-recent-post-slider', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
register_activation_hook( __FILE__, 'wprps_install' );
|
45 |
function wprps_install() {
|
46 |
if( is_plugin_active('wp-responsive-recent-post-slider-pro/wp-recent-post-slider.php') ) {
|
@@ -48,11 +54,37 @@ function wprps_install() {
|
|
48 |
}
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
function wprps_deactivate_pro_version() {
|
52 |
deactivate_plugins('wp-responsive-recent-post-slider-pro/wp-recent-post-slider.php',true);
|
53 |
}
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
56 |
function wprps_plugin_admin_notice() {
|
57 |
|
58 |
global $pagenow;
|
@@ -72,6 +104,21 @@ function wprps_plugin_admin_notice() {
|
|
72 |
}
|
73 |
}
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
// Function file
|
76 |
require_once( WPRPS_DIR . '/includes/wppsac-function.php' );
|
77 |
|
@@ -85,6 +132,11 @@ require_once( WPRPS_DIR . '/includes/admin/class-wprps-admin.php' );
|
|
85 |
require_once( WPRPS_DIR . '/includes/shortcodes/wppsac-slider.php' );
|
86 |
require_once( WPRPS_DIR . '/includes/shortcodes/wppsac-carousel.php' );
|
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
// How it work file, Load admin files
|
89 |
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
90 |
require_once( WPRPS_DIR . '/includes/admin/wprps-how-it-work.php' );
|
4 |
* Plugin URI: https://www.wponlinesupport.com/plugins/
|
5 |
* Text Domain: wp-responsive-recent-post-slider
|
6 |
* Domain Path: /languages/
|
7 |
+
* Description: Add and display Responsive WordPresss Recent Post Slider and Carousel on your website with 4 designs (Slider) and 1 designs (Carousel) using a shortcode. Also added Gutenberg block support.
|
8 |
* Author: WP OnlineSupport
|
9 |
+
* Version: 2.3
|
10 |
* Author URI: https://www.wponlinesupport.com/
|
11 |
*
|
12 |
* @package WordPress
|
24 |
* @since 1.0.0
|
25 |
*/
|
26 |
if( !defined( 'WPRPS_VERSION' ) ) {
|
27 |
+
define( 'WPRPS_VERSION', '2.3' ); // Version of plugin
|
28 |
}
|
29 |
if( !defined( 'WPRPS_DIR' ) ) {
|
30 |
define( 'WPRPS_DIR', dirname( __FILE__ ) ); // Plugin dir
|
35 |
if( !defined( 'WPRPS_POST_TYPE' ) ) {
|
36 |
define( 'WPRPS_POST_TYPE', 'post' ); // Plugin post type
|
37 |
}
|
38 |
+
if(!defined( 'WPRPS_PLUGIN_LINK' ) ) {
|
39 |
+
define( 'WPRPS_PLUGIN_LINK', 'https://www.wponlinesupport.com/wp-plugin/wp-responsive-recent-post-slider/?utm_source=WP&utm_medium=WP-Plugins&utm_campaign=Features-PRO#fndtn-lifetime' ); // Plugin link
|
|
|
|
|
40 |
}
|
41 |
|
42 |
+
/**
|
43 |
+
* Activation Hook
|
44 |
+
*
|
45 |
+
* Register plugin activation hook.
|
46 |
+
*
|
47 |
+
* @package WP Responsive Recent Post Slider
|
48 |
+
* @since 1.0.0
|
49 |
+
*/
|
50 |
register_activation_hook( __FILE__, 'wprps_install' );
|
51 |
function wprps_install() {
|
52 |
if( is_plugin_active('wp-responsive-recent-post-slider-pro/wp-recent-post-slider.php') ) {
|
54 |
}
|
55 |
}
|
56 |
|
57 |
+
/**
|
58 |
+
* Deactivation Hook
|
59 |
+
*
|
60 |
+
* Register plugin deactivation hook.
|
61 |
+
*
|
62 |
+
* @package WP Responsive Recent Post Slider
|
63 |
+
* @since 1.0.0
|
64 |
+
*/
|
65 |
+
register_deactivation_hook( __FILE__, 'wprps_uninstall');
|
66 |
+
function wprps_uninstall() {
|
67 |
+
|
68 |
+
// IMP need to flush rules for custom registered post type
|
69 |
+
flush_rewrite_rules();
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Deactivate free plugin
|
74 |
+
*
|
75 |
+
* @package WP Responsive Recent Post Slider
|
76 |
+
* @since 1.0.0
|
77 |
+
*/
|
78 |
function wprps_deactivate_pro_version() {
|
79 |
deactivate_plugins('wp-responsive-recent-post-slider-pro/wp-recent-post-slider.php',true);
|
80 |
}
|
81 |
|
82 |
+
/**
|
83 |
+
* Function to display admin notice of activated plugin.
|
84 |
+
*
|
85 |
+
* @package WP Responsive Recent Post Slider
|
86 |
+
* @since 1.0.0
|
87 |
+
*/
|
88 |
function wprps_plugin_admin_notice() {
|
89 |
|
90 |
global $pagenow;
|
104 |
}
|
105 |
}
|
106 |
|
107 |
+
// Action to display notice
|
108 |
+
add_action( 'admin_notices', 'wprps_plugin_admin_notice');
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Load Text Domain
|
112 |
+
* This gets the plugin ready for translation
|
113 |
+
*
|
114 |
+
* @package WP Responsive Recent Post Slider
|
115 |
+
* @since 2.3
|
116 |
+
*/
|
117 |
+
function wprps_load_textdomain() {
|
118 |
+
load_plugin_textdomain( 'wp-responsive-recent-post-slider', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
|
119 |
+
}
|
120 |
+
add_action('plugins_loaded', 'wprps_load_textdomain');
|
121 |
+
|
122 |
// Function file
|
123 |
require_once( WPRPS_DIR . '/includes/wppsac-function.php' );
|
124 |
|
132 |
require_once( WPRPS_DIR . '/includes/shortcodes/wppsac-slider.php' );
|
133 |
require_once( WPRPS_DIR . '/includes/shortcodes/wppsac-carousel.php' );
|
134 |
|
135 |
+
// Gutenberg Block Initializer
|
136 |
+
if ( function_exists( 'register_block_type' ) ) {
|
137 |
+
require_once( WPRPS_DIR . '/includes/admin/supports/gutenberg-block.php' );
|
138 |
+
}
|
139 |
+
|
140 |
// How it work file, Load admin files
|
141 |
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
142 |
require_once( WPRPS_DIR . '/includes/admin/wprps-how-it-work.php' );
|