10 to update post content with just saved ACF values add_action('acf/save_post', array( $this, 'a11yStatement_save_post'), 11 ); register_activation_hook( __FILE__, array( $this, 'a11yStatement_activate' ) ); register_deactivation_hook( __FILE__, array( $this, 'a11yStatement_deactivate' ) ); } public function a11yStatement_load_textdomain() { load_plugin_textdomain( 'a11yStatement', false, basename( dirname( __FILE__ ) ) . '/languages/' ); } public function a11yStatement_settings_page() { require_once plugin_dir_path( __FILE__ ) . 'AccessibilityStatementSettingsPage.php'; $my_settings_page = new AccessibilityStatementSettingsPage(); } public function a11yStatement_on_settings_save() { $a11y_page_id = get_option( 'a11yStatement_post_id' ); $post_content = $this->a11yStatement_generate_post_content(); $my_post = array( 'ID' => $a11y_page_id, 'post_content' => $post_content ); wp_update_post( $my_post ); } public function a11yStatement_include_shortcodes() { require_once plugin_dir_path( __FILE__ ) . 'AccessibilityStatementShortcodes.php'; $my_shortocdes = new AccessibilityStatementShortcodes(); } public function a11yStatement_activate() { $created_post_id = $this->a11yStatement_create_post(); if ($created_post_id) { add_option( 'a11yStatement_post_id', $created_post_id ); $this->a11yStatement_set_post_default_values($created_post_id); $this->a11yStatement_set_settings_default_values(); $post_content = $this->a11yStatement_generate_post_content(); $my_post = array( 'ID' => $created_post_id, 'post_content' => $post_content ); wp_update_post( $my_post ); } } public function a11yStatement_deactivate() { $a11y_page_id = get_option( 'a11yStatement_post_id' ); wp_delete_post( $a11y_page_id, true ); delete_option( 'a11yStatement_post_id' ); delete_option( 'a11y_statement_options' ); } public function update_acf_settings_path( $path ) { $path = plugin_dir_path( __FILE__ ) . 'includes/acf/'; return $path; } public function update_acf_settings_dir( $dir ) { $dir = plugin_dir_url( __FILE__ ) . 'includes/acf/'; return $dir; } public function a11yStatement_include_local_acf() { if (! class_exists('ACF') ) { add_filter( 'acf/settings/path', array( $this, 'update_acf_settings_path' ) ); add_filter( 'acf/settings/dir', array( $this, 'update_acf_settings_dir' ) ); add_filter( 'acf/settings/show_admin', '__return_false' ); include_once( plugin_dir_path( __FILE__ ) . 'includes/acf/acf.php' ); } } public function a11yStatement_setup_acf_fields() { $a11y_page_id = get_option( 'a11yStatement_post_id' ); $this->a11yStatement_register_acf($a11y_page_id); } public function a11yStatement_register_acf($post_id) { if( function_exists('acf_add_local_field_group') ): acf_add_local_field_group(array( 'key' => 'group_611d155fba545', 'title' => 'Piekļūstamības paziņojums', 'fields' => array( array( 'key' => 'field_611d158c5cbbd', 'label' => 'Piekļūstamības paziņojums', 'name' => 'accessibilityStatement', 'type' => 'group', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'layout' => 'block', 'sub_fields' => array( array( 'key' => 'field_611d18545cbc1', 'label' => 'Par izvērtējumu', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'placement' => 'top', 'endpoint' => 0, ), array( 'key' => 'field_6193cf343f571', 'label' => 'Pirmie soļi', 'name' => '', 'type' => 'message', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'message' => 'Lai izveidotu piekļūstamības paziņojumu, Jums vispirms nepieciešams veikt lapas izvērtējumu pēc VARAM vadlīnijām.', 'new_lines' => 'wpautop', 'esc_html' => 0, ), array( 'key' => 'field_611d16665cbbe', 'label' => 'Izvērtējuma veicējs', 'name' => 'a11yAuthor', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_611d17fb5cbbf', 'label' => 'Izvērtējuma ziņojuma fails', 'name' => 'a11yAcceptDocument', 'type' => 'file', 'instructions' => 'Rediģējams izvērtēšanas protokola piemērs lejupielādei. Rediģējams izvērtēšanas protokola sagatave lejupielādei.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'return_format' => 'array', 'library' => 'all', 'min_size' => '', 'max_size' => '', 'mime_types' => '', ), array( 'key' => 'field_611d182b5cbc0', 'label' => 'Pēdējais izvērtējuma datums', 'name' => 'a11yEvaluationDate', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'display_format' => 'd.m.Y', 'return_format' => 'd/m/Y', 'first_day' => 1, ), array( 'key' => 'field_611d200a5b9bf', 'label' => 'Izvērtējuma rezultāti', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'placement' => 'top', 'endpoint' => 0, ), array( 'key' => 'field_611d2c7d9252b', 'label' => 'Izvērtējuma rezultātā secinātais', 'name' => 'a11yEvaluationFits', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'choices' => array( 'tīmekļvietne pilnīgi atbilst MK noteikumiem Nr. 445' => 'tīmekļvietne pilnīgi atbilst MK noteikumiem Nr. 445', 'tīmekļvietne daļēji atbilst MK noteikumiem Nr. 445' => 'tīmekļvietne daļēji atbilst MK noteikumiem Nr. 445', ), 'allow_null' => 0, 'other_choice' => 0, 'default_value' => '', 'layout' => 'vertical', 'return_format' => 'value', 'save_other_choice' => 0, ), array( 'key' => 'field_611d1f1fa2100', 'label' => 'Konstatētās neatbilstības', 'name' => 'a11yNonComplianceList', 'type' => 'wysiwyg', 'instructions' => '', 'required' => 0, 'conditional_logic' => array( array( array( 'field' => 'field_611d2c7d9252b', 'operator' => '==', 'value' => 'tīmekļvietne daļēji atbilst MK noteikumiem Nr. 445', ), ), ), 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 1, 'delay' => 0, ), array( 'key' => 'field_611d1f64a2102', 'label' => 'Kādas ir nepiekļūstamā satura alternatīvas?', 'name' => 'whatAreAlternativesToNonAccessableContent', 'type' => 'wysiwyg', 'instructions' => 'Kā citādi tiks nodrošināts, ka lietotājs tiek pie nepiekļūstamā satura?', 'required' => 0, 'conditional_logic' => array( array( array( 'field' => 'field_611d2c7d9252b', 'operator' => '==', 'value' => 'tīmekļvietne daļēji atbilst MK noteikumiem Nr. 445', ), ), ), 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0, 'delay' => 0, ), array( 'key' => 'field_611d189c5cbc2', 'label' => 'Kontakti', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'placement' => 'top', 'endpoint' => 0, ), array( 'key' => 'field_611e1c9760c2d', 'label' => 'Lūdzu ievadiet', 'name' => '', 'type' => 'message', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'message' => 'Ar ko sazināties par piekļūstamības problēmām?', 'new_lines' => 'wpautop', 'esc_html' => 0, ), array( 'key' => 'field_611d18d15cbc3', 'label' => 'E-pasts', 'name' => 'a11yMail', 'type' => 'email', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', ), array( 'key' => 'field_611d18e45cbc4', 'label' => 'Tālrunis', 'name' => 'a11yPhone', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_611d19065cbc5', 'label' => 'Cits saziņas veids', 'name' => 'a11yOtherContacts', 'type' => 'textarea', 'instructions' => 'Piem., Twitter, Linkedin u.tml.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => '', 'new_lines' => '', ), array( 'key' => 'field_611d191b5cbc6', 'label' => 'Cik ilgā laikā tiks sniegta atbilde?', 'name' => 'a11yTime', 'type' => 'text', 'instructions' => 'Piem., 5 darba dienu laikā', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_611d19305cbc7', 'label' => 'Sūdzības', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'placement' => 'top', 'endpoint' => 0, ), array( 'key' => 'field_611d1d418ccc2', 'label' => 'Kam iestādes iekšienē var iesniegt sūdzību? (vārds, uzvārds, amats, kontakti)', 'name' => 'a11yComplaints', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => '', 'new_lines' => 'br', ), array( 'key' => 'field_611d1d5c8ccc3', 'label' => 'Kam Jūsu pārraugošajā iestādē var iesniegt sūdzību? (ja attiecināms)', 'name' => 'a11ySupervisoryAuthorityComplaints', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => '', 'new_lines' => 'br', ), array( 'key' => 'field_611d1d808ccc4', 'label' => 'Par ziņojumu', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'placement' => 'top', 'endpoint' => 0, ), array( 'key' => 'field_611d1d9c8ccc5', 'label' => 'Paziņojuma pirmreizējās sagatavošanas datums', 'name' => 'a11yFirstNotify', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'display_format' => 'd.m.Y', 'return_format' => 'm/d/Y', 'first_day' => 1, ), array( 'key' => 'field_611d1dd08ccc6', 'label' => 'Vai paziņojums pārskatīts atkārtoti?', 'name' => 'HasStatementBeenReReviewed', 'type' => 'true_false', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'message' => '', 'default_value' => 0, 'ui' => 1, 'ui_on_text' => 'Jā', 'ui_off_text' => 'Nē', ), array( 'key' => 'field_611d1e068ccc7', 'label' => 'Paziņojuma atkārtotas pārskatīšanas datums', 'name' => 'a11yRepeatedNotify', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => array( array( array( 'field' => 'field_611d1dd08ccc6', 'operator' => '==', 'value' => '1', ), ), ), 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'display_format' => 'd.m.Y', 'return_format' => 'm/d/Y', 'first_day' => 1, ), array( 'key' => 'field_611d1e2d8ccc8', 'label' => 'Paziņojuma apstiprinājs (vārds uzvārds)', 'name' => 'a11yApprovedBy', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array( 'key' => 'field_611d1e508ccc9', 'label' => 'Apstiprinātāja amats', 'name' => 'a11yApprovedByJobtitle', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), ), ), ), 'location' => array( array( array( 'param' => 'page', 'operator' => '==', 'value' => $post_id, ), ), ), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array( 0 => 'the_content', 1 => 'excerpt', 2 => 'discussion', 3 => 'comments', 4 => 'revisions', 5 => 'author', 6 => 'format', 7 => 'page_attributes', 8 => 'featured_image', 9 => 'categories', 10 => 'tags', 11 => 'send-trackbacks', ), 'active' => true, 'description' => '', 'show_in_rest' => 0, )); endif; } public function a11yStatement_create_post() { $post = array( 'post_content' => '', 'post_title' => 'Piekļūstamības paziņojums', 'post_status' => 'publish', 'post_type' => 'page' ); $inserted_post_id = wp_insert_post( $post ); return $inserted_post_id; } public function a11yStatement_set_post_default_values($post_id) { update_post_meta( $post_id, 'accessibilityStatement_a11yEvaluationFits', 'tīmekļvietne daļēji atbilst MK noteikumiem Nr. 445' ); update_post_meta( $post_id, 'accessibilityStatement_a11yNonComplianceList', '
[blog_name] apņemas veidot savu tīmekļvietni piekļūstamu saskaņā ar Ministru kabineta 2020. gada 14. jūlija noteikumiem Nr. 445 "Kārtība, kādā iestādes ievieto informāciju internetā" (turpmāk – noteikumi Nr. 445).
Šis piekļūstamības paziņojums attiecas uz [blog_name_and_link]
Tīmekļvietnei veikts Vienkāršotais izvērtējums. Izmantotā metode - VARAM sagatavotās “Vadlīnijas iestāžu tīmekļvietnēm noteikto piekļūstamības prasību ievērošanas ietekmes izvērtēšanai un nesamērīgā sloga pamatošanai”.
[blog_link] [a11y_Evaluation_Fits]
[a11y_Non_Compliance_List]Šī tīmekļvietne pēdējo reizi tika izvērtēta [evaluation_date]. Izvērtēšanu veica [a11y_author].
Izvērtējumu apliecinošs dokuments: [accept_document].
[what_Are_Alternatives_To_Non_Accessable_Content]Mēs nepārtraukti cenšamies uzlabot šīs tīmekļvietnes piekļūstamību.
Ja Jūs konstatējat kādas problēmas vai nepilnības, kas nav minētas šajā paziņojumā vai vēlaties saņemt nepiekļūstamo saturu citā formātā, sazinieties ar mums:
E-pastā: [contact_mail]
Zvaniet: [contact_phone]
[other_contacts]
Mēs izskatīsim Jūsu pieprasījumu un sniegsim atbildi [response_time].
[complaints]
Ja neesam atbilstoši reaģējuši uz Jūsu iesniegumu vai sūdzību par tīmekļvietnes satura piekļūstamību, Jums ir iespēja iesniegt sūdzību Latvijas Republikas Tiesībsargam:
Tiesībsarga birojs: Baznīcas iela 25 Rīgā, LV-1010
Tālrunis: +37167686768
E-pasts: tiesibsargs@tiesibsargs.lv
https://www.tiesibsargs.lv/lv/pages/kontaktinformacija
Šis paziņojums pirmo reizi tika sagatavots [first_notify].
[has_statement_been_rereviewed]Šo paziņojumu apstiprināja [approved_by_name] [approved_by_job_title].