WordPress add_filter to post_date

You need to add an additional filter on the frontend. Very basically it would look like this: Frontend (eg. single.php): echo apply_filters( ‘my_custom_persian_filter’, $post_date ); Backend (eg. functions.php) function persian_date_function( $date ) { $date = $converted_to_persian; // there you convert date to persian return $date; } add_filter( ‘my_custom_persian_filter’, ‘persian_date_function’ );

Can’t understand apply_filter logic

Thanks for your answers. According to comments above, I modified my code. Now it works. Is it correct way? <?php /* Plugin Name: Test plugin */ $arr = []; add_action( ‘init’, ‘set_var_data’ ); function set_var_data() { global $arr; $arr = [ ‘val’, ‘val2’, ‘val3’ ]; $arr = apply_filters( ‘my_hook’, $arr ); } print_r( $arr );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)