$post, 'meta' => $meta ); flrt_include_admin_view('filters-set', $args ); } public static function settingsMetabox( $post, $meta ){ $args = array( 'post' => $post, 'meta' => $meta ); flrt_include_admin_view('filters-set-settings', $args ); } public static function locationMetabox( $post, $meta ){ $args = array( 'post' => $post, 'meta' => $meta ); flrt_include_admin_view('filters-set-location', $args ); } public static function adviceMetabox( $post, $meta ){ $args = array( 'post' => $post, 'meta' => $meta ); flrt_include_admin_view('filters-set-advices', $args ); } public static function commonSideMetaBox( $post, $args = array() ) { global $action; $post_id = (int) $post->ID; $post_type = $post->post_type; $post_type_object = get_post_type_object( $post_type ); $can_publish = current_user_can( $post_type_object->cap->publish_posts ); $filterSet = \FilterEverything\Filter\Container::instance()->getFilterSetService(); $under_limit_filter_set = $filterSet->under_limit_filter_set($post_id); ?>
post_status ) { case 'private': esc_html_e( 'Privately Published' ); break; case 'publish': esc_html_e( 'Published' ); break; case 'future': esc_html_e( 'Scheduled' ); break; case 'pending': esc_html_e( 'Pending Review' ); break; case 'draft': case 'auto-draft': esc_html_e( 'Draft' ); break; } ?>
post_status ) { // Scheduled for publishing at a future date. /* translators: Post date information. %s: Date on which the post is currently scheduled to be published. */ $stamp = esc_html__( 'Scheduled for: %s' ); } elseif ( 'publish' === $post->post_status || 'private' === $post->post_status ) { // Already published. /* translators: Post date information. %s: Date on which the post was published. */ $stamp = esc_html__( 'Published on: %s' ); } elseif ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { // Draft, 1 or more saves, no date specified. $stamp = wp_kses( __( 'Publish immediately' ), array( 'b' => array() ) ); } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // Draft, 1 or more saves, future date specified. /* translators: Post date information. %s: Date on which the post is to be published. */ $stamp = esc_html__( 'Schedule for: %s' ); } else { // Draft, 1 or more saves, date specified. /* translators: Post date information. %s: Date on which the post is to be published. */ $stamp = esc_html__( 'Publish on: %s' ); } $date = sprintf( $date_string, date_i18n( $date_format, strtotime( $post->post_date ) ), date_i18n( $time_format, strtotime( $post->post_date ) ) ); } else { // Draft (no saves, and thus no date specified). $stamp = wp_kses( __( 'Publish immediately' ), array( 'b' => array() ) ); $date = sprintf( $date_string, date_i18n( $date_format, strtotime( current_time( 'mysql' ) ) ), date_i18n( $time_format, strtotime( current_time( 'mysql' ) ) ) ); } if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
' . number_format_i18n( $args['args']['revisions_count'] ) . '' ), array( 'b' => array() ) ); ?>
' . $date . '' ); ?>
post_status && get_post_meta( $post_id, '_customize_changeset_uuid', true ) ) : ?>

unpublished customization changes. You can edit, but there’s no need to publish now. It will be published automatically with those changes.' ), esc_url( add_query_arg( 'changeset_uuid', rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), admin_url( 'customize.php' ) ) ) ), array('a' => array( 'href' => true ) ) ); ?>

post_type === FLRT_FILTERS_SET_POST_TYPE); $can_duplicate = current_user_can('delete_post', $post->ID); $is_pro_version = defined('FLRT_FILTERS_PRO') && FLRT_FILTERS_PRO; if ($is_filter_set_post && $can_duplicate) : $label = esc_html__('Duplicate Filter Set', 'filter-everything'); if ($is_pro_version) : $query_args = ['action' => 'flrt_duplicate_filter_set', 'post' => $post->ID]; $base_url = add_query_arg($query_args, admin_url('admin.php')); $url = wp_nonce_url($base_url, 'flrt_duplicate_filter_set'); ?> + +
> post_status, array( 'publish', 'future', 'private' ), true ) || 0 === $post_id ) { if ( $can_publish ) : if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 'publish' ) ); ?>