';
echo '
' . __('Accessibility', 'accessibility-light') . '
';
echo '';
echo '' . __('Opening WordPress sites to people with disabilites', 'accessibility-light') . '
';
echo '';
}
function acl_sitelinx_sections( $page ) {
global $wp_settings_sections, $wp_settings_fields;
if ( ! isset( $wp_settings_sections[$page] ) )
return;
foreach ( (array) $wp_settings_sections[$page] as $section ) {
if ( $section['callback'] )
call_user_func( $section['callback'], $section );
if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
continue;
$class = ($section['id'] === 'sitelinx_general') ? 'active' : '';
echo '';
echo '';
do_settings_fields( $page, $section['id'] );
echo '
';
echo '';
submit_button();
}
}
function acl_sitelinx_create_field($page, $section) {
var_dump($page);
global $wp_settings_fields;
if ( ! isset( $wp_settings_fields[$page][$section] ) )
return;
foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
$class = '';
if ( ! empty( $field['args']['class'] ) ) {
$class = ' class="' . esc_attr( $field['args']['class'] ) . '"';
}
echo "";
if ( ! empty( $field['args']['label_for'] ) ) {
echo '
';
} else {
echo '
' . $field['title'] . '
';
}
echo '
';
call_user_func($field['callback'], $field['args']);
echo '
';
echo '
';
}
}
add_action( 'admin_footer', 'acl_sitelinx_media_selector_print_scripts' );
function acl_sitelinx_media_selector_print_scripts() {
$current_screen = get_current_screen();
/* Check wether this page is accessiblity or not if yes please add the scripts */
if( $current_screen->id === "toplevel_page_accessible-sitelinx" ){
$my_saved_attachment_post_id = get_option( 'media_selector_attachment_id', 0 );
?>