diff --git a/wordpress/svn/trunk/assets/icon-128x128.png b/wordpress/svn/trunk/assets/icon-128x128.png new file mode 100644 index 0000000..9692f21 Binary files /dev/null and b/wordpress/svn/trunk/assets/icon-128x128.png differ diff --git a/wordpress/svn/trunk/simplepdf-embed.php b/wordpress/svn/trunk/simplepdf-embed.php index fef9c84..d149c00 100644 --- a/wordpress/svn/trunk/simplepdf-embed.php +++ b/wordpress/svn/trunk/simplepdf-embed.php @@ -12,82 +12,958 @@ if ( ! defined( 'ABSPATH' ) ) exit; -function simplepdf_settings_init() { - add_option('simplepdf_company_identifier'); +define('SIMPLEPDF_PLUGIN_VERSION', '1.1.3'); +define('SIMPLEPDF_SETTINGS_SCREEN', 'settings_page_simplepdf_settings'); +define('SIMPLEPDF_POST_LIST_LIMIT', 300); +define('SIMPLEPDF_PDF_PAGE_LIMIT', 100); +define('SIMPLEPDF_WEB_EMBED_VERSION', '1.8.4'); +define('SIMPLEPDF_REVIEW_URL', 'https://wordpress.org/support/plugin/simplepdf-embed/reviews/#new-post'); +define('SIMPLEPDF_PRICING_URL', 'https://simplepdf.com/pricing?ref=wordpress'); +function simplepdf_settings_init() { add_submenu_page( 'options-general.php', - 'SimplePDF Embed Settings', - 'SimplePDF Embed', + __('SimplePDF Embed Settings', 'simplepdf-embed'), + __('SimplePDF Embed', 'simplepdf-embed'), 'manage_options', 'simplepdf_settings', 'simplepdf_settings_page' ); +} + +function simplepdf_register_settings() { + register_setting('simplepdf_settings', 'simplepdf_company_identifier', array( + 'sanitize_callback' => 'simplepdf_sanitize_company_identifier', + )); + register_setting('simplepdf_settings', 'simplepdf_load_scope', array( + 'sanitize_callback' => 'simplepdf_sanitize_load_scope', + )); + register_setting('simplepdf_settings', 'simplepdf_selected_post_ids', array( + 'sanitize_callback' => 'simplepdf_sanitize_selected_post_ids', + )); +} + +function simplepdf_sanitize_company_identifier($value) { + $subdomain = preg_replace('#^(?:https?://)?(?:[^/]*\.)?([a-z0-9-]+)\.simplepdf\.com.*$#i', '$1', trim((string) $value)); + + return preg_replace('/[^a-z0-9-]/', '', strtolower($subdomain)); +} + +function simplepdf_sanitize_load_scope($value) { + return $value === 'selected' ? 'selected' : 'everywhere'; +} + +function simplepdf_sanitize_selected_post_ids($value) { + if ( ! is_array($value) ) { + return array(); + } + + return array_values(array_unique(array_filter(array_map('absint', $value)))); +} + +function simplepdf_get_company_identifier() { + return simplepdf_sanitize_company_identifier(get_option('simplepdf_company_identifier')); +} + +function simplepdf_fetch_account_status($company_identifier) { + $response = wp_remote_head('https://' . $company_identifier . '.simplepdf.com/', array( + 'redirection' => 0, + 'timeout' => 5, + )); + if ( is_wp_error($response) ) { + return 'unreachable'; + } + + $status_code = (int) wp_remote_retrieve_response_code($response); + if ( $status_code === 404 ) { + return 'not_found'; + } + + return $status_code >= 200 && $status_code < 400 ? 'found' : 'unreachable'; +} + +function simplepdf_get_account_status($company_identifier) { + $cached_check = get_transient('simplepdf_account_check'); + $is_cached = is_array($cached_check) + && isset($cached_check['company_identifier'], $cached_check['status']) + && $cached_check['company_identifier'] === $company_identifier; + if ( $is_cached ) { + return $cached_check['status']; + } + + $account_status = simplepdf_fetch_account_status($company_identifier); + $cache_duration = $account_status === 'found' ? HOUR_IN_SECONDS : 5 * MINUTE_IN_SECONDS; + set_transient('simplepdf_account_check', array( + 'company_identifier' => $company_identifier, + 'status' => $account_status, + ), $cache_duration); + + return $account_status; +} + +function simplepdf_get_load_scope() { + return simplepdf_sanitize_load_scope(get_option('simplepdf_load_scope')); +} + +function simplepdf_get_selected_post_ids() { + return array_map('absint', (array) get_option('simplepdf_selected_post_ids', array())); +} + +function simplepdf_should_load_on_current_request() { + if ( simplepdf_get_load_scope() === 'everywhere' ) { + return true; + } + + $queried_object = get_queried_object(); + + return $queried_object instanceof WP_Post + && in_array($queried_object->ID, simplepdf_get_selected_post_ids(), true); +} + +function simplepdf_enqueue_script() { + if ( ! simplepdf_should_load_on_current_request() ) { + return; + } + + $script_src = plugin_dir_url(__FILE__) . 'build/web-embed-pdf.js'; + + wp_enqueue_script('simplepdf-web-embed-pdf', $script_src, array(), SIMPLEPDF_WEB_EMBED_VERSION, true); + + $saved_company_identifier = simplepdf_get_company_identifier(); + $company_identifier = $saved_company_identifier === '' ? 'wordpress' : $saved_company_identifier; + $inline_script = "window.simplePDF.setConfig({ companyIdentifier: '" . esc_js($company_identifier) . "' });"; + + wp_add_inline_script('simplepdf-web-embed-pdf', $inline_script, 'after'); +} + +function simplepdf_should_show_review_notice() { + $company_identifier = simplepdf_get_company_identifier(); + + $is_eligible = $company_identifier !== '' + && ! get_option('simplepdf_review_notice_dismissed') + && simplepdf_get_account_status($company_identifier) === 'found'; + if ( ! $is_eligible ) { + return false; + } + + $report = simplepdf_get_pdf_link_report(); + + return $report['counts']['simplepdf'] > 0; +} + +function simplepdf_enqueue_admin_assets($hook_suffix) { + if ( $hook_suffix !== SIMPLEPDF_SETTINGS_SCREEN ) { + return; + } + wp_register_style('simplepdf-settings', false, array(), SIMPLEPDF_PLUGIN_VERSION); + wp_enqueue_style('simplepdf-settings'); + wp_add_inline_style('simplepdf-settings', simplepdf_admin_css()); - add_settings_section( - 'simplepdf_settings_section', - '', - 'simplepdf_settings_section_callback', - 'simplepdf_settings' + wp_register_script('simplepdf-review-notice', false, array(), SIMPLEPDF_PLUGIN_VERSION, true); + wp_enqueue_script('simplepdf-review-notice'); + wp_add_inline_script('simplepdf-review-notice', simplepdf_review_notice_script()); +} + +function simplepdf_review_notice_script() { + $dismiss_request = array( + 'url' => admin_url('admin-ajax.php'), + 'action' => 'simplepdf_dismiss_review_notice', + 'nonce' => wp_create_nonce('simplepdf_dismiss_review_notice'), ); - add_settings_field( - 'simplepdf_company_identifier', - 'Company Identifier', - 'simplepdf_company_identifier_callback', - 'simplepdf_settings', - 'simplepdf_settings_section' + return 'const simplepdfReviewNotice = ' . wp_json_encode($dismiss_request) . ';' . <<<'JS' + +document.addEventListener('click', (event) => { + const notice = event.target.closest('.simplepdf-review-notice'); + const isDismissal = notice !== null && event.target.closest('.notice-dismiss, .simplepdf-review-link') !== null; + if (!isDismissal) { + return; + } + + const body = new URLSearchParams({ action: simplepdfReviewNotice.action, _ajax_nonce: simplepdfReviewNotice.nonce }); + fetch(simplepdfReviewNotice.url, { method: 'POST', credentials: 'same-origin', body }); + if (event.target.closest('.simplepdf-review-link') !== null) { + notice.remove(); + } +}); +JS; +} + +function simplepdf_render_review_notice() { + $screen = get_current_screen(); + $is_settings_screen = $screen !== null && $screen->id === SIMPLEPDF_SETTINGS_SCREEN; + if ( ! $is_settings_screen || ! simplepdf_should_show_review_notice() ) { + return; + } + ?> +
+

+ + + + + +

+
+ p:last-child { margin-bottom: 0; } +.simplepdf-card-attention { border-left: 4px solid #dba617; } +.simplepdf-lede { font-size: 14px; color: #3c434a; } +.simplepdf-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 12px; } +.simplepdf-compare > div { border-radius: 6px; padding: 12px 16px; } +.simplepdf-compare h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; } +.simplepdf-compare ol { margin: 0 0 0 18px; } +.simplepdf-compare li { margin-bottom: 4px; } +.simplepdf-compare-before { background: #f6f7f7; color: #50575e; } +.simplepdf-compare-after { background: #edfaef; box-shadow: inset 0 0 0 1px #00a32a; } +.simplepdf-compare-after h3 { color: #007017; } +.simplepdf-punchline { font-size: 14px; font-weight: 600; } +.simplepdf-proof { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; } +.simplepdf-proof li { margin: 0; padding: 2px 10px; border-radius: 999px; background: #f0f0f1; font-size: 12px; } +.simplepdf-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 20px 0 4px; } +.simplepdf-cta .button-hero { font-size: 14px; } +.simplepdf-cta-note { color: #646970; } +.simplepdf-status { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 12px 0; } +.simplepdf-status-connected::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #00a32a; } +.simplepdf-next-steps { margin: 0 0 0 18px; list-style: disc; } +.simplepdf-settings details { margin-top: 12px; } +.simplepdf-settings summary { cursor: pointer; color: var(--wp-admin-theme-color, #2271b1); } +.simplepdf-settings details[open] summary { margin-bottom: 8px; } +.simplepdf-identifier input { min-width: 264px; } +.simplepdf-scope fieldset > label { display: block; margin-bottom: 12px; } +.simplepdf-scope fieldset .description { display: block; margin: 2px 0 0 24px; } +.simplepdf-post-list { max-height: 240px; overflow-y: auto; border: 1px solid #dcdcde; border-radius: 4px; padding: 8px 12px; margin: 4px 0 0 24px; } +.simplepdf-post-list h3 { font-size: 13px; margin: 8px 0 4px; color: #646970; } +.simplepdf-post-list label { display: block; margin-bottom: 4px; } +.simplepdf-scope:has(input[value="everywhere"]:checked) .simplepdf-post-list { display: none; } +.simplepdf-get-started { counter-reset: simplepdf-step; list-style: none; margin: 16px 0 0; } +.simplepdf-get-started li { counter-increment: simplepdf-step; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid #f0f0f1; } +.simplepdf-get-started li:first-child { border-top: 0; } +.simplepdf-get-started li::before { content: counter(simplepdf-step); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #f0f0f1; font-weight: 600; } +.simplepdf-step-text { display: flex; flex-direction: column; gap: 2px; } +.simplepdf-get-started .button { margin-left: auto; } +.simplepdf-pdf-table { margin-top: 12px; } +.simplepdf-pdf-table td:first-child { width: 30%; } +.simplepdf-pdf-links { margin: 0; } +.simplepdf-pdf-links li { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; } +.simplepdf-link-text .description, .simplepdf-page-note { display: block; } +.simplepdf-pill { flex: none; display: inline-block; min-width: 64px; padding: 1px 8px; border-radius: 999px; background: #f0f0f1; color: #50575e; font-size: 12px; text-align: center; } +.simplepdf-pill-on { background: #edfaef; color: #007017; } +.simplepdf-pill-error { background: #fcf0f1; color: #b32d2e; } +.simplepdf-save { margin: 16px 0 0; } +.simplepdf-review-notice .button { margin-left: 8px; vertical-align: baseline; } +.simplepdf-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; } +.simplepdf-help h3 { margin: 0 0 8px; font-size: 13px; } +.simplepdf-help ul { margin: 0; } +.simplepdf-help li { margin-bottom: 6px; } +@media (max-width: 782px) { + .simplepdf-compare, .simplepdf-help { grid-template-columns: 1fr; } + .simplepdf-header nav { display: none; } +} +CSS; +} + +function simplepdf_external_link($url, $label) { + return sprintf( + '%s %s', + esc_url($url), + esc_html($label), + esc_html__('(opens in a new tab)', 'simplepdf-embed') ); +} - register_setting('simplepdf_settings', 'simplepdf_company_identifier'); +function simplepdf_render_header() { + ?> +
+ +

+ v + +
+
+ ]+))/i'; + if ( ! preg_match($attribute_pattern, $anchor_tag, $attribute_match) ) { + return ''; + } + + $attribute_value = implode('', array_slice($attribute_match, 1)); + + return trim(html_entity_decode($attribute_value, ENT_QUOTES)); } -function simplepdf_company_identifier_callback() { - $value = get_option('simplepdf_company_identifier'); - echo ''; - echo '

Unlock Exclusive Features - Get Your Company Identifier Now: Dive deeper at SimplePDF/embed

'; - echo ''; - echo '

Have questions? Reach out for personalized support at support@simplepdf.com - We\'re here to help you succeed!

'; +// Mirrors getSimplePDFElements in the bundled web-embed script, so the table predicts what visitors get +// CF: src/shared.ts +function simplepdf_classify_link($href, $classes) { + if ( in_array('exclude-simplepdf', $classes, true) ) { + return 'excluded'; + } + + $is_pdf_link = substr(strtolower($href), -4) === '.pdf' + || substr(strtolower((string) wp_parse_url($href, PHP_URL_PATH)), -4) === '.pdf'; + $is_simplepdf_link = preg_match('#^https://[^.]+\.simplepdf\.com(/[^/]+)?/(form|documents)/.+#', $href) === 1; + if ( $is_pdf_link || $is_simplepdf_link || in_array('simplepdf', $classes, true) ) { + return 'opens_in_simplepdf'; + } + + return 'not_recognised'; } -function enqueue_simplepdf_script() { +function simplepdf_extract_pdf_links($post_content) { + preg_match_all('/]*>/i', $post_content, $anchor_matches); + + $pdf_links = array(); + foreach ( $anchor_matches[0] as $anchor_tag ) { + $href = simplepdf_get_anchor_attribute($anchor_tag, 'href'); + $classes = preg_split('/\s+/', simplepdf_get_anchor_attribute($anchor_tag, 'class'), -1, PREG_SPLIT_NO_EMPTY); + $link_type = simplepdf_classify_link($href, $classes); + $mentions_pdf = stripos($href, '.pdf') !== false; + if ( $link_type === 'not_recognised' && ! $mentions_pdf ) { + continue; + } - $plugin_url = plugin_dir_url(__FILE__); - $script_src = $plugin_url . 'build/web-embed-pdf.js'; + $pdf_links[] = array( + 'href' => $href, + 'link_type' => $link_type, + ); + } - wp_enqueue_script('simplepdf-web-embed-pdf', $script_src, array(), '1.8.4', true); + return $pdf_links; +} - $company_identifier = get_option('simplepdf_company_identifier'); - $companyIdentifier = empty($company_identifier) ? 'wordpress' : $company_identifier; - $inline_script = "window.simplePDF.setConfig({ companyIdentifier: '" . esc_js($companyIdentifier) . "' });"; +function simplepdf_scan_pages_with_pdf_links() { + global $wpdb; - wp_add_inline_script('simplepdf-web-embed-pdf', $inline_script, 'after'); + $post_ids = $wpdb->get_col($wpdb->prepare( + "SELECT ID FROM {$wpdb->posts} + WHERE post_type IN ('page', 'post') + AND post_status IN ('publish', 'private', 'draft') + AND (post_content LIKE %s OR post_content LIKE %s) + ORDER BY post_modified DESC + LIMIT %d", + '%' . $wpdb->esc_like('.pdf') . '%', + '%' . $wpdb->esc_like('simplepdf') . '%', + SIMPLEPDF_PDF_PAGE_LIMIT + )); + if ( empty($post_ids) ) { + return array('pages' => array(), 'is_capped' => false); + } + + $posts = get_posts(array( + 'post__in' => array_map('absint', $post_ids), + 'post_type' => array('page', 'post'), + 'post_status' => array('publish', 'private', 'draft'), + 'orderby' => 'post__in', + 'numberposts' => -1, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + )); + + $pages = array(); + foreach ( $posts as $post ) { + $pdf_links = simplepdf_extract_pdf_links($post->post_content); + if ( ! empty($pdf_links) ) { + $pages[] = array('post' => $post, 'pdf_links' => $pdf_links); + } + } + + return array( + 'pages' => $pages, + 'is_capped' => count($post_ids) === SIMPLEPDF_PDF_PAGE_LIMIT, + ); } -function simplepdf_settings_page() { +function simplepdf_get_pages_with_pdf_links() { + static $pages_with_pdf_links = null; + if ( $pages_with_pdf_links === null ) { + $pages_with_pdf_links = simplepdf_scan_pages_with_pdf_links(); + } + + return $pages_with_pdf_links; +} + +function simplepdf_runs_on_post($post_id) { + return simplepdf_get_load_scope() === 'everywhere' + || in_array($post_id, simplepdf_get_selected_post_ids(), true); +} + +function simplepdf_get_link_outcome($pdf_link, $runs_on_page, $has_missing_account) { + switch ( $pdf_link['link_type'] ) { + case 'opens_in_simplepdf': + if ( ! $runs_on_page ) { + return array('opens_in' => 'browser', 'reason' => ''); + } + + return array('opens_in' => $has_missing_account ? 'error' : 'simplepdf', 'reason' => ''); + case 'excluded': + return array('opens_in' => 'browser', 'reason' => __('The link has the exclude-simplepdf class', 'simplepdf-embed')); + case 'not_recognised': + return array('opens_in' => 'browser', 'reason' => __('The link does not point to a .pdf file', 'simplepdf-embed')); + default: + return array('opens_in' => 'browser', 'reason' => ''); + } +} + +function simplepdf_get_view_url($post) { + return $post->post_status === 'publish' ? get_permalink($post) : get_preview_post_link($post); +} + +function simplepdf_render_scan_scope_note($is_capped) { ?> -
-

SimplePDF Embed Settings

-
+

+ + + +

+ +

+

+
    +
  1. + + + + + +
  2. +
  3. + + + + + +
  4. +
  5. + + + + +
  6. +
+ +
  • + ' . esc_html__('SimplePDF', 'simplepdf-embed') . ''; + break; + case 'error': + echo '' . esc_html__('Error', 'simplepdf-embed') . ''; + break; + default: + echo '' . esc_html__('Browser', 'simplepdf-embed') . ''; + break; + } + ?> + + + + + + +
  • + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    + +
    + 0, 'browser' => 0, 'error' => 0); + + $pages = array(); + foreach ( $scan['pages'] as $page ) { + $runs_on_page = simplepdf_runs_on_post($page['post']->ID); + $pdf_links = array(); + foreach ( $page['pdf_links'] as $pdf_link ) { + $outcome = simplepdf_get_link_outcome($pdf_link, $runs_on_page, $has_missing_account); + $counts[$outcome['opens_in']]++; + $pdf_links[] = array_merge($pdf_link, array('outcome' => $outcome)); + } + $pages[] = array('post' => $page['post'], 'runs_on_page' => $runs_on_page, 'pdf_links' => $pdf_links); + } + + return array( + 'pages' => $pages, + 'is_capped' => $scan['is_capped'], + 'counts' => $counts, + 'link_count' => array_sum($counts), + 'account_address' => $company_identifier . '.simplepdf.com', + ); +} + +function simplepdf_render_pdfs_card() { + $report = simplepdf_get_pdf_link_report(); + $counts = $report['counts']; + $link_count = $report['link_count']; + $needs_attention = $counts['error'] > 0 || ($link_count > 0 && $counts['simplepdf'] === 0); + ?> +
    + + + 0 ) : ?> +

    + +

    +

    + +

    + +

    + +

    + +

    + +

    + + + 0 ) : ?> + + + +
    + +

    +
    + +

    +

    +

    + +
      +
    • +
    • +
    • +
    + +

    +

    + +
    + + +
    + +

    +
    +

    + +

    +
    + + +

    +

    +

    + +
    + + +
    + +

    +
    +
    +

    +
      + +
    1. + +
    +
    +
    +

    +
      + +
    1. + +
    +
    +
    +

    +
      + +
    • + +
    +

    +
    + + + + + +
    +
    + + +
    + +
    + +
    + array('page', 'post'), + 'post_status' => array('publish', 'private', 'draft'), + 'orderby' => 'date', + 'order' => 'DESC', + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + ); + $latest_posts = get_posts(array_merge($query_args, array('numberposts' => SIMPLEPDF_POST_LIST_LIMIT))); + $pinned_post_ids = array_values(array_unique(array_merge( + simplepdf_get_selected_post_ids(), + array_map(function ($page) { + return $page['post']->ID; + }, simplepdf_get_pages_with_pdf_links()['pages']) + ))); + $pinned_posts = empty($pinned_post_ids) + ? array() + : get_posts(array_merge($query_args, array('post__in' => $pinned_post_ids, 'numberposts' => -1))); + + $posts_by_id = array(); + foreach ( array_merge($pinned_posts, $latest_posts) as $post ) { + $posts_by_id[$post->ID] = $post; + } + + return array( + 'posts' => array_values($posts_by_id), + 'is_capped' => count($latest_posts) === SIMPLEPDF_POST_LIST_LIMIT, + ); +} + +function simplepdf_get_post_label($post) { + $title = wp_strip_all_tags(get_the_title($post)); + $label = $title !== '' ? $title : __('(no title)', 'simplepdf-embed'); + + switch ( $post->post_status ) { + case 'draft': + /* translators: %s: page or post title */ + return sprintf(__('%s (draft)', 'simplepdf-embed'), $label); + case 'private': + /* translators: %s: page or post title */ + return sprintf(__('%s (private)', 'simplepdf-embed'), $label); + default: + return $label; + } +} + +function simplepdf_render_post_checklist($posts, $selected_post_ids, $post_type, $heading) { + $posts_of_type = array_filter($posts, function ($post) use ($post_type) { + return $post->post_type === $post_type; + }); + if ( empty($posts_of_type) ) { + return; + } + ?> +

    + + + +
    +

    +
    + + + +
    + +

    + + + + +

    + +

    + + +
    +
    +

    +
    + __('Build your form', 'simplepdf-embed'), + 'links' => array( + 'how-to/convert-pdf-to-fillable-form' => __('Turn any PDF into a fillable form', 'simplepdf-embed'), + 'how-to/add-required-fields-on-pdf-forms' => __('Make fields required', 'simplepdf-embed'), + 'how-to/customize-the-pdf-editor-and-add-branding' => __('Add your logo and branding', 'simplepdf-embed'), + 'how-to/customize-the-submission-confirmation' => __('Customize the confirmation page', 'simplepdf-embed'), + ), + ), + array( + 'heading' => __('Receive filled PDFs', 'simplepdf-embed'), + 'links' => array( + 'how-to/get-email-notifications-for-pdf-form-submissions' => __('Email alerts', 'simplepdf-embed'), + 'how-to/configure-webhooks-pdf-form-submissions' => __('Webhooks', 'simplepdf-embed'), + 'how-to/how-to-organize-pdf-documents-with-tags' => __('Organize them with tags', 'simplepdf-embed'), + 'how-to/use-your-own-s3-bucket-storage-for-pdf-form-submissions' => __('Your own storage: S3', 'simplepdf-embed'), + 'how-to/bring-your-own-azure-blob-storage-for-pdf-storage' => __('Your own storage: Azure Blob Storage', 'simplepdf-embed'), + 'how-to/connect-sharepoint-as-your-own-storage-for-pdf-submissions' => __('Your own storage: SharePoint', 'simplepdf-embed'), + ), + ), + array( + 'heading' => __('Plans and compliance', 'simplepdf-embed'), + 'links' => array( + 'faq/whats-included-in-basic' => __('What\'s in Basic', 'simplepdf-embed'), + 'faq/whats-included-in-pro' => __('What\'s in Pro', 'simplepdf-embed'), + 'faq/whats-included-in-premium' => __('What\'s in Premium', 'simplepdf-embed'), + 'faq/is-simplepdf-hipaa-compliant' => __('Is SimplePDF HIPAA compliant?', 'simplepdf-embed'), + ), + ), + ); +} + +function simplepdf_render_help_card() { + ?> +
    +

    +
    + +
    +

    +
      + $label ) : ?> +
    • + +
    +
    + +
    +
    + +
    + + + + + + +
    +add_action('admin_init', 'simplepdf_register_settings'); +add_action('admin_enqueue_scripts', 'simplepdf_enqueue_admin_assets'); +add_action('admin_notices', 'simplepdf_render_review_notice'); +add_action('wp_ajax_simplepdf_dismiss_review_notice', 'simplepdf_dismiss_review_notice'); +add_action('wp_enqueue_scripts', 'simplepdf_enqueue_script'); diff --git a/wordpress/svn/trunk/uninstall.php b/wordpress/svn/trunk/uninstall.php new file mode 100644 index 0000000..5090845 --- /dev/null +++ b/wordpress/svn/trunk/uninstall.php @@ -0,0 +1,8 @@ +