3636
3737/**
3838 * Initialises text domain for l10n.
39- *
40- * @access public
41- * @return void
4239 */
4340function ald_acc_lang_init () {
4441 load_plugin_textdomain ( 'autoclose ' , false , dirname ( plugin_basename ( __FILE__ ) ) . '/languages/ ' );
@@ -163,8 +160,7 @@ function ald_acc() {
163160/**
164161 * Default options.
165162 *
166- * @access public
167- * @return void
163+ * @return array Default settings
168164 */
169165function acc_default_options () {
170166
@@ -188,15 +184,14 @@ function acc_default_options() {
188184 'pbtb_post_types ' => $ pbtb_post_types , // WordPress custom post types
189185 );
190186
191- return $ acc_settings ;
187+ return apply_filters ( ' acc_default_options ' , $ acc_settings ) ;
192188}
193189
194190
195191/**
196192 * Function to read options from the database.
197193 *
198- * @access public
199- * @return void
194+ * @return array Options for the database. Will add any missing options.
200195 */
201196function acc_read_options () {
202197 $ acc_settings_changed = false ;
@@ -216,17 +211,15 @@ function acc_read_options() {
216211 update_option ( 'ald_acc_settings ' , $ acc_settings );
217212 }
218213
219- return $ acc_settings ;
214+ return apply_filters ( ' acc_read_options ' , $ acc_settings ) ;
220215}
221216
222217
223218/**
224219 * Function to enable run or actions.
225220 *
226- * @access public
227- * @param int $hour
228- * @param int $min
229- * @return void
221+ * @param int $hour Hour
222+ * @param int $min Min
230223 */
231224function acc_enable_run ( $ hour , $ min ) {
232225 if ( ! wp_next_scheduled ( 'ald_acc_hook ' ) ) {
@@ -240,9 +233,6 @@ function acc_enable_run( $hour, $min ) {
240233
241234/**
242235 * Function to disable daily run or actions.
243- *
244- * @access public
245- * @return void
246236 */
247237function acc_disable_run () {
248238 if ( wp_next_scheduled ( 'ald_acc_hook ' ) ) {
@@ -254,10 +244,10 @@ function acc_disable_run() {
254244// Process the admin page if we're on the admin screen
255245if ( is_admin () || strstr ( $ _SERVER ['PHP_SELF ' ], 'wp-admin/ ' ) ) {
256246 require_once ( ALD_ACC_DIR . "/admin.inc.php " );
247+
257248 /**
258249 * Filter to add link to WordPress plugin action links.
259250 *
260- * @access public
261251 * @param array $links
262252 * @return array
263253 */
@@ -273,10 +263,8 @@ function acc_plugin_actions_links( $links ) {
273263 /**
274264 * Filter to add links to the plugin action row.
275265 *
276- * @access public
277266 * @param array $links
278267 * @param array $file
279- * @return void
280268 */
281269 function acc_plugin_actions ( $ links , $ file ) {
282270 static $ plugin ;
@@ -289,13 +277,7 @@ function acc_plugin_actions( $links, $file ) {
289277 }
290278 return $ links ;
291279 }
292-
293- global $ wp_version ;
294- if ( version_compare ( $ wp_version , '2.8alpha ' , '> ' ) ) {
295- add_filter ( 'plugin_row_meta ' , 'acc_plugin_actions ' , 10 , 2 ); // only 2.8 and higher
296- } else {
297- add_filter ( 'plugin_action_links ' , 'acc_plugin_actions ' , 10 , 2 );
298- }
280+ add_filter ( 'plugin_row_meta ' , 'acc_plugin_actions ' , 10 , 2 ); // only 2.8 and higher
299281
300282} // End admin.inc
301283
0 commit comments