define(); $this->inc(); $this->hooks(); } public function define() { define( 'MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP', __FILE__ ); } public function inc() { include_once dirname( MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ) . '/includes/ams-page-scroll-back-settings.php'; } public function hooks() { add_action( 'admin_enqueue_scripts', array( $this, 'msv_admin_enqueue_scripts' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'msv_wp_enqueue_scripts' ) ); add_action( 'wp_footer', array( $this, 'show_icon' ) ); } public function msv_wp_enqueue_scripts() { include_once dirname( MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ) . '/includes/ams-page-scroll-back-inline-style.php'; } public function msv_admin_enqueue_scripts() { if( isset( $_GET['page'] ) && $_GET['page'] == 'msv-amspsbtt-page-scroll-back-to-top-settings' ) : wp_enqueue_style( 'msv-amspsbtt-page-scroll-admin-style', plugins_url( '/assets/css/admin.css', MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ) ); wp_enqueue_script( 'msv-amspsbtt-page-scroll-admin-script', plugins_url( '/assets/js/admin.js', MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ), array(), '1.0', true ); wp_enqueue_script( 'msv-amspsbtt-page-scroll-admin-display', plugins_url( '/assets/js/admin-display.js', MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ), array(), '1.0', true ); wp_enqueue_script( 'msv-amspsbtt-page-scroll-admin-action', plugins_url( '/assets/js/admin-action.js', MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ), array(), '1.0', true ); wp_register_style( 'msv-amspsbtt-page-scroll-font-awesome', plugins_url( '/assets/css/font-awesome.min.css', MSV_AMSPSBTT_PAGE_SCROLL_BACK_TO_TOP ), array(), '4.6.3.1'); wp_enqueue_style( 'msv-amspsbtt-page-scroll-font-awesome' ); endif; $query_args = array( 'family' => 'Open+Sans:400,700|Oswald:400,700|Roboto:400,700|Shrikhand|Teko:400,700|Cabin:400,700|Anton|Poiret+One|Courgette|Permanent+Marker', 'subset' => 'latin,latin-ext', ); wp_register_style( 'ams_psbtt_google_fonts', add_query_arg( $query_args, "http://fonts.googleapis.com/css" ), array(), null ); wp_enqueue_style( 'ams_psbtt_google_fonts' ); } public function show_icon() { $html = '