HEX
Server: Apache/2.4.41
System: Linux mainweb 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: nationalmedicaregrp (1119)
PHP: 8.3.7
Disabled: exec,passthru,shell_exec,system,popen,proc_open,pcntl_exec
Upload Files
File: /home/mjlclaims/public_html/wp-content/plugins/coblocks/src/blocks/click-to-tweet/index.php
<?php
/**
 * Server-side filter of click-to-tweet blocks.
 *
 * @package WordPress
 */

/**
 * Handles dynamic page permalink in the click to tweet block.
 *
 * @param string $block_content A single parsed block content.
 *
 * @return array The block content with the right post permalink for the page.
 */
function coblocks_click_to_tweet_post_permalink( $block_content ) {

	return str_replace( '[post_permalink]', rawurlencode( get_permalink() ), $block_content );

}
add_filter( 'render_block_coblocks/click-to-tweet', 'coblocks_click_to_tweet_post_permalink' );