You appear to be a bot. Output may be restricted
Description
Implement [bw_wpadmin] shortcode to display a link to WordPress adminIf domain is not set then we default to the admin URL. If it is then we need to set the scheme.
Usage
$Return = bw_wpadmin( $atts, $content, $tags );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not expected
- $tags
- ( string ) optional – shortcode name
Returns
Return a link to the site's wp-adminSource
File name: oik/shortcodes/oik-domain.phpLines:
1 to 15 of 15
function bw_wpadmin( $atts=null, $content=null, $tags=null ) { $site = bw_get_option( "domain" ); e( __( "Site:", "oik" ) . " "); if ( $site ) { $site = trim_scheme( $site ); $site_url = set_url_scheme( "http://" . $site . "/wp-admin" ); /* translators: %s: website name */ BW_::alink( null, $site_url, $site, sprintf( __( 'Website: %1$s', "oik" ), $site ) ); } else { $site_url = get_option( "siteurl" ); $site_url = trim_scheme( $site_url ); BW_::alink( null, get_admin_url(), $site_url ); } return( bw_ret() ); }View on GitHub View on Trac