PATH:
home
/
thebhoeo
/
public_html
/
wp-content
/
themes
/
woodmart
/
inc
/
modules
/
layouts
/
elementor
/
single-post
<?php /** * Excerpt map. * * @package woodmart */ namespace XTS\Modules\Layouts; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Direct access not allowed. } /** * Elementor widget that inserts an embeddable content into the page, from any given URL. */ class Post_Excerpt extends Widget_Base { /** * Get widget name. * * @return string Widget name. */ public function get_name() { return 'wd_single_post_excerpt'; } /** * Get widget content. * * @return string Widget title. */ public function get_title() { return esc_html__( 'Post excerpt', 'woodmart' ); } /** * Get widget icon. * * @return string Widget icon. */ public function get_icon() { return 'wd-icon-post-excerpt'; } /** * Get widget categories. * * @return array Widget categories. */ public function get_categories() { return array( 'wd-posts-elements' ); } /** * Show in panel. * * @return bool Whether to show the widget in the panel or not. */ public function show_in_panel() { return Main::is_layout_type( 'single_post' ) || Main::is_layout_type( 'single_portfolio' ); } /** * Register the widget controls. */ protected function register_controls() { /** * Style tab. */ /** * General settings. */ $this->start_controls_section( 'general_style_section', array( 'label' => esc_html__( 'General', 'woodmart' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'css_classes', array( 'type' => 'wd_css_class', 'default' => 'wd-single-post-excerpt', 'prefix_class' => '', ) ); $this->add_control( 'alignment', array( 'label' => esc_html__( 'Text alignment', 'woodmart' ), 'type' => 'wd_buttons', 'options' => array( 'left' => array( 'title' => esc_html__( 'Left', 'woodmart' ), 'image' => WOODMART_ASSETS_IMAGES . '/settings/align/left.jpg', ), 'center' => array( 'title' => esc_html__( 'Center', 'woodmart' ), 'image' => WOODMART_ASSETS_IMAGES . '/settings/align/center.jpg', ), 'right' => array( 'title' => esc_html__( 'Right', 'woodmart' ), 'image' => WOODMART_ASSETS_IMAGES . '/settings/align/right.jpg', ), ), 'prefix_class' => 'text-', 'default' => 'left', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'label' => esc_html__( 'Typography', 'woodmart' ), 'name' => 'typography', 'selector' => '{{WRAPPER}}', ) ); $this->add_control( 'text_color', array( 'label' => esc_html__( 'Color', 'woodmart' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}}' => 'color: {{VALUE}}', ), ) ); $this->end_controls_section(); } /** * Render the widget output on the frontend. */ protected function render() { Main::setup_preview(); $excerpt = get_post_field( 'post_excerpt', get_the_ID() ); if ( $excerpt ) { echo $excerpt; // phpcs:ignore. } Main::restore_preview(); } } Plugin::instance()->widgets_manager->register( new Post_Excerpt() );
[-] class-post-comments-button.php
[edit]
[-] class-post-meta-value.php
[edit]
[-] class-post-title.php
[edit]
[-] class-post-tags.php
[edit]
[-] class-author-bio.php
[edit]
[-] class-post-content.php
[edit]
[-] class-post-excerpt.php
[edit]
[-] class-post-author-meta.php
[edit]
[-] class-post-navigation.php
[edit]
[-] class-post-categories.php
[edit]
[-] class-post-comment-form.php
[edit]
[-] class-post-comments.php
[edit]
[+]
..
[-] class-post-date-meta.php
[edit]
[-] class-post-image.php
[edit]