renderer = $renderer; } /** * Registers the shortcode. */ public function register() { add_shortcode( self::TAG, array( $this, 'render' ) ); } /** * Shortcode callback. * * @param array|string $atts Attributes. * @return string */ public function render( $atts ) { $atts = shortcode_atts( array( 'id' => 0 ), $atts, self::TAG ); return $this->renderer->render_saved( absint( $atts['id'] ) ); } }