special_styles(); /** @var WPSEO_Admin_Asset $inside_editor */ $inside_editor = $styles['inside-editor']; $url = $inside_editor->get_url( WPSEO_Admin_Asset::TYPE_CSS, WPSEO_FILE ); if ( '' === $css_files ) { $css_files = $url; } else { $css_files .= ',' . $url; } return $css_files; } /** * Adds a custom element to the tinyMCE editor that we need for marking the content. * * @param array $tinymce_config The tinyMCE config as configured by WordPress. * * @return array The new tinyMCE config with our added custom elements. */ public function add_custom_element( $tinymce_config ) { if ( ! empty( $tinymce_config['custom_elements'] ) ) { $custom_elements = $tinymce_config['custom_elements']; $custom_elements .= ',' . '~yoastmark'; } else { $custom_elements = '~yoastmark'; } $tinymce_config['custom_elements'] = $custom_elements; return $tinymce_config; } }