Inpsyde\MultilingualPress\Module\Trasher\TrasherSettingRepository::get PHP Method

get() public method

Returns the trasher setting value for the post with the given ID, or the current post.
Since: 3.0.0
public get ( integer $post_id ) : boolean
$post_id integer Optional. Post ID. Defaults to 0.
return boolean The trasher setting value for the post with the given ID, or the current post.
    public function get($post_id = 0);

Usage Example

    /**
     * Renders the setting markup.
     *
     * @since   3.0.0
     * @wp-hook post_submitbox_misc_actions
     *
     * @param WP_Post $post Post object.
     *
     * @return void
     */
    public function render(WP_Post $post)
    {
        $id = 'mlp-trasher';
        ?>
		<div class="misc-pub-section misc-pub-mlp-trasher">
			<?php 
        echo \Inpsyde\MultilingualPress\nonce_field($this->nonce);
        ?>
			<label for="<?php 
        echo esc_attr($id);
        ?>
">
				<input type="checkbox" name="<?php 
        echo esc_attr(TrasherSettingRepository::META_KEY);
        ?>
"
					value="1" id="<?php 
        echo esc_attr($id);
        ?>
"
					<?php 
        checked($this->setting_repository->get($post->ID));
        ?>
>
				<?php 
        _e('Send all the translations to trash when this post is trashed.', 'multilingual-press');
        ?>
			</label>
		</div>
		<?php 
    }
All Usage Examples Of Inpsyde\MultilingualPress\Module\Trasher\TrasherSettingRepository::get
TrasherSettingRepository