PK ! 4.) ) newsophy-functions.phpnu [ PK ! ~ Ȳ css/plugins-style.cssnu [ .ts-wid-image { width: 100%; } .ts-wid-image img { width: 100%; } .btn-red { background: #fd2b3a!important; color: #fff!important; border: #fd2b3a!important; } PK ! 皌 index.phpnu [ add_actions(); } /** * Add Actions * * @since 1.0.0 * * @access private */ private function add_actions() { add_action( 'elementor/elements/categories_registered', array( $this, 'add_easynewstheme_category' ) ); add_action( 'elementor/widgets/widgets_registered', [ $this, 'on_widgets_registered' ] ); } public function add_easynewstheme_category( ) { \Elementor\Plugin::instance()->elements_manager->add_category( 'easynewstheme', [ 'title' => __( 'easynews', 'easynews-framework' ), 'icon' => 'fa fa-plug', ] ); } /** * On Widgets Registered * * @since 1.0.0 * * @access public */ public function on_widgets_registered() { $this->includes(); $this->register_widget(); } /** * Includes * * @since 1.0.0 * * @access private */ private function includes() { require TS_PLUGIN_PATH . 'easynews-elementor/widgets/easynews-blog.php'; require TS_PLUGIN_PATH . 'easynews-elementor/widgets/easynews-products.php'; } /** * Register Widget * * @since 1.0.0 * * @access private */ private function register_widget() { \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new easynews_blog() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new easynews_products() ); } } new easynews_Register_Elementor(); PK ! g3N< < 0 newsophy-elementor/widgets/framek-products-1.phpnu [ 'name', 'order' => 'ASC' ); $categories=get_categories($args); $cate_array = array(); $arrayCateAll = array( 'all' => 'All categories ' ); if ($categories) { foreach ( $categories as $cate ) { $cate_array[$cate->cat_name] = $cate->slug; } } else { $cate_array["No content Category found"] = 0; } //SECTION CONTENT $this->start_controls_section( 'section_content', [ 'label' => __( 'Content', 'easynews-elements' ), ] ); $this->add_control( 'category', [ 'label' => __( 'Category', 'easynews-elements' ), 'type' => Controls_Manager::SELECT, 'default' => 'all', 'options' => array_merge($arrayCateAll,$cate_array), ] ); $this->add_control( 'total_count', [ 'label' => __( 'Total Post', 'easynews-elements' ), 'type' => Controls_Manager::NUMBER, 'default' => 3, ] ); $this->add_control( 'columns', [ 'label' => __('Columns', 'easynews-elements'), 'type' => Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => __('1', 'easynews-elements'), '2' => __('2', 'easynews-elements'), '3' => __('3', 'easynews-elements'), '4' => __('4', 'easynews-elements'), ] ] ); $this->add_control( 'order_by', [ 'label' => __('Order By', 'easynews-elements'), 'type' => Controls_Manager::SELECT, 'default' => 'desc', 'options' => [ 'asc' => __('ASC', 'easynews-elements'), 'desc' => __('DESC', 'easynews-elements'), ] ] ); $this->add_control( 'show_title', [ 'label' => __( 'Show Title', 'easynews-elements' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'easynews-elements' ), 'label_off' => __( 'Hide', 'easynews-elements' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->end_controls_section(); //END SECTION CONTENT } protected function render() { $settings = $this->get_settings_for_display(); $category = $settings['category']; $total_count = $settings['total_count']; $order = $settings['order_by']; $args=[ 'post_type' => 'product', 'posts_per_page' => $total_count, 'post_status' => 'publish', 'order' => $order, ]; $columns = $settings['columns']; switch ($columns) { case '1': $columns = 'one-fr'; break; case '2': $columns = 'two-fr'; break; case '3': $columns = 'three-fr'; break; case '4': $columns = 'four-fr'; break; } $blog = new \WP_Query($args); ?>
PK ! 2 widgets/widget-banner.phpnu [ __('Display image with link.', 'newsophy-core') ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'widget_banner' ); parent::__construct( 'widget_banner', __('(Newsophy) Banner with Link', 'newsophy-core'), $widget_ops, $control_ops ); add_action('admin_enqueue_scripts', array($this, 'admin_setup')); } /** * Enqueue all the javascript. */ public function admin_setup() { global $pagenow; if($pagenow !== 'widgets.php' && $pagenow !== 'customize.php') return; wp_enqueue_media(); wp_enqueue_script('image-select', TS_PLUGIN_URL.'js/image-select.js', array(), 1.0); wp_register_style( 'namespace', TS_PLUGIN_URL.'css/plugins-style.css' ); wp_enqueue_style( 'namespace' ); } // Widget Output function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $image_tmp = wp_get_attachment_image_src($instance['image_id'], 'newsophy-big-thumb'); $image_url = $image_tmp[0]; $target = $instance['banner_target']?? null;; if ($target == 'true') { $trg = '_blank'; } else { $trg = '_self'; } echo $target; // ------ echo $before_widget; if ( $title !='' ) echo ''.$before_title . $title . $after_title; ?> '', 'banner_link' => '', 'banner_target' => 'true', 'title' => '', 'image_id' => ''); $instance = wp_parse_args((array) $instance, $defaults); $image_tmp = wp_get_attachment_image_src($instance['image_id'], 'medium'); $image_url = $image_tmp[0]; ?>
PK ! VĨ widgets/widget-category.phpnu [ __('Display category', 'newsophy-core') ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'category' ); parent::__construct( 'category', __('(Newsophy) Category', 'newsophy-core'), $widget_ops, $control_ops ); add_action('admin_enqueue_scripts', array($this, 'admin_setup')); } /** * Enqueue all the javascript. */ public function admin_setup() { global $pagenow; if($pagenow !== 'widgets.php' && $pagenow !== 'customize.php') return; wp_enqueue_media(); wp_enqueue_script('image-select', TS_PLUGIN_URL.'js/image-select.js', array(), 1.0); wp_register_style( 'namespace', TS_PLUGIN_URL.'css/plugins-style.css' ); wp_enqueue_style( 'namespace' ); } // Widget Output function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $category = $instance['category']; $cat_tag = ( ! empty( $instance['cattag'] ) ) ? $instance['cattag'] : ''; // ------ echo '
PK ! s^ widgets/widget-about.phpnu [ __('Display informations about author', 'newsophy-core') ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'aboutme' ); parent::__construct( 'aboutme', __('(Newsophy) About Me', 'newsophy-core'), $widget_ops, $control_ops ); add_action('admin_enqueue_scripts', array($this, 'admin_setup')); } /** * Enqueue all the javascript. */ public function admin_setup() { global $pagenow; if($pagenow !== 'widgets.php' && $pagenow !== 'customize.php') return; wp_enqueue_media(); wp_enqueue_script('about-me-widget', TS_PLUGIN_URL.'js/image-select.js', array(), 1.0); wp_register_style( 'namespace', TS_PLUGIN_URL.'css/plugins-style.css' ); wp_enqueue_style( 'namespace' ); } // Widget Output function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $image_tmp = wp_get_attachment_image_src($instance['image_id'], 'medium'); $image_url = $image_tmp[0]; // ------ echo ''.$before_widget; if ( $title !='' ) echo ''.$before_title . $title . $after_title; ?> '', 'image' => '', 'header' => '', 'image_id' => '', 'content' => '', 'signature' => '', 'sign_id' => ''); $instance = wp_parse_args((array) $instance, $defaults); $image_tmp = wp_get_attachment_image_src($instance['image_id'], 'medium'); $image_url = $image_tmp[0]; $sign_tmp = wp_get_attachment_image_src($instance['sign_id'], 'medium'); $sign_url = $sign_tmp[0]; ?>
socials as $key => $social) { ?>
PK ! LLjc c img/no-image.jpgnu [ Adobe d@ <