Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * $tag The WordPress action you want to hook onto. This is required.
- * $function_to_add Your function to hook onto the WordPress action. This is required.
- * $priority Determines the importance of your function; 10 is the default. This is optional.
- * Higher number equal lower priority
- * Lower number equals higher priority
- * $accepted_args Sets how many arguments can be passed on to your function. This is optional.
- */
- <?php add_action( $tag, $function_to_add, $priority, $accepted_args ); ?>
- /**
- * $option_group name of the settings group - can be anything you want. This is required.
- * $option_name name of the setting you want to save. This is required.
- * $sanitize_callback custom function that sanitizes the data. It is optional, but highly recommended.
- *>
- <?php register_setting( $option_group, $option_name, $sanitize_callback ); ?>
- /**
- * Example settings registration
- */
- function wp_jplayer_register_settings() {
- register_setting('wp_jplayer_songs', 'wp_jplayer_songs', 'wp_jplayer_songs_validate');
- register_setting('wp_jplayer_options', 'wp_jplayer_options');
- }
- add_action('admin_init', 'wp_jplayer_register_settings');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement