文件操作 - ma-blockquote.php
返回文件管理
返回主菜单
删除本文件
文件: /root/Desktop/OLD/plugin-wordpress/master-addons/addons/ma-blockquote/ma-blockquote.php
编辑文件内容
<?php namespace Elementor; // Elementor Classes use \Elementor\Widget_Base; use \Elementor\Utils; use \Elementor\Icons_Manager; use \Elementor\Controls_Manager; use \Elementor\Repeater; use \Elementor\Group_Control_Border; use \Elementor\Group_Control_Typography; use \Elementor\Scheme_Typography; use \Elementor\Group_Control_Image_Size; use \Elementor\Group_Control_Background; use \Elementor\Group_Control_Box_Shadow; use \Elementor\Group_Control_Css_Filter; use \Elementor\Scheme_Color; class Master_Addons_Blockquote extends Widget_Base{ public function get_name(){ return "jltma-blockquote"; } public function get_title(){ return esc_html__( 'MA Blockquote', MELA_TD ); } public function get_icon() { return 'ma-el-icon eicon-blockquote'; } public function get_categories() { return [ 'master-addons' ]; } public function get_keywords() { return ['blockquote', 'quotation', 'author said']; } protected function _register_controls() { //Quote Blockquote $this->start_controls_section( 'jltma_blockquote_display', [ 'label' => esc_html__( 'Blockquote', MELA_TD ), ] ); $this->add_control( 'jltma_blockquote_text', [ 'label' => esc_html__( 'Quote Text', MELA_TD ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'default' => esc_html__( 'Architecture should speak of its time and place, but yearn for timelessness', MELA_TD ), ] ); $this->add_control( 'jltma_blockquote_author', [ 'label' => esc_html__( 'Quote Author', MELA_TD ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => esc_html__( 'Scott Adams', MELA_TD ), ] ); // $this->add_responsive_control('jltma_blockquote_margin', // [ // 'label' => esc_html__('Margin', MELA_TD), // 'type' => Controls_Manager::DIMENSIONS, // 'size_units' => ['px', 'em', '%'], // 'selectors' => [ // '{{WRAPPER}} .btm-brder' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' // ] // ] // ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); ?> <blockquote class="wp-block-quote jltma-blockquote"> <p class="jltma-text"> <?php echo esc_html( $settings['jltma_blockquote_text']);?> </p> <cite> <?php echo esc_html( $settings['jltma_blockquote_author']);?> </cite> </blockquote> <?php } } Plugin::instance()->widgets_manager->register_widget_type( new Master_Addons_Blockquote() );
修改文件时间
将文件时间修改为当前时间的前一年
删除文件