Submit
Path:
~
/
home
/
getwphos
/
public_html
/
brueggemann
/
wp-content
/
plugins
/
insert-headers-and-footers
/
includes
/
File Content:
class-wpcode-settings.php
<?php /** * Handles all the WPCode settings. * * @package WPCode */ /** * Class WPCode_Settings. */ class WPCode_Settings { /** * The key used for storing settings in the db. * * @var string */ protected $settings_key = 'wpcode_settings'; /** * Options as they are loaded from the db. * * @var array * @see WPCode_Settings::get_options */ protected $options; /** * Get an option by name with an optional default value. * * @param string $option_name The option name. * @param mixed $default The default value (optional). * * @return mixed * @see get_option */ public function get_option( $option_name, $default = false ) { $options = $this->get_options(); $value = $default; if ( isset( $options[ $option_name ] ) ) { $value = $options[ $option_name ]; } $value = apply_filters( 'wpcode_get_option', $value, $option_name ); return apply_filters( "wpcode_get_option_{$option_name}", $value, $option_name ); } /** * Get all the options as they are stored in the db. * * @return array */ public function get_options() { if ( ! isset( $this->options ) ) { $this->options = $this->load_options(); } return $this->options; } /** * Load the options from the db. * * @return array */ protected function load_options() { $defaults = array( 'facebook_pixel_events' => array( 'page_view' => 1, 'add_to_cart' => 1, 'view_content' => 1, 'begin_checkout' => 1, 'purchase' => 1, ), 'google_pixel_events' => array( 'page_view' => 1, 'add_to_cart' => 1, 'view_item' => 1, 'begin_checkout' => 1, 'purchase' => 1, 'conversion' => 1, ), 'pinterest_pixel_events' => array( 'pagevisit_product' => 1, 'begin_checkout' => 1, 'add_to_cart' => 1, 'purchase' => 1, ), 'tiktok_pixel_events' => array( 'view_content' => 1, 'add_to_cart' => 1, 'begin_checkout' => 1, 'purchase' => 1, ), ); $options = get_option( $this->settings_key, $defaults ); // Ensure we always return an array, even if the database contains corrupted data. return is_array( $options ) ? $options : $defaults; } /** * Update an option in the settings object. * * @param string $option The option name. * @param mixed $value The new value. * * @return void */ public function update_option( $option, $value ) { if ( empty( $value ) ) { $this->delete_option( $option ); return; } if ( isset( $this->options[ $option ] ) && $this->options[ $option ] === $value ) { return; } $this->options[ $option ] = $value; $this->save_options(); } /** * Delete an option by its name. * * @param string $option The option name. * * @return void */ public function delete_option( $option ) { // If there's nothing to delete, do nothing. if ( isset( $this->options[ $option ] ) ) { unset( $this->options[ $option ] ); $this->save_options(); } } /** * Save the current options object to the db. * * @return void */ protected function save_options() { update_option( $this->settings_key, (array) $this->options ); } /** * Use an array to update multiple settings at once. * * @param array $options The new options array. * * @return void */ public function bulk_update_options( $options ) { $this->options = array_merge( $this->get_options(), $options ); $this->save_options(); } }
Edit
Rename
Chmod
Delete
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