From 80ada5400b9bcfcccc1ac741727dc6dfc04896e8 Mon Sep 17 00:00:00 2001 From: danix Date: Wed, 4 Jul 2018 18:03:21 +0200 Subject: initial commit --- include/options-register.php | 52 ++++++++++++++++++++++++ include/plugin-options.php | 94 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 include/options-register.php create mode 100644 include/plugin-options.php (limited to 'include') diff --git a/include/options-register.php b/include/options-register.php new file mode 100644 index 0000000..506a17b --- /dev/null +++ b/include/options-register.php @@ -0,0 +1,52 @@ + array( + 'href' => array(), + 'title' => array(), + 'class' => array(), + 'id' => array() + ) + ); + $valid_input['logged_in_links'] = ('' == $input['logged_in_links'] ? '' : wp_kses($input['logged_in_links'], $valid_data) ); + } elseif($reset) { + $default_options = dnxup_db_defaults(); + // Show Gravatar + $valid_input['show_gravatar'] = $default_options['show_gravatar']; + // Logged out Heading + $valid_input['logged_out_heading'] = $default_options['logged_out_heading']; + // Logged in Heading + $valid_input['logged_in_heading'] = $default_options['logged_in_heading']; + // Logged in Links + $valid_input['logged_in_links'] = $default_options['logged_in_links']; + } + return $valid_input; +} +?> \ No newline at end of file diff --git a/include/plugin-options.php b/include/plugin-options.php new file mode 100644 index 0000000..2635375 --- /dev/null +++ b/include/plugin-options.php @@ -0,0 +1,94 @@ + +

+ +

+ +

+ +

+ + /> + + + + + + +%username% shows username.', 'dnxup'); ?> + + +
+

+ One link per line. Note: Logout link will always show regardless. Tip: Add |true after a link to only show it to admin users or alternatively use a |user_capability and the link will only be shown to users with that capability. See http://codex.wordpress.org/Roles_and_Capabilities for more info on roles and Capabilities.
You can also type %USERNAME% and %USERID% which will be replaced by the user info.
Example:",'dnxup'); + echo '
<a href="'.get_bloginfo('wpurl').'/wp-admin/">'. __('Dashboard', 'dnxup') . '</a>
<a href="'.get_bloginfo('wpurl').'/wp-admin/profile.php">'. __('Profile', 'dnxup') .'</a>
'; ?> +

+
+ \ No newline at end of file -- cgit v1.2.3