Submit
Path:
~
/
home
/
getwphos
/
public_html
/
brueggemann
/
wp-content
/
plugins
/
insert-headers-and-footers
/
includes
/
File Content:
shortcode.php
<?php /** * Handle the generic WPCode shortcode. * * @package WPCode */ if ( ! defined( 'ABSPATH' ) ) { exit; } add_shortcode( 'wpcode', 'wpcode_shortcode_handler' ); add_action( 'wpcode_shortcode_before_output', 'wpcode_pass_shortcode_attributes_to_snippet', 10, 4 ); add_filter( 'wpcode_shortcode_attribute_value', 'wp_kses_post' ); /** * Generic handler for the shortcode. * * @param array $args The shortcode attributes. * @param string $content The shortcode content. * @param string $tag The shortcode tag. * * @return string */ function wpcode_shortcode_handler( $args, $content, $tag ) { $atts = wp_parse_args( $args, array( 'id' => 0, 'wpcode_source' => 'shortcode', ) ); if ( 0 === $atts['id'] ) { return ''; } $snippet = new WPCode_Snippet( absint( $atts['id'] ) ); if ( ! $snippet->is_active() ) { return ''; } // Let's check that conditional logic rules are met. if ( $snippet->conditional_rules_enabled() && ! wpcode()->conditional_logic->are_snippet_rules_met( $snippet ) && apply_filters( 'wpcode_shortcode_use_conditional_logic', true ) ) { return ''; } $shortcode_location = apply_filters( 'wpcode_get_snippets_for_location', array( $snippet ), 'shortcode' ); if ( empty( $shortcode_location ) ) { return ''; } $snippet->location = $atts['wpcode_source']; do_action( 'wpcode_shortcode_before_output', $snippet, $atts, $content, $tag ); return wpcode()->execute->get_snippet_output( $snippet ); } /** * Before the shortcode output, let's check if we have to load any shortcode attributes to the class instance. * * @param WPCode_Snippet $snippet The snippet instance. * @param array $atts The shortcode attributes. * @param string|null $content Shortcode content, if any. * @param string $tag The shortcode tag. * * @return void */ function wpcode_pass_shortcode_attributes_to_snippet( $snippet, $atts, $content, $tag ) { // Let's see if we have to load any shortcode attributes. $shortcode_attributes = $snippet->get_shortcode_attributes(); if ( ! empty( $shortcode_attributes ) ) { foreach ( $shortcode_attributes as $attribute ) { $value = isset( $atts[ $attribute ] ) ? $atts[ $attribute ] : ''; $snippet->set_attribute( $attribute, apply_filters( 'wpcode_shortcode_attribute_value', $value, $attribute ) ); } } if ( ! empty( $content ) ) { $snippet->set_attribute( 'content', $content ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
admin
---
0755
auto-insert
---
0755
conditional-logic
---
0755
execute
---
0755
generator
---
0755
lite
---
0755
capabilities.php
2809 bytes
0644
class-wpcode-abilities-api.php
16146 bytes
0644
class-wpcode-admin-bar-info.php
13947 bytes
0644
class-wpcode-auto-insert.php
3779 bytes
0644
class-wpcode-capabilities.php
1135 bytes
0644
class-wpcode-conditional-logic.php
5407 bytes
0644
class-wpcode-error.php
7730 bytes
0644
class-wpcode-file-cache.php
6536 bytes
0644
class-wpcode-file-logger.php
8743 bytes
0644
class-wpcode-generator.php
6805 bytes
0644
class-wpcode-install.php
8171 bytes
0644
class-wpcode-library-auth.php
7086 bytes
0644
class-wpcode-library.php
23467 bytes
0644
class-wpcode-settings.php
3501 bytes
0644
class-wpcode-smart-tags.php
20065 bytes
0644
class-wpcode-snippet-cache.php
4225 bytes
0644
class-wpcode-snippet-execute.php
20950 bytes
0644
class-wpcode-snippet.php
28536 bytes
0644
compat.php
4468 bytes
0644
global-output.php
1783 bytes
0644
helpers.php
14046 bytes
0644
icons.php
35489 bytes
0644
ihaf.php
204 bytes
0644
legacy.php
923 bytes
0644
pluggable.php
656 bytes
0644
post-type.php
3358 bytes
0644
safe-mode.php
4508 bytes
0644
shortcode.php
2436 bytes
0644
N4ST4R_ID | Naxtarrr