PluginProbe
WP Attachments / 3.3
WP Attachments v3.3
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.3, at settings.php

120 lines 4.7 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 if (isset($_POST['wpatt_option_targetblank_n'])) {
34 update_option('wpatt_option_targetblank', '1');
35 } else {
36 update_option('wpatt_option_targetblank', '0');
37 }
38
39 }
40
41
42
43 echo '<div class="wrap">';
44
45 screen_icon();
46
47 echo '<div style="float:right;">
48 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
49 <input type="hidden" name="cmd" value="_s-xclick">
50 <input type="hidden" name="hosted_button_id" value="F2JK36SCXKTE2">
51 <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.">
52 <img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
53 </form>
54 </div>';
55
56 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>';
57
58 echo '<h3>';
59 _e('Options','wp-attachments');
60 echo '</h3>';
61
62 echo '<div id="welcome-panel" class="welcome-panel">';
63
64 echo '<form method="post" name="options" target="_self">';
65
66 settings_fields('wpatt_option_group');
67
68 echo '
69
70 <table class="form-table">
71
72
73
74 <tr valign="top">
75
76 <th scope="row">' . __('List Title','wp-attachments') . '</th>
77
78 <td><input type="text" name="wpatt_option_localization_n" value="';
79
80 echo get_option('wpatt_option_localization');
81
82 echo '" />&nbsp;' . __('Insert here the title you want for the attachments list','wp-attachments') . '</td></tr>';
83
84 echo '<tr><th scope="row">' . __('Include images','wp-attachments') . '</th>
85 <td><input type="checkbox" name="wpatt_option_includeimages_n" ';
86 $wpatt_option_includeimages_get = get_option('wpatt_option_includeimages');
87 if ($wpatt_option_includeimages_get == '1') {
88 echo 'checked=\'checked\'';
89 }
90 echo '/>&nbsp;' . __('Check this option if you want to include images (.jpg, .jpeg, .gif, .png) in the attachments list','wp-attachments') . '</td>';
91 echo '</tr>';
92
93 echo '<tr><th scope="row">' . __('Show date','wp-attachments') . '</th>
94 <td><input type="checkbox" name="wpatt_option_showdate_n" ';
95 $wpatt_option_showdate_get = get_option('wpatt_option_showdate');
96 if ($wpatt_option_showdate_get == '1') {
97 echo 'checked=\'checked\'';
98 }
99 echo '/>&nbsp;' . __('Check this if you want to show the date of file upload','wp-attachments') . '</td>';
100 echo '</tr>';
101
102 echo '<tr><th scope="row">' . __('Open in new tab','wp-attachments') . '</th>
103 <td><input type="checkbox" name="wpatt_option_targetblank_n" ';
104 $wpatt_option_targetblank_get = get_option('wpatt_option_targetblank');
105 if ($wpatt_option_targetblank_get == '1') {
106 echo 'checked=\'checked\'';
107 }
108 echo '/>&nbsp;' . __('Check this option if you want to add target="_blank" to every file listed in order to open it in a new tab','wp-attachments') . '</td>';
109 echo '</tr></table>';
110
111
112
113 echo '</table><p class="submit"><input type="submit" class="button-primary" name="Submit" value="Update" /></p>';
114
115 echo '</form></div>
116 <h3>' . __('Help, Support & Feedback','wp-attachments') . '</h3>
117 <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>';
118
119 }
120 ?>