ts_get_plugin_url(); self::$template_base = $this->ts_get_template_path(); add_filter( 'plugin_action_links_' . self::$ts_faq_file_base_name, array( __CLASS__, 'ts_plugin_action_links' ), 10 ); } /** * Add the FAQ & SUpport link on the plugins page. * @hook 'plugin_action_links_' . self::$ts_plugin_dir */ public static function ts_plugin_action_links ( $links ) { $ts_action_links = array(); $ts_faq_url = admin_url( 'index.php?page=shortcodes_faq_page' ) ; $ts_action_links = array( 'faq_support' => 'FAQ & Support', ); return array_merge( $ts_action_links, $links ); } public static function ts_add_meta_footer_text () { ?>
You have any queries? Please check our >FAQ page. ts_faq_support_page(); } } /** * Adds a page to display the FAQ's and support information * * @since 7.7 */ public function ts_faq_support_page() { $ts_file_path = dirname( __FILE__ ) ; $faq_support = array( 'ts_plugin_name' => self::$plugin_name, 'ts_faq' => self::$ts_faq ); set_query_var( 'faq_support', $faq_support ); ob_start(); load_template( $ts_file_path . '/templates/faq-page/faq-page.php' ); echo ob_get_clean(); } /** * This function returns the plugin url * * @access public * @since 7.7 * @return string */ public function ts_get_plugin_url() { return plugins_url() . '/' . self::$plugin_folder; } /** * This function returns the template directory path * * @access public * @since 7.7 * @return string */ public function ts_get_template_path() { return untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/'; } }