PluginProbe
WP Attachments / 3.2
WP Attachments v3.2
6.0.2 6.0.3 trunk 2.0 3 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.4 3.5 3.5.1 3.5.2 3.5.3 3.5.4 All 52 releases
wp-attachments / settings.php

settings.php in WP Attachments 3.2, at settings.php

105 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function wpatt_plugin_options()
4 {
5
6 if (!current_user_can('manage_options'))
7 {
8
9 wp_die(__('You do not have sufficient permissions to access this page.'));
10
11 }
12
13
14
15 if (isset($_POST['Submit'])) {
16
17 $wpatt_option_localization_get = $_POST["wpatt_option_localization_n"];
18
19 update_option('wpatt_option_localization', $wpatt_option_localization_get);
20
21 if (isset($_POST['wpatt_option_showdate_n'])) {
22 update_option('wpatt_option_showdate', '1');
23 } else {
24 update_option('wpatt_option_showdate', '0');
25 }
26
27 if (isset($_POST['wpatt_option_includeimages_n'])) {
28 update_option('wpatt_option_includeimages', '1');
29 } else {
30 update_option('wpatt_option_includeimages', '0');
31 }
32
33 }
34
35
36
37 echo '<div class="wrap">';
38
39 screen_icon();
40
41 echo '<div style="float:right;">
42 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
43 <input type="hidden" name="cmd" value="_s-xclick">
44 <input type="hidden" name="hosted_button_id" value="F2JK36SCXKTE2">
45 <input type="image" src="https://www.paypalobjects.com/it_IT/IT/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - Il metodo rapido, affidabile e innovativo per pagare e farsi pagare.">
46 <img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
47 </form>
48 </div>';
49
50 echo '<h2>WP Attachments ' . get_option('wpa_version_number') . ' <a href="http://wordpress.org/support/view/plugin-reviews/wp-attachments" target="_blank" class="add-new-h2"><em>Rate this plugin!</em></a><a href="http://wordpress.org/plugins/wp-attachments/changelog/" target="_blank" class="add-new-h2"><em>Changelog</em></a></h2>';
51
52 echo '<h3>';
53 _e('Options','wp-attachments');
54 echo '</h3>';
55
56 echo '<div id="welcome-panel" class="welcome-panel">';
57
58 echo '<form method="post" name="options" target="_self">';
59
60 settings_fields('wpatt_option_group');
61
62 echo '
63
64 <table class="form-table">
65
66
67
68 <tr valign="top">
69
70 <th scope="row">' . __('List Title','wp-attachments') . '</th>
71
72 <td><input type="text" name="wpatt_option_localization_n" value="';
73
74 echo get_option('wpatt_option_localization');
75
76 echo '" />&nbsp;' . __('Insert here the title you want for the attachments list','wp-attachments') . '</td></tr>';
77
78 echo '<tr><th scope="row">' . __('Include images','wp-attachments') . '</th>
79 <td><input type="checkbox" name="wpatt_option_includeimages_n" ';
80 $wpatt_option_includeimages_get = get_option('wpatt_option_includeimages');
81 if ($wpatt_option_includeimages_get == '1') {
82 echo 'checked=\'checked\'';
83 }
84 echo '/>&nbsp;' . __('Check this option if you want to include images (.jpg, .jpeg, .gif, .png) in the attachments list','wp-attachments') . '</td>';
85 echo '</tr>';
86
87 echo '<tr><th scope="row">' . __('Show date','wp-attachments') . '</th>
88 <td><input type="checkbox" name="wpatt_option_showdate_n" ';
89 $wpatt_option_showdate_get = get_option('wpatt_option_showdate');
90 if ($wpatt_option_showdate_get == '1') {
91 echo 'checked=\'checked\'';
92 }
93 echo '/>&nbsp;' . __('Check this if you want to show the date of file upload','wp-attachments') . '</td>';
94 echo '</tr></table>';
95
96
97
98 echo '</table><p class="submit"><input type="submit" class="button-primary" name="Submit" value="Update" /></p>';
99
100 echo '</form></div>
101 <h3>' . __('Help, Support & Feedback','wp-attachments') . '</h3>
102 <a href="http://wordpress.org/plugins/wp-attachments/" title "WP Attachments Wordpress Plugin>http://wordpress.org/plugins/wp-attachments/</a><br/>' . __('This plugin is mantained by <a href=\"http://marcomilesi.ml\" title=\"Marco Milesi\">Marco Milesi</a> and is based on simplicity and intuitiveness. Keep it updated :)<br/>Thank You for using WP Attachments!','wp-attachments') . '</div>';
103
104 }
105 ?>