' . esc_html( get_the_title( $post_id ) ) . ''; $pages_generated_info .= '
' . wp_kses( __( sprintf( 'The %s page has been created.', $link ), 'affiliates' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ) . '
'; } } } echo '

' . esc_html__( 'Generator', 'affiliates' ) . '

'; // // Generator form // echo '
' . '
' . '

' . esc_html__( 'Press the button to generate a default affiliate area.', 'affiliates' ) . ' ' . '' . wp_nonce_field( 'admin', AFFILIATES_ADMIN_SETTINGS_GEN_NONCE, true, false ) . '

' . $pages_generated_info . // @codingStandardsIgnoreLine '
' . '
'; echo '

'; echo esc_html__( 'The generated page contains Affiliates shortcodes and can be used as an out-of-the-box affiliate area or as a framework for customized affiliate areas and pages.', 'affiliates' ); echo '

'; // // Pages containing affiliates shortcodes // echo '

' . esc_html__( 'Pages', 'affiliates' ) . '

'; $post_ids = array(); // We also have [referrer], [referrer_id] and [referrer_user] but these are not essential in // determining whether an affiliate page has been set up. $posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_content LIKE '%[affiliates\_%' AND post_status = 'publish'" ); foreach( $posts as $post ) { $post_ids[] = $post->ID; } if ( count( $posts ) == 0 ) { echo '

'; echo esc_html__( 'It seems that you do not have any pages set up for your affiliates yet.', 'affiliates' ); echo '

'; echo '

'; echo esc_html__( 'You can use the page generation option to create the default affiliate area for your affiliates.', 'affiliates' ); echo '

'; } else { echo '

'; echo esc_html( _n( 'This page containing Affiliates shortcodes has been detected :', 'These pages containing Affiliates shortcodes have been detected :', count( $posts ), 'affiliates' ) ); echo '

'; $post_list = ''; echo $post_list; } echo '

'; esc_html_e( 'You can modify the default affiliate area and also create customized pages for your affiliates using shortcodes.', 'affiliates' ); echo '

'; echo '

'; echo wp_kses( __( 'Please refer to the Documentation for more details.', 'affiliates' ), array( 'a' => array( 'href' => array() ) ) ); echo '

'; affiliates_footer(); } }