Changeset 2477869
- Timestamp:
- 02/19/2021 05:54:03 PM (5 years ago)
- Location:
- custom-simple-rss/trunk
- Files:
-
- 6 edited
-
custom-simple-rss-admin.css (modified) (1 diff)
-
custom-simple-rss-admin.php (modified) (5 diffs)
-
custom-simple-rss-examples.php (modified) (1 diff)
-
custom-simple-rss-tutorial.php (modified) (1 diff)
-
custom-simple-rss.php (modified) (5 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-simple-rss/trunk/custom-simple-rss-admin.css
r1993442 r2477869 1 1 #custom-simple-rss-admin-wrapper { 2 3 4 5 background: #32373C ; 6 7 width: 90%; 8 9 min-width: 575px; 10 11 box-shadow: 0px 0px 6px #888; 12 13 -moz-box-shadow: 0px 0px 6px #888; 14 15 -webkit-box-shadow: 0px 0px 6px #888; 16 17 -moz-border-radius: 0 5px 5px 5px; 18 19 -webkit-border-radius: 0 5px 5px 5px; 20 21 border-radius: 5px 5px 5px 5px; 22 23 min-height:600px; 24 25 position:relative; 26 27 padding:1%; 28 29 overflow:hidden; 30 31 float: left; 32 2 background: #32373C; 3 width: 90%; 4 min-width: 575px; 5 box-shadow: 0px 0px 6px #888; 6 -moz-box-shadow: 0px 0px 6px #888; 7 -webkit-box-shadow: 0px 0px 6px #888; 8 -moz-border-radius: 0 5px 5px 5px; 9 -webkit-border-radius: 0 5px 5px 5px; 10 border-radius: 5px 5px 5px 5px; 11 min-height: 600px; 12 position: relative; 13 padding: 1%; 14 overflow: hidden; 15 float: left; 33 16 } 34 17 35 18 #custom-simple-rss-admin-wrapper .tabs { 36 37 width: 100%; 38 39 height: 44px; 40 41 42 19 width: 100%; 20 height: 44px; 43 21 } 44 22 45 23 #custom-simple-rss-admin-wrapper .tab { 46 47 width: 30%; 48 49 border: 1px solid whitesmoke; 50 51 background-color: aliceblue; 52 53 float: left; 54 55 margin: 0 0 0 0; 56 57 border-right: 2px solid white; 58 59 cursor:pointer; 60 61 padding:0 1%; 62 24 width: 20%; 25 border: 1px solid whitesmoke; 26 background-color: aliceblue; 27 float: left; 28 margin: 0 0 0 0; 29 border-right: 2px solid white; 30 cursor: pointer; 31 padding: 0 1%; 63 32 } 64 33 65 34 #custom-simple-rss-admin-wrapper .tab.on { 66 67 35 border-bottom: 2px solid rgb(186, 32, 0); 68 69 36 margin-top: -1px; 70 71 37 background-color: white; 72 73 38 } 74 39 75 40 #custom-simple-rss-admin-wrapper .postbox.on { 76 77 display:block; 78 41 display: block; 79 42 } 80 43 81 44 #custom-simple-rss-admin-wrapper .postbox { 82 83 display:none; 84 45 display: none; 85 46 } 86 47 87 48 #custom-simple-rss-admin-wrapper pre { 88 89 word-wrap: break-word; 90 49 word-wrap: break-word; 91 50 } 92 51 93 52 .custom-simple-rss-admin-label { 53 font-weight: 700; 54 margin: 0 0 5px 0; 94 55 95 font-weight: 700;96 97 margin: 0 0 5px 0;98 56 99 57 /* border-bottom: 1px solid black; */ 100 101 width: 98%; 102 103 background-color: #F1F1F1; 104 105 background-image: -ms-linear-gradient(top,#F9F9F9,#ECECEC); 106 107 background-image: -moz-linear-gradient(top,#F9F9F9,#ECECEC); 108 109 background-image: -o-linear-gradient(top,#F9F9F9,#ECECEC); 110 111 background-image: -webkit-gradient(linear,left top,left bottom,from(#F9F9F9),to(#ECECEC)); 112 113 background-image: -webkit-linear-gradient(top,#F9F9F9,#ECECEC); 114 115 background-image: linear-gradient(top,#F9F9F9,#ECECEC); 116 117 border-top: 1px solid #FFF; 118 119 border-bottom: 1px solid #ccc; 120 121 margin: 0 0 5px; 122 123 padding: 8px 1%; 124 125 cursor:default !important; 126 127 font-size:14px; 128 58 width: 98%; 59 background-color: #F1F1F1; 60 background-image: -ms-linear-gradient(top,#F9F9F9,#ECECEC); 61 background-image: -moz-linear-gradient(top,#F9F9F9,#ECECEC); 62 background-image: -o-linear-gradient(top,#F9F9F9,#ECECEC); 63 background-image: -webkit-gradient(linear,left top,left bottom,from(#F9F9F9),to(#ECECEC)); 64 background-image: -webkit-linear-gradient(top,#F9F9F9,#ECECEC); 65 background-image: linear-gradient(top,#F9F9F9,#ECECEC); 66 border-top: 1px solid #FFF; 67 border-bottom: 1px solid #ccc; 68 margin: 0 0 5px; 69 padding: 8px 1%; 70 cursor: default !important; 71 font-size: 14px; 129 72 } 130 73 131 74 .custom-simple-rss-admin-row { 132 133 border: solid 1px #CCC; 134 135 margin: 15px 0 ; 136 137 background: #F9F9F9 ; 138 139 -webkit-box-shadow: 0 1px rgba(0, 0, 0, .05); 140 141 -moz-box-shadow: 0 1px rgba(0,0,0,.05); 142 143 box-shadow: 0 1px rgba(0, 0, 0, .05); 144 145 overflow: hidden; 146 147 border-radius: 3px; 148 149 -moz-border-radius: 3px; 150 151 -webkit-border-radius: 3px; 152 153 clear:both; 154 155 position:relative; 156 157 padding: 5px 2px; 158 75 border: solid 1px #CCC; 76 margin: 15px 0; 77 background: #F9F9F9; 78 -webkit-box-shadow: 0 1px rgba(0, 0, 0, .05); 79 -moz-box-shadow: 0 1px rgba(0,0,0,.05); 80 box-shadow: 0 1px rgba(0, 0, 0, .05); 81 overflow: hidden; 82 border-radius: 3px; 83 -moz-border-radius: 3px; 84 -webkit-border-radius: 3px; 85 clear: both; 86 position: relative; 87 padding: 5px 2px; 159 88 } 160 89 161 90 .custom-simple-rss-admin-row textarea { 91 width: 500px; 92 } 162 93 163 width: 500px; 94 /*============ url bulider ================*/ 95 .csrp_ub_form_wrapper { 96 display: inline-block; 97 width: 96%; 98 margin: 0 1%; 99 } 164 100 101 .csrp_ub_form_result { 102 width: 90%; 103 float: left; 104 background-color: white; 105 margin: 0 1%; 106 display: inline-block; 165 107 } 108 109 .csrp_ub_form { 110 width: 98%; 111 float: left; 112 background-color: white; 113 margin: 0 1%; 114 } 115 116 .csrp_ub_form_wrapper .col-4 { 117 display: inline-block; 118 width: 25%; 119 float: left; 120 } 121 122 .csrp_ub_form_wrapper .col-3 { 123 display: inline-block; 124 width: 29%; 125 float: left; 126 margin: 0 1%; 127 padding: 1% 1%; 128 } 129 130 .csrp_ub_form_wrapper .col-2 { 131 display: inline-block; 132 width: 45%; 133 float: left; 134 margin: 0 1%; 135 padding: 1% 1%; 136 } 137 138 .csrp_ub_form_wrapper .col-1 { 139 display: inline-block; 140 width: 94%; 141 float: left; 142 margin: 0 1%; 143 padding: 1% 1%; 144 } 145 146 .csrp_ub_form_wrapper .col-1 textarea { 147 display: inline-block; 148 width: 94%; 149 background-color: #daeaff; 150 background-image: none; 151 margin: 5px 0; 152 padding: 8px; 153 cursor: default !important; 154 font-size: 14px; 155 border-bottom: 1px solid #498fec; 156 } 157 158 .csrp_ub_form_wrapper .info { 159 background-color: #daeaff; 160 background-image: none; 161 margin: 5px 0; 162 padding: 8px; 163 cursor: default !important; 164 font-size: 14px; 165 border-bottom: 1px solid #498fec; 166 } 167 168 .csrp_ub_form_wrapper .info li { 169 padding: 0 8px; 170 } 171 172 #custom-simple-rss-form .btn.submit { 173 174 /*position: fixed; 175 top: 100px; 176 right: 100px; 177 */ 178 width: 150px; 179 line-height: 1.9rem; 180 padding: 6px 12px; 181 background: #0085ba; 182 border-color: #0073aa #006799 #006799; 183 -webkit-box-shadow: 0 1px 0 #006799; 184 box-shadow: 0 1px 0 #006799; 185 color: #fff; 186 text-decoration: none; 187 text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; 188 cursor: pointer; 189 } -
custom-simple-rss/trunk/custom-simple-rss-admin.php
r2470303 r2477869 1 1 <?php 2 define('CUSTOM_SIMPLE_RSS_VERSION', '2.1. 1');2 define('CUSTOM_SIMPLE_RSS_VERSION', '2.1.2'); 3 3 define('CUSTOM_SIMPLE_RSS_PLUGIN_URL', plugin_dir_url( __FILE__ )); 4 4 define('CUSTOM_SIMPLE_RSS_PLUGIN_ADMIN_FILE', plugin_dir_path(__FILE__)."custom-simple-rss-admin.php" ); … … 9 9 //register admin menu 10 10 function custom_simple_rss_admin_menu() { 11 //add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);12 11 add_options_page( 'Custom Simple Rss Plugin Options', 'Custom Simple Rss Plugin', 'manage_options', 'custom-simple-rss-admin-options', 'custom_simple_rss_options' ); 13 //add_action( 'admin_print_styles-' . $page, 'custom_simple_rss_admin_styles' ); 12 add_menu_page( 13 'Custom Simple RSS', 14 'Custom Rss', 15 'manage_options', 16 'custom-simple-rss-admin-options', 17 'custom_simple_rss_options', 18 'dashicons-rss', 19 100 20 ); 14 21 } 15 22 add_action( 'admin_menu', 'custom_simple_rss_admin_menu' ); … … 21 28 wp_enqueue_script('custom-simple-rss-js', plugins_url('custom-simple-rss.js', __FILE__), array(), '1.1'.time()); 22 29 } 23 //add_action( 'admin_init', 'custom_simple_rss_admin_init' );24 30 add_action( 'admin_enqueue_scripts', 'custom_simple_rss_admin_init' ); 25 31 32 function custom_simple_rss_admin_href($params){ 33 return '<a href="'. site_url() .'?call_custom_simple_rss=1'.$params.'" target="_blank">'.site_url() .'?call_custom_simple_rss=1'.$params.'</a><br>'; 34 } 35 26 36 function custom_simple_rss_options(){ 27 37 if( isset($_GET['page']) && $_GET['page'] != '' ){ 38 $csrp_admin_page = $_GET['page']; 39 } 28 40 custom_simple_rss_get_form_data(); 29 41 … … 44 56 '0'=>'xml by srting', 45 57 ); 46 ?>47 58 ?> 59 <div class="wrap" id="custom-simple-rss-admin-wrapper" style="direction:ltr;"> 48 60 49 <div class="wrap" id="custom-simple-rss-admin-wrapper" style="direction:ltr;"> 61 <?php if($csrp_admin_page == 'custom-simple-rss-admin-options') : ?> 62 50 63 <div class="tabs"> 51 <div class="tab" id="1"><h2>Examples</h2></div> 52 <div class="tab" id="2"><h2>Parameters Tutorial</h2></div> 64 <div class="tab" id="2"><h2>Tutorial and Examples</h2></div> 53 65 <div class="tab on" id="3"><h2>Set Defaults</h2></div> 54 </div> 55 <div class="postbox" id="postbox_1"> 56 <div class="inside "> 57 <?php include plugin_dir_path( __FILE__ ) . 'custom-simple-rss-examples.php'; ?> 58 </div> 59 </div> 66 </div> 60 67 <div class="postbox" id="postbox_2"> 61 68 <div class="inside"> 62 69 <?php include plugin_dir_path( __FILE__ ) . 'custom-simple-rss-tutorial.php'; ?> 70 <?php include plugin_dir_path( __FILE__ ) . 'custom-simple-rss-examples.php'; ?> 63 71 </div> 64 72 </div> 65 73 <div class="postbox on" id="postbox_3"> 66 74 <div class="inside"> 67 <form method="POST" id="custom-simple-rss-form" > 68 <?php wp_nonce_field( 'csrp_update_options_nonce_action', 'csrp_update_options_nonce' ); ?> 69 <input type="hidden" name="action" value="custom_simple_rss_form_submit"> 70 <h2>Set Defaults</h2> 71 <hr> 72 <h3> 73 What ever you set here will effect all rss feeds defaults, UNLESS you choose otherwise by url query Parameters.(see Examples and Parameters tab for more info) 74 </h3> 75 <div class="custom-simple-rss-admin-row"> 76 <div class="custom-simple-rss-admin-label">Default tpost type:</div> 77 <input type="text" name="csrp_post_type" value="<?php echo $csrp_post_type ?>"> 78 </div> 79 80 <div class="custom-simple-rss-admin-row"> 81 <div class="custom-simple-rss-admin-label">Default post_status:</div> 82 <input type="text" name="csrp_post_status" value="<?php echo $csrp_post_status ?>"> 83 <br> 84 <div class="custom-simple-rss-admin-label">WordPress Core Statuses:</div> 85 <em>publish</em> - Viewable by everyone. (publish) 86 <br> <em>future</em> - Scheduled to be published in a future date. (future) 87 <br> <em>draft</em> - Incomplete post viewable by anyone with proper user role. (draft) 88 <br> <em>pending</em> - Awaiting a user with the publish_posts capability (typically a user assigned the Editor role) to publish. (pending) 89 <br> <em>private</em> - Viewable only to WordPress users at Administrator level. (private) 90 <br> <em>trash</em> - Posts in the Trash are assigned the trash status. (trash) 91 </div> 92 93 <div class="custom-simple-rss-admin-row"> 94 <div class="custom-simple-rss-admin-label">posts_per_page:</div> 95 <input type="text" name="csrp_posts_per_page" value="<?php echo $csrp_posts_per_page ?>"> 96 </div> 97 <div class="custom-simple-rss-admin-row"> 98 <div class="custom-simple-rss-admin-label">show post_meta in feed:</div> 99 100 <select name="csrp_show_meta"> 101 <option value="1" <?php if($csrp_show_meta=="1") echo 'selected' ?> >Yes</option> 102 <option value="0" <?php if($csrp_show_meta=="0") echo 'selected' ?> >No</option> 103 </select> 104 </div> 105 <div class="custom-simple-rss-admin-row"> 106 <div class="custom-simple-rss-admin-label">show post thumbnail in feed:</div> 107 <select name="csrp_show_thumbnail"> 108 <option value="1" <?php if($csrp_show_thumbnail=="1") echo 'selected' ?> >Yes</option> 109 <option value="0" <?php if($csrp_show_thumbnail=="0") echo 'selected' ?> >No</option> 110 </select> 111 </div> 112 <div class="custom-simple-rss-admin-row"> 113 <div class="custom-simple-rss-admin-label">show post content in feed:</div> 114 <select name="csrp_show_content"> 115 <?php 116 foreach($show_content_arr as $key => $value) : 117 $selected = ''; 118 if($key==$csrp_show_content) $selected = 'selected'; 119 ?> 120 <option value="<?php echo $key ?>" <?php echo $selected ?>><?php echo $value ?></option> 121 <?php endforeach;?> 122 </select> 123 <br> 124 <div class="custom-simple-rss-admin-label">allowed html tags:</div> 125 * works only for "show clean html" - if chosen above 126 <br> 127 * one long line - NO spaces: <code><br><div><li></code> etc... 128 <br> 129 <?php 130 if($csrp_allowed_tags==''){ 131 $csrp_allowed_tags = CUSTOM_SIMPLE_RSS_PLUGIN_ALLOWED_TAGS; 132 } 133 ?> 134 <textarea name="csrp_allowed_tags" ><?php echo $csrp_allowed_tags ?></textarea> 135 <div class="custom-simple-rss-admin-label">build output xml with:</div> 136 * string: build xml feed with simple xml string<br> 137 * DOM: build xml with DOMDocument for better validation (! be carefull can break some feeds) 138 <br> 139 <select name="csrp_xml_type"> 140 <?php 141 foreach($csrp_xml_type_arr as $key => $value) : 142 $selected = ''; 143 if($key==$csrp_xml_type) $selected = 'selected'; 144 ?> 145 <option value="<?php echo $key ?>" <?php echo $selected ?>><?php echo $value ?></option> 146 <?php endforeach;?> 147 </select> 148 <br> 149 </div> 150 <div class="custom-simple-rss-admin-row"> 151 <div class="custom-simple-rss-admin-label">pubDate date format:</div> 152 * Post RFC Local Date & Time: date time in RFC local format - for example "wo, 14 okt 2020 16:16:26 +0200"<br> 153 * Post RFC Universal Date & Time: - for example: <?php echo date( 'D, d M Y H:i:s +0000' ) ?><br> 154 * Post Date: the date format of your web site - for example <?php echo date( get_option( 'date_format' ) ); ?><br> 155 * Post Date & Time: the date and time format of your web site - for example <?php echo date( get_option( 'date_format' ).' '.get_option('time_format') ); ?><br> 156 157 <select name="csrp_pubdate_date_format"> 158 <option value="rfc" <?php if($csrp_pubdate_date_format=="rfc") echo 'selected' ?> >Local RFC Post Date</option> 159 <option value="universal_rfc" <?php if($csrp_pubdate_date_format=="universal_rfc") echo 'selected' ?> >Universal RFC Post Date</option> 160 <option value="blog_date" <?php if($csrp_pubdate_date_format=="blog_date") echo 'selected' ?> >Blog Date Format</option> 161 <option value="blog_date_time" <?php if($csrp_pubdate_date_format=="blog_date_time") echo 'selected' ?> >Blog Date & Time Format</option> 162 163 </select> 164 </div> 165 <div class="custom-simple-rss-admin-row"> 166 <div class="custom-simple-rss-admin-label">protect my feeds with a key:</div> 167 <input type="text" name="csrp_secret_key" value="<?php echo $csrp_secret_key ?>"> 168 </div> 169 <input type="hidden" name="page" value="custom-simple-rss-admin-options"> 170 <input type="submit" value="GO"> 171 </form> 75 <?php include plugin_dir_path( __FILE__ ) . 'custom-simple-rss-defaults.php'; ?> 172 76 </div> 173 77 </div> 78 79 <?php endif; ?> 80 <?php if($csrp_admin_page == 'custom-simple-rss-admin-url-builder') : ?> 81 <div class="postbox on" id="postbox_4"> 82 <div class="inside "> 83 <?php include plugin_dir_path( __FILE__ ) . 'custom-simple-rss-url-builder.php'; ?> 84 </div> 85 </div> 86 <?php endif; ?> 174 87 </div> 175 <?php88 <?php 176 89 } 177 90 178 function custom_simple_rss_get_form_data(){ 179 91 function custom_simple_rss_get_form_data(){ 180 92 if($_POST && isset( $_POST['action'] ) && $_POST['action'] == 'custom_simple_rss_form_submit'){ 181 182 93 if ( ! isset( $_POST['csrp_update_options_nonce'] ) || ! wp_verify_nonce( $_POST['csrp_update_options_nonce'], 'csrp_update_options_nonce_action' ) ) { 183 94 … … 197 108 'csrp_allowed_tags'=> preg_replace("/[^a-zA-Z0-9<>]+/", "", $_POST["csrp_allowed_tags"]), 198 109 'csrp_secret_key'=> sanitize_text_field( $_POST["csrp_secret_key"] ), 199 'csrp_xml_type'=>intval( $_POST["csrp_xml_type"] ),200 'csrp_pubdate_date_format'=> sanitize_text_field( $_POST["csrp_pubdate_date_format"] ),110 'csrp_xml_type'=>intval( $_POST["csrp_xml_type"] ), 111 'csrp_pubdate_date_format'=> sanitize_text_field( $_POST["csrp_pubdate_date_format"] ), 201 112 202 113 ); -
custom-simple-rss/trunk/custom-simple-rss-examples.php
r2067025 r2477869 1 <h2>Examples</h2> 1 <hr> 2 <u><h2>Examples</h2></u> 2 3 3 <h3>see full specs and options in Parameters tab4 <h3>see full specs and options above 4 5 5 <hr>6 <hr> 6 7 7 <p>8 <p> 8 9 9 <h3>call a simple rss with defaults:</h3>10 <h3>call a simple rss with defaults:</h3> 10 11 11 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1" target="_blank">12 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1" target="_blank"> 12 13 13 <?php echo site_url() ?>?call_custom_simple_rss=114 <?php echo site_url() ?>?call_custom_simple_rss=1 14 15 15 </a>16 </a> 16 17 17 <ul>18 <ul> 18 19 19 <li>post type: post</li>20 <li>post type: post</li> 20 21 21 <li>post status: publish</li>22 <li>post status: publish</li> 22 23 23 <li>posts per page: 20</li>24 <li>posts per page: 20</li> 24 25 25 </ul>26 </ul> 26 27 27 </p>28 </p> 28 29 29 <hr>30 <hr> 30 31 31 <p>32 <p> 32 33 33 <h3>call 5 items only. order by name descending from category 5</h3>34 <h3>call 5 items only. order by name descending from category 5</h3> 34 35 35 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_orderby=name&csrp_order=DESC&csrp_cat=5" target="_blank">36 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_orderby=name&csrp_order=DESC&csrp_cat=5" target="_blank"> 36 37 37 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_orderby=name&csrp_order=DESC38 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_orderby=name&csrp_order=DESC 38 39 39 </a>40 </a> 40 41 41 <ul>42 <ul> 42 43 43 <li>post type: post</li>44 <li>post type: post</li> 44 45 45 <li>post status: publish</li>46 <li>post status: publish</li> 46 47 47 <li>posts per page: 5</li>48 <li>posts per page: 5</li> 48 49 49 <li>category: 5 </li>50 <li>category: 5 </li> 50 51 51 <li>order by: name</li>52 <li>order by: name</li> 52 53 53 <li>order: descending</li>54 <li>order: descending</li> 54 55 55 </ul>56 </ul> 56 57 57 </p>58 </p> 58 59 59 <hr>60 <hr> 60 61 61 <p>62 <p> 62 63 63 <h3>Return posts by meta key</h3>64 <h3>Return posts by meta key</h3> 64 65 65 <h4>Display post with meta_key '_thumbnail_id' and meta_value 1448:</h4>66 <h4>Display post with meta_key '_thumbnail_id' and meta_value 1448:</h4> 66 67 67 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448" target="_blank">68 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448" target="_blank"> 68 69 69 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=144870 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448 70 71 71 </a>72 </a> 72 73 73 <h4>Display post with meta_key '_thumbnail_id' and meta_value NOT 1448:</h4>74 <h4>Display post with meta_key '_thumbnail_id' and meta_value NOT 1448:</h4> 74 75 75 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN" target="_blank">76 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN" target="_blank"> 76 77 77 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN78 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN 78 79 79 </a><br>80 </a><br> 80 81 81 **** see Parameters tab for full specs ****82 **** see Parameters tab for full specs **** 82 83 83 </p>84 </p> 84 85 85 <hr>86 <hr> 86 87 87 <p>88 89 <h3>Set post image size</h3>90 91 <h4>show full size</h4>92 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=full'; ?>93 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br>94 95 <h4>show medium size</h4>96 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=medium'; ?>97 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br>88 <p> 89 90 <h3>Set post image size</h3> 91 92 <h4>show full size</h4> 93 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=full'; ?> 94 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br> 95 96 <h4>show medium size</h4> 97 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=medium'; ?> 98 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br> 98 99 99 <h4>show custom size</h4>100 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=400x300'; ?>101 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br>102 103 </p>104 105 <hr>100 <h4>show custom size</h4> 101 <?php $ex = site_url().'?call_custom_simple_rss=1&csrp_thumbnail_size=400x300'; ?> 102 <a href="<?php echo $ex ?>" target="_blank"><?php echo $ex ?></a><br> 103 104 </p> 105 106 <hr> 106 107 107 <p>108 <p> 108 109 109 <h3>Return posts between dates</h3>110 <h3>Return posts between dates</h3> 110 111 111 <h4>Return posts modified in 2014:</h4>112 <h4>Return posts modified in 2014:</h4> 112 113 113 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified" target="_blank">114 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified" target="_blank"> 114 115 115 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified116 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified 116 117 117 </a><br>118 </a><br> 118 119 119 <h4>Return posts made over a year ago but modified in the past month:</h4>120 <h4>Return posts made over a year ago but modified in the past month:</h4> 120 121 121 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date" target="_blank">122 <a href="<?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date" target="_blank"> 122 123 123 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date124 <?php echo site_url() ?>?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date 124 125 125 </a><br>126 </a><br> 126 127 127 ***** see Parameters tab for full specs ****128 ***** see Parameters tab for full specs **** 128 129 129 </p>130 </p> 130 131 131 132 -
custom-simple-rss/trunk/custom-simple-rss-tutorial.php
r2067025 r2477869 1 1 <h2>Parameters Tutorial</h2> 2 2 3 <h3>How to call the URL and what each parameter does... test it don`t be shy :) </h3> 4 5 <hr> 6 7 <pre> 8 9 New!!! 10 · csrp_thumbnail_size (string | optional) Image size. 11 12 Set post image size: 13 3 <h3>How to call the URL and what each parameter does... <span color="green">test it don`t be shy :)</span> </h3> 4 5 <hr> 6 <u><h3>Default Call:</h3></u> 7 <li>post type: post</li> 8 <li>post status: publish</li> 9 <li>posts per page: 20</li> 10 <?php echo custom_simple_rss_admin_href(''); ?> 11 12 <hr> 13 <u><h3>Set Thumbnail(featured image) Size:</h3></u> 14 <h4>csrp_thumbnail_size (string | optional) Image size.</h4> 15 <p> 16 Set post image size: 14 17 Accepts any valid wordpress image sizes : full / large / medium 15 18 OR a string of width and height (in that order) values in pixels seperetad by 'x'. for example '400x300' 16 17 Examples: 19 </p> 20 <h5>Examples:</h5> 21 <p> 22 Display full size 23 <?php echo custom_simple_rss_admin_href('&csrp_thumbnail_size=full'); ?> 24 </p> 25 <p> 26 Display large size 27 <?php echo custom_simple_rss_admin_href('&csrp_thumbnail_size=large'); ?> 28 </p> 29 <p> 30 Display medium size 31 <?php echo custom_simple_rss_admin_href("&csrp_thumbnail_size=medium"); ?> 32 </p> 33 <p> 34 Display custom size 35 <?php echo custom_simple_rss_admin_href("&csrp_thumbnail_size=400x300"); ?> 36 </p> 18 37 19 Display full size 38 <hr> 39 <u><h3>filter by post category/s:</h3></u> 40 <h4>csrp_cat (string | optional)</h4> 41 <p> 42 Display posts that have this category (and any children of that category), using category id 43 <?php echo custom_simple_rss_admin_href("&csrp_cat=4"); ?> 44 </p> 45 <p> 46 Display posts that have these categories, using category id 47 <?php echo custom_simple_rss_admin_href("&csrp_cat=2,6,17,38"); ?> 48 </p> 49 <p> 50 Display all posts except those from a category by prefixing its id with a '-' (minus) sign 51 <?php echo custom_simple_rss_admin_href("&csrp_cat=-12,-34,-56"); ?> 52 </p> 53 54 <hr> 55 <u><h3>filter by post author:</h3></u> 56 <h4>csrp_author (string | optional)</h4> 57 <p> 58 Display posts by author, using author id: 59 <?php echo custom_simple_rss_admin_href("&csrp_author=5"); ?> 60 </p> 61 <p> 62 Show Posts From Several Authors: 63 <?php echo custom_simple_rss_admin_href("&csrp_author=2,6,17,38"); ?> 64 </p> 65 <p> 66 Exclude Posts Belonging to an Author: 67 <?php echo custom_simple_rss_admin_href("&csrp_author=-5"); ?> 68 </p> 69 70 <hr> 71 <h4>csrp_author_name (string | optional)</h4> 72 <p> 73 Display posts by author, using author 'user_nicename': 74 <?php echo custom_simple_rss_admin_href("&csrp_author_name=john"); ?> 75 </p> 76 77 <hr> 78 <u><h3>Show X number of posts:</h3></u> 79 <h4>csrp_posts_per_page (int | optional) default 20</h4> 80 <p> 81 show only 5 posts 82 <?php echo custom_simple_rss_admin_href("&csrp_posts_per_page=5"); ?> 83 </p> 84 <hr> 85 <u><h3>Order by:</h3></u> 86 <h4>csrp_orderby (string | optional) default ‘date’</h4> 87 <li>'ID' - Order by post id. Note the capitalization.</li> 88 <li>'author' - Order by author.</li> 89 <li>'name' - Order by post name (post slug).</li> 90 <li>'date' - Order by date.</li> 91 <li>'modified' - Order by last modified date.</li> 92 <li>'rand' - Random order.</li> 93 94 <p> 95 Display posts order by name: 96 <?php echo custom_simple_rss_admin_href("&csrp_orderby=name"); ?> 97 </p> 98 99 <hr> 100 <u><h3>Sort:</h3></u> 101 <h4>csrp_order (string | optional) default ‘asc’</h4> 102 <li>asc</li> 103 <li>desc</li> 104 <p> 105 Display posts order by name descending: 106 <?php echo custom_simple_rss_admin_href("&csrp_orderby=name&csrp_order=DESC"); ?> 107 </p> 108 109 <hr> 110 <u><h3>filter by post status/statuses:</h3></u> 111 <h4>csrp_post_status (string | optional) default ‘publish’</h4> 112 <li>'publish'</li> 113 <li>'pending' post is pending review.</li> 114 <li>'draft' a post in draft status.</li> 115 <li>'future' a post to publish in the future.</li> 116 <li>'trash' post is in trashbin </li> 117 <li>'any' retrieves any status except those from post statuses with 'exclude_from_search' set to true (i.e. trash and auto-draft).</li> 20 118 21 '?call_custom_simple_rss=1&csrp_thumbnail_size=full' 22 23 Display large size 24 25 '?call_custom_simple_rss=1&csrp_thumbnail_size=large' 26 27 Display medium size 28 29 '?call_custom_simple_rss=1&csrp_thumbnail_size=medium' 30 31 Display custom size 32 33 '?call_custom_simple_rss=1&csrp_thumbnail_size=400x300' 34 35 36 · csrp_cat (string | optional) 37 38 Display posts that have this category (and any children of that category), using category id 39 40 '?call_custom_simple_rss=1&csrp_cat=4' 41 42 43 44 Display posts that have these categories, using category id 45 46 '?call_custom_simple_rss=1&csrp_cat=2,6,17,38' 47 48 49 50 Display all posts except those from a category by prefixing its id with a '-' (minus) sign 51 52 '?call_custom_simple_rss=1&csrp_cat=-12,-34,-56' 53 54 55 56 · csrp_author (string | optional) 57 58 Display posts by author, using author id: 59 60 '?call_custom_simple_rss=1&csrp_author=5' 61 62 63 64 Show Posts From Several Authors: 65 66 '?call_custom_simple_rss=1&csrp_author=2,6,17,38' 67 68 69 70 Exclude Posts Belonging to an Author: 71 72 '?call_custom_simple_rss=1&csrp_author=-5' 73 74 75 76 · csrp_author_name (string | optional) 77 78 Display posts by author, using author 'user_nicename': 79 80 '?call_custom_simple_rss=1&csrp_author_name=john' 81 82 83 84 · csrp_posts_per_page (int | optional) - default 20 85 86 show only 5 posts 87 88 '?call_custom_simple_rss=1&csrp_posts_per_page=5' 89 90 91 92 · csrp_orderby (string | optional) - default ‘date’ 93 94 'ID' - Order by post id. Note the capitalization. 95 96 'author' - Order by author. 97 98 'name' - Order by post name (post slug). 99 100 'date' - Order by date. 101 102 'modified' - Order by last modified date. 103 104 'rand' - Random order. 105 106 107 108 Display posts order by name: 109 110 '?call_custom_simple_rss=1&csrp_orderby=name' 111 112 113 114 · csrp_order - (string | optional) - default ‘asc’ 115 116 asc 117 118 desc 119 120 121 122 Display posts order by name descending: 123 124 '?call_custom_simple_rss=1&csrp_orderby=name&csrp_order=DESC' 125 126 127 128 · csrp_post_status (string | optional) - default ‘publish’ 129 130 ‘publish’ 131 132 'pending' - post is pending review. 133 134 'draft' - a post in draft status. 135 136 'future' - a post to publish in the future. 137 138 'trash' - post is in trashbin 139 140 'any' - retrieves any status except those from post statuses with 'exclude_from_search' set to true (i.e. trash and auto-draft). 141 142 143 144 Display only future posts: 145 146 '?call_custom_simple_rss=1&csrp_post_status=future' 147 148 149 150 · csrp_post_type (string | optional) - default ‘post’ 151 152 post 153 154 page 155 156 any custom post defined by blog 157 158 159 160 Display Pages not Posts: 161 162 '?call_custom_simple_rss=1&csrp_post_type=page' 163 164 165 166 Display custom post types (if any): 167 168 '?call_custom_simple_rss=1&csrp_post_type=books' 169 170 171 172 173 174 <u>filter by meta:</u> 175 176 any meta value that exists in post 177 178 · csrp_meta_key (string | optional) - Custom field key. 179 180 · csrp_meta_value (string | optional) Custom field value.<b>!must be specified if meta_key present</b> 181 182 · csrp_meta_type (string | optional) You may also specify 'csrp_meta_type' if you want to cast the meta value as a specific type. 183 184 Possible values for csrp_meta_type are: 185 186 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED' 187 188 · csrp_meta_compare (string | optional) default ‘IN’ 189 190 'LIKE' 191 192 'NOT LIKE' 193 194 'IN' 195 196 'NOT IN' 197 198 'BETWEEN' 199 200 'NOT BETWEEN' 201 202 'NOT EXISTS' 203 204 205 206 Display post with meta_key '_thumbnail_id' and meta_value 1448: 207 208 '?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448' 209 210 211 212 Display post with meta_key '_thumbnail_id' and meta_value NOT 1448: 213 214 ?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN 215 216 217 218 <u>filter by date:</u> 219 220 Return posts between dates 221 222 · csrp_date (int | required) - <b>! must be set to 1 </b>to intiate the date query 223 224 · csrp_date_after (string | optional) - posts after this date. optional values: 225 226 'yyyy-mm-dd' 227 228 '1 year ago' 229 230 '1 week ago' 231 232 '1 day ago' 233 234 235 236 · csrp_date_after_type (string | optional) - get posts by publish date OR modified date - default is publish date. optional values: 237 238 'date' 239 240 'modified' 241 242 · csrp_date_before (string | optional) - posts before this date. optional values: 243 244 'yyyy-mm-dd' 245 246 '1 year ago' 247 248 '1 week ago' 249 250 '1 day ago' 251 252 · csrp_date_before_type (string | optional) - get posts by publish date OR modified date - default is publish date. optional values: 253 254 'date' 255 256 'modified' 257 258 259 260 Return posts modified in 2014 261 262 '?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified' 263 264 265 266 267 268 Return posts made over a year ago but modified in the past month 269 270 '?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date' 271 272 273 274 275 276 <u>exclude post formats:</u> 277 278 enables the option to hide specific post formats. 279 280 · csrp_exclude_post_format (string | optional) - default none, devide multiple post formats by comma 281 282 Show all post formats EXCEPT link post format and quote post format 283 284 '?call_custom_simple_rss=1&csrp_exclude_post_format=post-format-link,post-format-quote' 285 286 287 288 <u>show post meta in feed:</u> 289 290 enables the option to show all custom post fields for post. 291 292 quite handy if you need the rss as an xml data for external applications or export 293 294 disabled by default. 295 296 · csrp_show_meta (string | optional) - default 0 297 298 '?call_custom_simple_rss=1&csrp_show_meta=1' 299 300 301 302 <u>show post thumbnail in feed:</u> 303 304 · csrp_show_thumbnail (string | optional) - default 1 (show) 305 306 307 308 <u>show posts / custom post types by taxonomy:</u> 309 119 120 <p> 121 Display only future posts: 122 <?php echo custom_simple_rss_admin_href("&csrp_post_status=future"); ?> 123 </p> 124 <p> 125 Multiple post statuses: 126 <?php echo custom_simple_rss_admin_href("&csrp_post_status=publish,draft"); ?> 127 </p> 128 129 <hr> 130 <u><h3>filter by post type/types:</h3></u> 131 <h4>csrp_post_type (string | optional) default ‘post’</h4> 132 <li>post</li> 133 <li>page</li> 134 <li>any custom post defined by blog</li> 135 136 <p> 137 Display Pages not Posts: 138 <?php echo custom_simple_rss_admin_href("&csrp_post_type=page"); ?> </p> 139 <p> 140 Display custom post types (if any): 141 <?php echo custom_simple_rss_admin_href("&csrp_post_type=books"); ?> 142 </p> 143 <p> 144 Multiple post types: 145 <?php echo custom_simple_rss_admin_href("&csrp_post_status=page,post"); ?> 146 </p> 147 <hr> 148 <u><h3>filter by meta:</h3></u> 149 <h4>any meta value that exists in post</h4> 150 151 <li>csrp_meta_key (string | optional) - Custom field key.</li> 152 <li>csrp_meta_value (string | optional) Custom field value.<b>!must be specified if meta_key present</b></li> 153 <li>csrp_meta_type (string | optional) You may also specify 'csrp_meta_type' if you want to cast the meta value as a specific type.<br> Possible values for csrp_meta_type are:'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED' 154 </li> 155 <li>csrp_meta_compare (string | optional) default ‘IN’<br> Possible values: 'LIKE' 'NOT LIKE' 'IN' 'NOT IN' 'BETWEEN' 'NOT BETWEEN' 'NOT EXISTS'</li> 156 157 <p>Display post with meta_key '_thumbnail_id' and meta_value 1448: 158 <?php echo custom_simple_rss_admin_href("&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448"); ?></p> 159 <p>Display post with meta_key '_thumbnail_id' and meta_value NOT 1448: 160 <?php echo custom_simple_rss_admin_href("?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=_thumbnail_id&csrp_meta_value=1448&csrp_meta_compare=NOT%20IN"); ?></p> 161 162 <hr> 163 <u><h3>filter by date:</h3></u> 164 <h4>Return posts between dates</h4> 165 <li>csrp_date (int | required) - <b>! must be set to 1 </b>to intiate the date query</li> 166 <li>csrp_date_after (string | optional) - posts after this date. optional values:</li> 167 168 - 'yyyy-mm-dd',<br> 169 - '1 year ago',<br> 170 - '1 week ago',<br> 171 - '1 day ago',<br> 172 173 <li>csrp_date_after_type (string | optional) - get posts by publish date OR modified date default is publish date. optional values: 174 </li> 175 - 'date',<br> 176 - 'modified',<br> 177 178 <li>csrp_date_before (string | optional) - posts before this date. optional values: 179 </li> 180 - 'yyyy-mm-dd',<br> 181 - '1 year ago',<br> 182 - '1 week ago',<br> 183 - '1 day ago' ,<br> 184 185 <li>csrp_date_before_type (string | optional) - get posts by publish date OR modified date - default is publish date. optional values:</li> 186 - 'date',<br> 187 - 'modified',<br> 188 189 <p>Return posts modified in 2014 190 <?php echo custom_simple_rss_admin_href("&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=2014-01-01&csrp_date_after_type=modified&csrp_date_before=2015-01-01&csrp_date_before_type=modified"); ?></p> 191 <p>Return posts made over a year ago but modified in the past month 192 <?php echo custom_simple_rss_admin_href("&csrp_posts_per_page=5&csrp_date=1&csrp_date_after=1 month ago&csrp_date_after_type=modified&csrp_date_before=1 year ago&csrp_date_before_type=date"); ?></p> 193 194 <hr> 195 <u><h3>exclude post formats:</h3></u> 196 <p>enables the option to hide specific post formats.</p> 197 <li>csrp_exclude_post_format (string | optional) - default none, devide multiple post formats by comma</li> 198 Show all post formats EXCEPT link post format and quote post format 199 <?php echo custom_simple_rss_admin_href("&csrp_exclude_post_format=post-format-link,post-format-quote"); ?> 200 201 <hr> 202 <u><h3>show post meta in feed:</h3></u> 203 <p>enables the option to show all custom post fields for post. 204 quite handy if you need the rss as an xml data for external applications or export 205 disabled by default.</p> 206 <li>csrp_show_meta (string | optional) default 0</li> 207 <?php echo custom_simple_rss_admin_href("&csrp_show_meta=1"); ?> 208 209 <hr> 210 <u><h3>show post thumbnail in feed:</h3></u> 211 <li>csrp_show_thumbnail (string | optional) default 1 (show)</li> 212 <?php echo custom_simple_rss_admin_href("&csrp_show_thumbnail=1"); ?> 213 214 <hr> 215 <u><h3>show posts / custom post types by taxonomy:</h3></u> 310 216 enables the option to show posts for as specific taxonomy. 311 217 312 · csrp_tax_name (string | required) - the tax name/slug for example "actor" 313 314 · csrp_tax_term_id (string | required) - the term_id to filter by 315 316 · csrp_post_type (string | optional) - default post. for example post type "movie" 317 318 319 320 Show all posts from custom post type "movie"(post_type=movie) where taxonomy is "actor" and actors(terms) are 58 or 57 321 322 '?call_custom_simple_rss=1&csrp_tax_name=actor&csrp_tax_term_id=58,57&csrp_post_type=movie' 323 324 325 326 Show all post from post type "post" where taxonomy is "actor" and actors(trems) are 58 or 57 327 328 '?call_custom_simple_rss=1&csrp_tax_name=actor&csrp_tax_term_id=58,57' 329 330 331 332 333 334 <u>show custom tax for post:</u> 335 336 enables the option to show all custom tax for a specific post. 337 218 <li>csrp_tax_name (string | required) - the tax name/slug for example "actor"</li> 219 <li>csrp_tax_term_id (string | required) - the term_id to filter by</li> 220 <li>csrp_post_type (string | optional) - default post. for example post type "movie"</li> 221 222 Show all posts from custom post type "movie"(post_type=movie) where taxonomy is "actor" and actors(terms) are 58 or 57 223 <?php echo custom_simple_rss_admin_href("&csrp_tax_name=actor&csrp_tax_term_id=58,57&csrp_post_type=movie"); ?> 224 Show all post from post type "post" where taxonomy is "actor" and actors(trems) are 58 or 57 225 <?php echo custom_simple_rss_admin_href("&csrp_tax_name=actor&csrp_tax_term_id=58,57"); ?> 226 227 <hr> 228 <u><h3>show custom tax for post:</h3></u> 229 enables the option to show all custom tax for a specific post. 338 230 puts the data under dc:isPartOf 339 231 340 · csrp_show_post_terms (string | required) - the tax name - miltiple tax divided by comma 341 342 343 344 Show custom taxaonmy "post_tag" and custom taxaonmy "actor" associated to post 345 346 '?call_custom_simple_rss=1&csrp_show_post_terms=post_tag,actor' 347 348 349 350 351 352 </pre> 232 <li>csrp_show_post_terms (string | required) the tax name miltiple tax divided by comma</li> 233 Show custom taxaonmy "post_tag" and custom taxaonmy "actor" associated to post 234 <?php echo custom_simple_rss_admin_href("&csrp_show_post_terms=post_tag,actor"); ?> 235 236 -
custom-simple-rss/trunk/custom-simple-rss.php
r2470303 r2477869 5 5 * Plugin URI: 6 6 * Description: A plugin to create a Custom Simple RSS Feed according to chosen parameters 7 * Version: 2.1. 17 * Version: 2.1.2 8 8 * Author: Danny(Danikoo) Haggag 9 9 * Author URI: http://www.danikoo.com … … 26 26 27 27 function call_custom_simple_rss(){ 28 29 28 30 29 $custom_simple_rss_options = get_option('custom_simple_rss_options'); … … 90 89 91 90 if( isset($_GET["csrp_post_type"]) ){ 92 $csrp_post_type = sanitize_text_field($_GET["csrp_post_type"]); 91 $csrp_post_type = sanitize_text_field($_GET["csrp_post_type"]); 92 $csrp_post_type = explode(',', preg_replace('/\s/', '', $csrp_post_type)); 93 93 } 94 94 95 95 if( isset($_GET["csrp_post_status"]) ){ 96 $csrp_post_status = sanitize_text_field($_GET["csrp_post_status"]); 96 $csrp_post_status = sanitize_text_field($_GET["csrp_post_status"]); 97 $csrp_post_status = explode(',', preg_replace('/\s/', '', $csrp_post_status)); 97 98 } 98 99 … … 142 143 } 143 144 $options['csrp_show_post_terms'] = $csrp_show_post_terms; 145 146 147 if( isset($_GET["csrp_show_thumbnail"]) ){ 148 $csrp_show_thumbnail = intval($_GET["csrp_show_thumbnail"]); 149 } 150 $options['csrp_show_thumbnail'] = $csrp_show_thumbnail; 144 151 145 152 if( isset($_GET["csrp_thumbnail_size"]) ){ … … 379 386 //thmbnail 380 387 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), $options['csrp_thumbnail_size'],false ); 381 $thumb_url = $thumb[0]; 382 $thumb_width = $thumb[1]; 383 $thumb_height = $thumb[2]; 388 if($thumb){ 389 $thumb_url = $thumb[0]; 390 $thumb_width = $thumb[1]; 391 $thumb_height = $thumb[2]; 392 }else{ 393 $thumb_url = $thumb_width = $thumb_height = ""; 394 } 395 384 396 $thumb_type = get_post_mime_type(get_post_thumbnail_id($post_id)); 385 397 -
custom-simple-rss/trunk/readme.txt
r2470304 r2477869 5 5 Requires at least: 4.0.1 6 6 Tested up to: 5.6.1 7 Stable tag: 2.1. 17 Stable tag: 2.1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 12 12 13 13 == Description == 14 15 **NEW:** 16 1. added - option to choose **multiple post types**, example: ?call_custom_simple_rss=1&csrp_post_type=page,post 17 2. added - option to choose **multiple post status**, example: ?call_custom_simple_rss=1&csrp_post_status=publish,draft 18 3. added - better documentation (tutorial). 19 14 20 15 21 A plugin to create a your own Custom Simple RSS Feed … … 79 85 == Changelog == 80 86 87 **2.1.2** 88 89 2021-02-13 version 2.1.2 90 91 1. added - option to choose multiple post types, example: ?call_custom_simple_rss=1&csrp_post_type=page,post 92 2. added - option to choose multiple post status example: ?call_custom_simple_rss=1&csrp_post_status=publish,draft 93 94 81 95 **2.1.1** 82 96
Note: See TracChangeset
for help on using the changeset viewer.