Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // hacks and mods will go here
- /* WGA Login Redirect */
- function wga_login_redirect($redirect_to) {
- return home_url() . '/home';
- }
- add_filter("login_redirect", "wga_login_redirect");
- /* WGA Custom Buttons */
- function wgabutton_shortcode( $atts, $content = null ) {
- extract( shortcode_atts( array(
- 'url' => '',
- 'target' => '',
- 'color' => '',
- 'width' => '',
- ), $atts ) );
- if(esc_attr($target)) {
- $target = 'target="'.esc_attr($target).'"';
- }
- if(!is_user_logged_in()) {
- return '<div class="button-wrap '.esc_attr($width).'"><div class="'.esc_attr($color).' button ' . esc_attr($width). '"><a href="' . esc_attr($url) . '" ' . $target . '>' . $content . '</a></div></div>';
- }
- else {
- return '<div class="button-wrap '.esc_attr($width).'"><div class="'.esc_attr($color).' button ' . esc_attr($width). '"><a href="#" ' . $target . '>' . 'Thank You For Signing Up!' . '</a></div></div>';
- }
- }
- /* Add Shortcodes */
- add_shortcode('wgabutton', 'wgabutton_shortcode');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement