100000
));
$allPages = get_pages();
echo '';
$types = array(
'POST_TITLE' => array(
'title' => esc_html__('Post Title', 'better-analytics'),
'disabled' => (count($allPosts) == 0 || !current_user_can('edit_posts'))
),
'PAGE_TITLE' => array(
'title' => esc_html__('Page Title', 'better-analytics'),
'disabled' => (count($allPages) == 0 || !current_user_can('edit_pages'))
),
'CSS' => array(
'title' => esc_html__('CSS', 'better-analytics'),
'disabled' => !current_user_can('edit_themes')
),
'THEME' => array(
'title' => esc_html__('Theme', 'better-analytics'),
'disabled' => !current_user_can('switch_themes')
),
);
$types = apply_filters('better_analytics_experiment_types', $types);
foreach ($types as $key => $type)
{
echo '' . htmlentities($type['title']) . ' ';
}
echo ' ';
?>
';
foreach ($allPosts as $post)
{
$postId = 0;
if (!empty($experiment['extraData']['post_title']) && !empty($experiment['extraData']['post_title']['post_id']))
{
$postId = empty($experiment['extraData']['page_title']['post_id']) ? 0 : $experiment['extraData']['page_title']['post_id'];
}
echo 'ID == $postId ? ' selected="selected"' : '') . '>' . htmlentities($post->post_title) . ' ';
}
unset($allPosts);
echo '';
?>
$variation)
{
echo ' ';
if (!$readOnly)
{
echo ' ';
}
echo ' ';
}
}
else
{
echo ' ';
if (!$readOnly)
{
echo ' ';
}
echo ' ';
}
?>
' . esc_html__('Add another title variation', 'better-analytics') . '';
}
?>
';
foreach ($allPages as $page)
{
$postId = 0;
if (!empty($experiment['extraData']['page_title']) && !empty($experiment['extraData']['page_title']['post_id']))
{
$postId = $experiment['extraData']['page_title']['post_id'];
}
echo 'ID == $postId ? ' selected="selected"' : '') . '>' . htmlentities($page->post_title) . ' ';
}
unset($allPages);
echo '';
?>
$variation)
{
echo ' ';
if (!$readOnly)
{
echo ' ';
}
echo ' ';
}
}
else
{
echo ' ';
if (!$readOnly)
{
echo ' ';
}
echo ' ';
}
?>
' . esc_html__('Add another title variation', 'better-analytics') . '';
}
?>