page_title = __( 'File Editor', 'insert-headers-and-footers' ); parent::__construct(); } /** * Add codemirror settings specific to the needs for this page. * * @return void */ public function page_hooks() { // Add the codemirror settings. add_filter( 'wpcode_editor_config', array( $this, 'editor_config' ) ); } /** * Output the page content. * * @return void */ public function output_content() { $this->can_edit = true; echo '
views[ $this->view ] ) ); ?>
', '' ); ?>
views = array( 'adstxt' => 'ads.txt', 'appadstxt' => 'app-ads.txt', 'serviceworkerjs' => 'service-worker.js', 'robotstxt' => 'robots.txt', ); } /** * Nothing to return by default. * * @return array */ public function get_value() { return array( 'enabled' => true, 'content' => '', ); } /** * Get the overlay for the file editor page. * * @return string */ public function get_pixel_overlay() { $text = '
' . esc_html__( 'Simplify your website management with the WPCode File Editor! Say goodbye to the hassle of manually editing files on your server.', 'insert-headers-and-footers' ) . '
'; $text .= sprintf( // translators: %1$s and %2$s are tags. '
' . esc_html__( 'With this powerful tool, you can easily customize crucial files like %1$sads.txt%2$s, %1$sapp-ads.txt%2$s, %1$srobots.txt%2$s, and %1$sservice-worker.js%2$s right from your WordPress admin.', 'insert-headers-and-footers' ) . '
', '', '' ); return self::get_upsell_box( __( 'File Editor is a PRO Feature', 'insert-headers-and-footers' ), $text, array( 'text' => esc_html__( 'Upgrade to WPCode PRO', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'file-editor', 'tab-' . $this->view, 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn More about the File Editor', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/docs/file-editor/', 'file-editor', 'tab-' . $this->view, 'learn-more' ) ), ), array( esc_html__( 'No manual coding, no FTP', 'insert-headers-and-footers' ), esc_html__( 'Effortless integrations setup', 'insert-headers-and-footers' ), esc_html__( 'Reduce the number of plugins', 'insert-headers-and-footers' ), esc_html__( 'Prevent advertising fraud', 'insert-headers-and-footers' ), ) ); } }