'attachment', 'orderby' => 'menu_order', 'posts_per_page' => 100, 'post_parent' => $post->ID )); if ($attachments) { $content_l .= '

' . get_option('wpatt_option_localization') . '

'; } if ($somethingtoshow == 1) { $content .= $content_l; } return $content; } /* Enable Backend? */ dd_action( 'init', 'WPATT_FUNCTIONSLOAD'); function WPATT_FUNCTIONSLOAD () { $get_wpatt_disable_backend = get_option('wpatt_disable_backend'); if ($get_wpatt_disable_backend == '1') { include(plugin_dir_path(__FILE__) . 'backend.php'); } } /* Register Settings */ add_action('admin_init', 'wpatt_reg_settings'); function wpatt_reg_settings() { register_setting('wpatt_options_group', 'wpatt_option_showdate', 'intval'); register_setting('wpatt_options_group', 'wpatt_option_includeimages', 'intval'); register_setting('wpatt_options_group', 'wpatt_option_localization'); register_setting('wpatt_options_group', 'wpatt_disable_backend'); /* Preopulate 'Attachments' */ $wpatt_option_showdate_get = get_option('wpatt_option_showdate'); if (get_option('wpatt_option_localization') == '') { update_option('wpatt_option_localization', 'Attachments'); } } /* Here starts the code for the option panel */ add_action('admin_menu', 'wpatt_plugin_menu'); function wpatt_plugin_menu() { add_options_page('WP Attachments - Settings', 'WP Attachments', 'manage_options', 'wpatt-option-page', 'wpatt_plugin_options'); } function wpatt_plugin_options() { if (!current_user_can('manage_options')) { wp_die(__('You do not have sufficient permissions to access this page.')); } if (isset($_POST['Submit'])) { $wpatt_option_localization_get = $_POST["wpatt_option_localization_n"]; update_option('wpatt_option_localization', $wpatt_option_localization_get); if (isset($_POST['wpatt_option_showdate_n'])) { update_option('wpatt_option_showdate', '1'); } else { update_option('wpatt_option_showdate', '0'); } if (isset($_POST['wpatt_option_includeimages_n'])) { update_option('wpatt_option_includeimages', '1'); } else { update_option('wpatt_option_includeimages', '0'); } if (isset($_POST['wpatt_disable_backend_n'])) { update_option('wpatt_disable_backend', '0'); } else { update_option('wpatt_disable_backend', '1'); } } echo '
'; screen_icon(); echo '

WP Attachments

'; echo '

OPTIONS

'; echo '
'; echo '
'; settings_fields('wpatt_option_group'); echo ' '; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
Label for list header  Insert here the label you want to use for the title of the attachments list. Default "Attachments"
Include Images?  Check this if you want to include images (.jpg, .jpeg, .gif, .png) from being listed.
Enable Back-End?  Check this if you want to enable the integrated back-end functions.
Show date?  Check this if you want to show when the file has been uploaded.
'; echo '

'; echo '

HELP, SUPPORT & FEEDBACK

http://wordpress.org/plugins/wp-attachments/
This plugin is continuously developed by Marco Milesi focusing on simplicity, intuitiveness and cleanness. Keep updated :)
Thank You for using this plugin.
'; } ?>