form_for_scripts( __( 'Header', 'insert-headers-and-footers' ) ); } /** * Override the footer tab content to make it specific to this class. * * @param WP_Post $post The post object. * * @return void */ public function output_tab_footer( $post ) { $this->form_for_scripts( __( 'Footer', 'insert-headers-and-footers' ) ); } /** * Override the body tab content to make it specific to this class. * * @param WP_Post $post The post object. * * @return void */ public function output_tab_body( $post ) { $this->form_for_scripts( __( 'Body', 'insert-headers-and-footers' ) ); } /** * Override the code tab content to make it specific to this class. * * @param WP_Post $post The post object. * * @return void */ public function output_tab_code( $post ) { ?>

Show site currency

Banner Ad

Subscribe Reminder

Event Countdown

Banner Ad 2

Free Download Button

%s

', esc_html__( 'While you can always use global snippets, in the PRO version you can easily add page-specific scripts and snippets directly from the post edit screen.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'custom-snippets', 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'custom-snippets', 'features' ) ), ) ); } /** * Get the markup for a form using a disabled CodeMirror instance (to avoid loading a script that won't be used). * * @param string $label The label for this tab section. * * @return void */ public function form_for_scripts( $label ) { wp_enqueue_style( 'code-editor' ); ?>

%s

', esc_html__( 'While you can always use global snippets, in the PRO version you can easily add page-specific scripts and snippets directly from the post edit screen.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Page Scripts', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'main-' . sanitize_title( $label ), 'features' ) ), ) ); } /** * Override the revisions tab content to make it specific to this class. * * @param WP_Post $post The post object. * * @return void */ public function output_tab_revisions( $post ) { printf( '

%s

', esc_html__( 'As you make changes to your page scripts and save, you will get a list of previous versions with all the changes made in each revision. You can compare revisions to the current version or see changes as they have been saved by going through each revision. Any of the revisions can then be restored as needed without interfering with your post/page.', 'insert-headers-and-footers' ) ); echo $this->code_revisions_list_with_notice( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped esc_html__( 'Code Revisions is a Pro Feature', 'insert-headers-and-footers' ), sprintf( '

%s

', esc_html__( 'Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your page scripts.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'revisions', 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'revisions', 'features' ) ), ) ); } }