get_dir(), apply_filters( 'suredonation_block_registration_args', [ 'render_callback' => [ $this, 'render' ] ] ) ); } /** * Get the called class directory path * * @return string * @since 0.0.1 */ public function get_dir() { if ( $this->directory ) { return $this->directory; } $reflector = new \ReflectionClass( $this ); $fn = (string) $reflector->getFileName(); return dirname( $fn ); } /** * Render the block * * @param array $attributes Block attributes. * @param string $content Block content. * * @return string * @since 0.0.1 */ public function render( $attributes, $content = '' ) { unset( $content ); // Unused parameter in base class. unset( $attributes ); // Unused parameter in base class. return ''; } /** * Get allowed HTML tags for form markup. * * The wp_kses_post() doesn't allow form elements, so we need a custom allowed tags array. * This is safe because the markup is generated internally by trusted code that already * escapes user input with esc_attr(), esc_html(), etc. * * @return array> Allowed HTML tags and attributes. * @since 0.0.1 */ protected static function get_allowed_form_html() { return Helper::get_allowed_form_html(); } }