snippet; echo '
'; $this->print_scopes_list( array( 'global' => __( 'Run snippet everywhere', 'code-snippets' ), 'admin' => __( 'Only run in administration area', 'code-snippets' ), 'front-end' => __( 'Only run on site front-end', 'code-snippets' ), 'single-use' => __( 'Only run once', 'code-snippets' ), ) ); echo '
'; } if ( ! $snippet->id || 'css' === $snippet->type ) { echo ''; $this->print_scopes_list( array( 'site-css' => __( 'Site front-end styles', 'code-snippets' ), 'admin-css' => __( 'Administration area styles', 'code-snippets' ), ) ); echo '
'; } if ( ! $snippet->id || 'js' === $snippet->type ) { echo ''; $this->print_scopes_list( array( 'site-footer-js' => __( 'Load JS at the end of the <body> section', 'code-snippets' ), 'site-head-js' => __( 'Load JS in the <head> section', 'code-snippets' ), ) ); echo '
'; } if ( ! $snippet->id || 'html' === $snippet->type ) { ?>print_scopes_list( array( 'content' => __( 'Only display when inserted into a post or page.', 'code-snippets' ), ) ); ?>
id || 'content' === $snippet->scope ) { /* translators: %s: snippet shortcode tag */ $text = $snippet->id ? __( 'You can use the %s shortcode to insert your content into a post or page.', 'code-snippets' ) : __( 'After saving, you will be able to use the %s shortcode to insert your content into a post or page.', 'code-snippets' ); $shortcode_atts = ( $snippet->id ? ' id=' . $snippet->id : '' ) . ( $snippet->network ? ' network=true' : '' ); if ( false !== stripos( $snippet->code, '' ) ) { $shortcode_atts .= ' php=true'; } printf( '' . esc_html( $text ) . '
', '[code_snippet' . esc_html( $shortcode_atts ) . ']'
);
if ( $snippet->id ) { ?>