PATH:
home
/
letacommog
/
rdvenunclick.fr1
/
wp-content
/
plugins
/
ultimate-faqs
/
Functions
<?php class UFAQPointersManager implements UFAQPointersManagerInterface { private $pointers_input; private $version; private $prefix; private $pointers = array(); public function __construct( $pointers_input, $version, $prefix ) { $this->pointers_input = $pointers_input; $this->version = str_replace( '.', '_', $version ); $this->prefix = $prefix; } public function parse() { if ( empty($this->pointers_input) ) return; foreach ( $this->pointers_input as $i => $pointer ) { $pointer['id'] = "{$this->prefix}_{$i}"; $this->pointers[$pointer['id']] = (object) $pointer; } } public function filter( $page ) { if ( empty( $this->pointers ) ) return array(); $uid = get_current_user_id(); $no = explode( ',', (string) get_user_meta( $uid, 'dismissed_wp_pointers', TRUE ) ); $active_ids = array_diff( array_keys( $this->pointers ), $no ); $good = array(); foreach( $this->pointers as $i => $pointer ) { if ( in_array( $i, $active_ids, TRUE ) // is active && isset( $pointer->where ) // has where && in_array( $page, (array) $pointer->where, TRUE ) // current page is in where ) { $good[] = $pointer; } } $count = count( $good ); if ( $good === 0 ) return array(); foreach( array_values( $good ) as $i => $pointer ) { $good[$i]->next = $i+1 < $count ? $good[$i+1]->id : ''; } return $good; } }
[+]
..
[-] EWD_UFAQ_Upgrade_Box.php
[edit]
[-] EWD_UFAQ_Output_Options_Page.php
[edit]
[-] EWD_UFAQ_Add_Views_Column.php
[edit]
[-] EWD_UFAQ_WooCommerce_Tab.php
[edit]
[-] EWD_UFAQ_Pointers_Manager_Interface.php
[edit]
[-] EWD_UFAQ_Output_Statistics_Page.php
[edit]
[-] EWD_UFAQ_WPForms_Integration.php
[edit]
[-] Update_EWD_UFAQ_Content.php
[edit]
[-] EWD_UFAQ_Pointers_Manager_Class.php
[edit]
[-] EWD_UFAQ_Import.php
[edit]
[-] EWD_UFAQ_Create_Captcha_Image.php
[edit]
[-] EWD_UFAQ_Submit_Question.php
[edit]
[-] EWD_UFAQ_Rewrite_Rules.php
[edit]
[-] EWD_UFAQ_Initial_Data.php
[edit]
[-] EWD_UFAQ_Widgets.php
[edit]
[-] Process_Ajax.php
[edit]
[-] EWD_UFAQ_Export_To_PDF.php
[edit]
[-] Error_Notices.php
[edit]
[-] EWD_UFAQ_Output_Pages.php
[edit]
[-] EWD_UFAQ_Styling.php
[edit]
[-] Update_Admin_Databases.php
[edit]
[-] EWD_UFAQ_Deactivation_Survey.php
[edit]
[-] EWD_UFAQ_Admin_Image_Upload.php
[edit]
[-] EWD_UFAQ_Add_Social_Media_Buttons.php
[edit]
[-] EWD_UFAQ_Output_Import_Page.php
[edit]
[-] EWD_UFAQ_Export.php
[edit]
[-] FrontEndAjaxUrl.php
[edit]
[-] EWD_UFAQ_Help_Pointers.php
[edit]
[-] Register_EWD_UFAQ_Posts_Taxonomies.php
[edit]
[-] EWD_UFAQ_Meta_Boxes.php
[edit]
[-] EWD_UFAQ_Output_Export_Page.php
[edit]
[-] EWD_UFAQ_Version_Update.php
[edit]
[-] EWD_UFAQ_Captcha.php
[edit]