┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
prd-web-01.centraldc.gr
LOCATION:
/var/www/html/afoot-metro16/wp-content/plugins/ultimate-post/addons/divi
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: divi.php
<?php add_action( 'et_builder_ready', 'ultp_postx_template_divi_modules' ); function ultp_postx_template_divi_modules() { if ( ! class_exists( 'ET_Builder_Module' ) ) { return; } class PostX_Template_Module extends ET_Builder_Module { public $slug = 'ultp_postx_template'; public $vb_support = 'partial'; function init() { $this->name = esc_html__( 'PostX Template', 'ultimate-post' ); $this->icon_path = plugin_dir_path( __FILE__ ) . 'icon.svg'; } function get_fields() { return array( 'templates' => array( 'label' => esc_html__( 'Select Your Template', 'ultimate-post' ), 'type' => 'select', 'options' => ultimate_post()->get_all_lists( 'ultp_templates', 'none' ), 'default' => 'none', 'description' => esc_html__( 'Pick a Template from your saved ones. Or create a template from: <strong><i>Dashboard > PostX > Saved Templates</i></strong>', 'ultimate-post' ), ), ); } function render( $attrs, $render_slug, $content = null ) { $templates = $this->props['templates']; $output = ''; $content = ''; $body_class = get_body_class(); if ( $templates && $templates != 'none' ) { $args = array( 'p' => $templates, 'post_type' => 'ultp_templates', ); $the_query = new \WP_Query( $args ); if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); ob_start(); if ( in_array( 'et-fb', $body_class ) ) { echo ultimate_post()->build_css_for_inline_print( $templates, true ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } the_content(); $content = ob_get_clean(); } wp_reset_postdata(); } } elseif ( in_array( 'et-fb', $body_class ) ) { $content = '<p style="text-align:center;">' . sprintf( esc_html__( 'Pick a Template from your saved ones. Or create a template from: %s.', 'ultimate-post' ) . ' ', '<strong><i>' . esc_html__( 'Dashboard > PostX > Saved Templates', 'ultimate-post' ) . '</i></strong>' ) . '</p>'; } // Render module content $output = sprintf( '<div class="ultp-shortcode" data-postid="%1$s">%2$s</div>', esc_html( $templates ), et_sanitized_previously( $content ) ); return $this->_render_module_wrapper( $output, $render_slug ); } } new PostX_Template_Module(); }
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 divi.php
PHP
2.3 KB
2026-05-08 11:00
EDIT
📄 icon.svg
SVG
427 B
2026-05-08 11:00
EDIT
📄 init.php
PHP
760 B
2026-05-08 11:00
EDIT