*/
private function get_background_css() {
$cnb_options = get_option( 'cnb' );
if ( 'full' === $cnb_options['appearance'] || 'tfull' === $cnb_options['appearance'] ) {
return sprintf( 'background-color:%1$s;',
esc_attr( $cnb_options['color'] )
);
} else {
$svg = $this->svg(
$cnb_options['iconcolor'] );
return
sprintf( 'background-image:url(data:image/svg+xml;base64,%1$s); background-color:%2$s;',
esc_attr( $svg ),
esc_attr( $cnb_options['color'] )
);
}
}
/**
*/
private function get_background_css() {
$cnb_options = get_option( 'cnb' );
if ( 'full' === $cnb_options['appearance'] || 'tfull' === $cnb_options['appearance'] ) {
return sprintf( 'background-color:%1$s;',
esc_attr( $cnb_options['color'] )
);
} else {
$svg = $this->svg(
$cnb_options['iconcolor'] );
return
sprintf( 'background-image:url(data:image/svg+xml;base64,%1$s); background-color:%2$s;',
esc_attr( $svg ),
esc_attr( $cnb_options['color'] )
);
}
}
/**
$cnb_tracking_id = ( $cnb_tracking_id >= 0 && $cnb_tracking_id <= 3 ) ? $cnb_tracking_id : 0;
$cnb_conversion_id = ( $cnb_conversion_id >= 0 && $cnb_conversion_id <= 2 ) ? $cnb_conversion_id : 0;
$cnb_click_tracking = $cnb_tracking_id > 0;
$cnb_conversion_tracking = $cnb_conversion_id > 0;
$cnb_number = isset( $cnb_options['number'] ) ? $cnb_options['number'] : null;
$cnb_classnames = $this->get_class_names();
// These all return pre-escaped results
$cnb_button_background = $this->get_background_css();
$tracking_code = $this->get_google_tracking_code( $cnb_click_tracking, $cnb_tracking_id );
$conversion_code = $this->get_google_conversion_code( $cnb_conversion_tracking, $cnb_conversion_id );
$cnb_button_text = $this->create_button_text();
$cnb_aria_label = $cnb_has_text ? '' : 'aria-label="Call Now Button"';
$cnb_call_link = '<a ' . $cnb_aria_label;
$cnb_call_link .= ' href="tel:' . esc_attr( $cnb_number ) . '"';
$cnb_call_link .= ' id="callnowbutton"';
$cnb_call_link .= ' class="' . esc_attr( implode(' ', $cnb_classnames ) ) . '"';
esc_attr( CNB_VERSION ),
"\n" );
}
public function cnb_footer() {
$this->render_comment();
if ($this->should_render()) {
// phpcs:ignore WordPress.Security
echo $this->get_button_link();
}
}
/**
* @return bool return true if the button should be rendered, false otherwise
*/
function should_render() {
$cnb_options = get_option( 'cnb' );
// if we cannot even find this option, we skip the header completely
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
*
* @since 1.5.1
*/
function wp_footer() {
/**
* Prints scripts or data before the closing body tag on the front end.
*
* @since 1.5.1
*/
do_action( 'wp_footer' );
}
/**
* Fires the wp_body_open action.
*
* See {@see 'wp_body_open'}.
*
* @since 5.2.0
*/
function wp_body_open() {
</footer>
</div><!-- /#page -->
</div><!-- /.off-canvas-content -->
</div><!-- ./off-canvas-wrapper-inner -->
</div><!-- ./off-canvas-wrapper -->
<?php wp_footer(); ?>
</body>
</html>
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
$located = $wp_template_path . '/' . $template_name;
break;
} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
$located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
/**
* Requires the template file with WordPress environment.
*
* The globals are set up for the template file to ensure that the WordPress
* environment is available from within the function. The query variables are
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "footer-{$name}.php";
}
$templates[] = 'footer.php';
if ( ! locate_template( $templates, true, true, $args ) ) {
return false;
}
}
/**
* Loads sidebar template.
*
* Includes the sidebar template for a theme or if a name is specified then a
* specialized sidebar will be included.
*
<?php decomtheme_template_print('content-sections'); ?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
</div><!-- #page-content -->
</div>
</div>
</div>
<?php get_footer(); ?>
/**
* Fires immediately before including the template.
*
* @since 6.9.0
*
* @param string $template The path of the template about to be included.
*/
do_action( 'wp_before_include_template', $template );
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';