Skip to content

Commit

Permalink
fix: make post_title fallback value for custom_content on non-pro…
Browse files Browse the repository at this point in the history
… license
  • Loading branch information
Soare-Robert-Daniel committed Jul 16, 2024
1 parent 7ccffbb commit 3e44d7b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion includes/admin/helpers/class-rop-post-format-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,17 @@ private function build_base_content( $post_id ) {

$post_content = apply_filters( 'rop_share_post_content', get_post_field( 'post_content', $post_id ), $post_id );
$content = '';
$post_format = $this->post_format['post_content'];

switch ( $this->post_format['post_content'] ) {
// Guards against PRO options being used when the license is expired.
if ( 'custom_content' === $post_format ) {
$global_settings = new Rop_Global_Settings();
if ( 0 <= $global_settings->license_type() ) {
$post_format = 'post_title';
}
}

switch ( $post_format ) {
case 'post_title':
$content = $post_title;
break;
Expand Down

0 comments on commit 3e44d7b

Please sign in to comment.