Changeset 2426919
- Timestamp:
- 11/26/2020 09:40:27 PM (5 years ago)
- Location:
- aprils-call-posts
- Files:
-
- 6 added
- 4 edited
-
_originals (added)
-
_originals/banner-772x250.psd (added)
-
_originals/icon-128x128.psd (added)
-
assets (added)
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.png (added)
-
trunk/ahs_callposts.php (modified) (1 diff)
-
trunk/ahs_callposts_admin.php (modified) (11 diffs)
-
trunk/ahscpstyle.css (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
aprils-call-posts/trunk/ahs_callposts.php
r1998295 r2426919 4 4 Plugin URI: http://springthistle.com/wordpress/plugin_callposts 5 5 Description: Via shortcode, lets you call in a list of posts that are filtered, displayed and ordered based on criteria you provide. <a href="options-general.php?page=ahs_callposts_admin.php">Edit Settings</a>. 6 Version: 2. 0.146 Version: 2.1 7 7 Author: Aaron Hodge Silver 8 8 Author URI: http://springthistle.com/ 9 9 License: GPL2 10 10 11 Copyright 2011 Aaron Hodge Silver (email : a hs@springthistle.com)11 Copyright 2011 Aaron Hodge Silver (email : aaron@springthistle.com) 12 12 13 13 This program is free software; you can redistribute it and/or modify -
aprils-call-posts/trunk/ahs_callposts_admin.php
r1957759 r2426919 7 7 array("name" => "Title Style", 8 8 "id" => "ahscp_titletype", 9 'type' => 'text', 9 10 'size'=>50, 10 11 'std'=>'h3', … … 19 20 array("name" => "Date Format", 20 21 "id" => "ahscp_dateformat", 22 'type' => 'text', 23 'std'=>'', 21 24 'size'=>100, 22 25 'help'=>'If you enter a date format here, it will be used to insert the post date for all posts on the site. You can override this default setting in any individual use of the shortcode by including the option <code>dateformat</code> and setting it to a different format or to empty.<br />A nice default is <code>F j</code>. See PHP.net\'s <a href="http://php.net/manual/en/function.date.php" target="_blank">Date Formatting Instructions</a> for more.'), … … 30 33 array("name" => "Styling", 31 34 "id" => "ahscp_css", 35 'std'=>'', 32 36 'type'=>'textarea', 33 37 'help'=>'When you first install this plugin, this box will have the default css that I put in, mostly to style the 2-column and sidebox options. You can edit this css easily here.'), … … 35 39 array("name" => "Custom Field", 36 40 "id" => "ahscp_customfield", 41 'type' => 'text', 42 'std'=>'', 37 43 'size'=>150, 38 44 'help'=>'The shortcode automatically orders posts by most-recent-first. If you\'d like them to be ordered by a custom field, enter the name of the custom field here. You can override this default setting in any individual use of the shortcode by including the option <code>custom_field</code>. If you set a custom_field value here, but want it to NOT impact a particular shortcode instances, set its value to <code>false</code>.'), … … 99 105 100 106 // add hidden field to store last-used tab 101 $ahscp_options[] = array('id'=>'ahscp_activetab', 'type'=>'hidden','divclass'=>'hidden','std'=>2);102 103 if ( $_GET['page'] == basename(__FILE__) ) {104 if ( 'save' == $_REQUEST['action'] ) {107 $ahscp_options[] = array('id'=>'ahscp_activetab', 'name'=>'activetab', 'type'=>'hidden','divclass'=>'hidden','std'=>2); 108 109 if ( isset($_GET['page']) && $_GET['page'] == basename(__FILE__) ) { 110 if ( isset($_REQUEST['action']) && 'save' == $_REQUEST['action'] ) { 105 111 foreach ($ahscp_options as $value) { 106 112 update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } … … 109 115 header("Location: options-general.php?page=".basename(__FILE__)."&saved=true"); 110 116 die; 111 } else if ( 'reset' == $_REQUEST['action'] ) {117 } else if ( isset($_REQUEST['action']) && 'reset' == $_REQUEST['action'] ) { 112 118 foreach ($ahscp_options as $value) delete_option( $value['id'] ); 113 119 header("Location: options-general.php?page=".basename(__FILE__)."&reset=true"); … … 115 121 } 116 122 } 117 add_submenu_page('options-general.php', 'April\'s Call Posts', 'April\'s Call Posts', 8, basename(__FILE__), 'ahscp_adminpage');123 add_submenu_page('options-general.php', 'April\'s Call Posts', 'April\'s Call Posts', 'edit_theme_options', basename(__FILE__), 'ahscp_adminpage'); 118 124 } 119 125 120 126 function ahscp_adminpage() { 121 127 global $ahscp_options; 122 if ( $_REQUEST['saved'] ) $msg = '<div class="updated" style="width: 785px;"><p>Call Posts settings saved.</p></div>';123 if ( $_REQUEST['reset'] ) $msg = '<div class="updated" style="width: 785px;"><p>Call Posts ssettings reset.</p></div>';128 if ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) $msg = '<div class="updated" style="width: 785px;"><p>Call Posts settings saved.</p></div>'; 129 if ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) $msg = '<div class="updated" style="width: 785px;"><p>Call Posts settings reset.</p></div>'; 124 130 ?> 125 131 <div class="wrap ahscp" id="backtotop" style="width: 800px;"> … … 148 154 $tabs[$numtabs] = $value['name']; 149 155 } 156 if (!isset($cards[$numtabs])) $cards[$numtabs] = ''; 150 157 $cards[$numtabs] .= '<h'.$matches[1].'>'.$value['name'].'</h'.$matches[1].'>'; 151 158 if (!empty($value['help'])) $cards[$numtabs] .= $value['help']; … … 165 172 $cards[$numtabs] .= '<option value="'.$optid.'" '; 166 173 if (get_option($value['id']) == $optid) $cards[$numtabs] .= ' selected="selected"'; 167 elseif ( $option == $value['std']) $cards[$numtabs] .= ' selected="selected"';174 elseif (isset($value['std']) && $option == $value['std']) $cards[$numtabs] .= ' selected="selected"'; 168 175 $cards[$numtabs] .= '>'.$option.'</option>'; 169 176 } … … 218 225 </div><!--/ tabs --> 219 226 220 < p class="submit">221 <input name="save" type="submit" value="Save changes on all tabs" />227 <div style="float:right;"> 228 <input name="save" type="submit" class="button button-primary" value="Save changes on all tabs" /> 222 229 <input type="hidden" name="action" value="save" /> 223 </ p>230 </div> 224 231 </form> 225 <form method="post"> 226 <p class="submit" style="float:right;"> 227 <input name="reset" type="submit" value="<?php _e('Delete all Data and Reset to Default Settings'); ?>" /> 228 <input type="hidden" name="action" value="reset" /> 229 </p> 232 <form method="post" style="float:left;"> 233 <input name="reset" type="submit" class="button" value="<?php _e('Delete all Data and Reset to Default Settings'); ?>" /> 234 <input type="hidden" name="action" value="reset" /> 230 235 </form> 231 236 … … 234 239 $('#tabs div.card').hide(); 235 240 <?php 236 if ( $_REQUEST['saved']) {241 if (isset($_REQUEST['saved']) && $_REQUEST['saved']) { 237 242 $tmp = get_option('ahscp_activetab'); 238 243 } -
aprils-call-posts/trunk/ahscpstyle.css
r1264200 r2426919 33 33 padding: 7px 10px; 34 34 color: #666; 35 font-family: Georgia;36 35 font-size: 16px; 37 36 } … … 59 58 font-size:20px; 60 59 margin-top: 0; 61 color:# A66540;60 color:#a6866b; 62 61 font-weight:normal; 63 62 clear: both; … … 66 65 margin-bottom:5px; 67 66 font-size:14px; 68 color:# A66540;67 color:#a6866b; 69 68 clear: both; 70 69 border-top: 2px solid #ddd; -
aprils-call-posts/trunk/readme.txt
r1957759 r2426919 2 2 Contributors: springthistle 3 3 Tags: posts, shortcode 4 Requires at least: 2.9.15 Tested up to: 4.9.x6 Stable tag: 2. 0.144 Requires at least: 5.0 5 Tested up to: 5.6.x 6 Stable tag: 2.1 7 7 8 8 Via shortcode, lets you call in a list of posts that are filtered, ordered, and displayed based on criteria you provide. … … 40 40 41 41 == Changelog == 42 43 = 2.1 = 44 * Cleaned up code, updated to be compatible with latest PHP and WordPress 45 * Updated compatibility version. 42 46 43 47 = 2.0.14 =
Note: See TracChangeset
for help on using the changeset viewer.