Skip to content

Commit

Permalink
Merge pull request #285 from PressForward/3.1.x
Browse files Browse the repository at this point in the history
3.1.1.1 - pre-release for test.
  • Loading branch information
AramZS committed May 20, 2014
2 parents 2ceabab + cd52c50 commit 8582e85
Show file tree
Hide file tree
Showing 20 changed files with 1,212 additions and 71 deletions.
Empty file added .gitmodules
Empty file.
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,30 @@ php:
env:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
- WP_VERSION=3.5.1 WP_MULTISITE=0
- WP_VERSION=3.5.1 WP_MULTISITE=1
- WP_VERSION=3.6.1 WP_MULTISITE=0
- WP_VERSION=3.6.1 WP_MULTISITE=1
- WP_VERSION=3.7.1 WP_MULTISITE=0
- WP_VERSION=3.7.1 WP_MULTISITE=1
- WP_VERSION=3.8.1 WP_MULTISITE=0
- WP_VERSION=3.8.1 WP_MULTISITE=1
- WP_VERSION=3.9.1 WP_MULTISITE=0
- WP_VERSION=3.9.1 WP_MULTISITE=1

before_install:
- git submodule update --init --recursive

before_script:
# set up WP install
- WP_CORE_DIR=/tmp/wordpress/
- mkdir -p $WP_CORE_DIR
- wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
- tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
# set up testing suite
- export WP_TESTS_DIR=/tmp/wordpress-tests/
- svn co --ignore-externals --quiet http://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR
- cd $WP_TESTS_DIR
- export WP_DEVELOP_DIR=/tmp/wordpress-develop/
- git clone git://develop.git.wordpress.org/trunk/ $WP_DEVELOP_DIR
- cd $WP_DEVELOP_DIR
- export WP_CORE_DIR=/tmp/wordpress-develop/src/
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
- sed -i "s/yourdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- cat wp-tests-config.php
- cd -
# set up database
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
Expand Down
14 changes: 12 additions & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ visibility:hidden;
.item_title {
margin-bottom: 3px;
line-height: 16px;
overflow:hidden;
}

.grid .item_title {
height: 63px;
}

.source_title {
line-height: 1.5em;
line-height: 1.5em;
overflow:hidden;
}

.grid .source_title {
Expand All @@ -124,12 +126,15 @@ visibility:hidden;

.pf-btns {
margin: 0 0;
font-size: 0;
vertical-align: middle;
}

.pf-btns .btn {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0
border-radius: 0;
margin: 0;
}

.actions form {
Expand Down Expand Up @@ -193,6 +198,7 @@ h3 {
color: #494949;
font-family: sans-serif;
padding: 3px;
overflow:hidden;
}

.grid .feed-item .item_excerpt {
Expand Down Expand Up @@ -254,6 +260,10 @@ h3 {
border-bottom: 1px solid #E7E7E7;
}

#tools .alert-box {
word-wrap: break-word;
}

.pf-opt-group .postbox{
float:left;
width: 45%;
Expand Down
8 changes: 7 additions & 1 deletion assets/js/scroll-imp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions assets/js/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ function commentPopModal(){
function reshowModal(){
jQuery('.pf_container').on('shown', '.modal.pfmodal', function(evt){
jQuery('#wpadminbar').hide();
jQuery('#adminmenuback').hide();
jQuery('#adminmenuwrap').hide();
var element = jQuery(this);
var modalID = element.attr('id');
document.body.style.overflow = 'hidden';
Expand Down Expand Up @@ -151,6 +153,8 @@ function hideModal(){
jQuery('.pf_container').on('hide', ".modal.pfmodal", function(evt){
jQuery(".pfmodal .modal-comments").html('');
jQuery('#wpadminbar').show();
jQuery('#adminmenuback').show();
jQuery('#adminmenuwrap').show();
document.body.style.overflow = 'visible';
});
}
Expand Down
76 changes: 58 additions & 18 deletions includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,10 @@ public function toolbox($slug = 'allfeed', $version = 0, $deck = false){
?>

<button type="submit" class="delete btn btn-danger pull-right" id="deletefeedarchive" value="<?php _e('Delete all items', 'pf'); ?>" ><?php _e('Delete all items', 'pf'); ?></button>
<button type="submit" class="delete btn btn-info pull-right" id="showMyNominations" value="<?php _e('Show my nominations', 'pf'); ?>" ><?php _e('Show my nominations', 'pf'); ?></button>
<button type="submit" class="delete btn btn-info pull-right" id="showMyStarred" value="<?php _e('Show my starred', 'pf'); ?>" ><?php _e('Show my starred', 'pf'); ?></button>
<?php
if (isset($_GET['by'])){
?><button type="submit" class="delete btn btn-info pull-right" id="showNormal" value="<?php _e('Show all', 'pf'); ?>" ><?php _e('Show all', 'pf'); ?></button><?php
}
?>
<?php
} elseif ($slug == 'toplevel_page_pf-menu' && $version >= 0) {
?>
<button type="submit" class="delete btn btn-info pull-right" id="showMyNominations" value="<?php _e('Show my nominations', 'pf'); ?>" ><?php _e('Show my nominations', 'pf'); ?></button>
<button type="submit" class="delete btn btn-info pull-right" id="showMyStarred" value="<?php _e('Show my starred', 'pf'); ?>" ><?php _e('Show my starred', 'pf'); ?></button>
<?php
if (isset($_GET['by'])){
?><button type="submit" class="delete btn btn-info pull-right" id="showNormal" value="<?php _e('Show all', 'pf'); ?>" ><?php _e('Show all', 'pf'); ?></button><?php
}
?>

<?php
} elseif ( $slug == 'pressforward_page_pf-review' && (get_bloginfo('version') >= 3.7) && $version >= 0 && current_user_can(pf_get_defining_capability_by_role('administrator'))){
?>
Expand All @@ -330,6 +317,19 @@ public function toolbox($slug = 'allfeed', $version = 0, $deck = false){
<p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( pf_get_shortcut_link() ); ?></textarea></p>
</div>
</div>
<div class="alert-box">
<h3><span>Feed Problems</span></h3>
<div class="inside">
<?php
add_filter('ab_alert_specimens_post_types', array($this, 'alert_filterer'));
add_filter('ab_alert_safe', array($this, 'alert_safe_filterer'));
the_alert_box()->alert_box_outsides();
remove_filter('ab_alert_safe', array($this, 'alert_safe_filterer'));
remove_filter('ab_alert_specimens_post_types', array($this, 'alert_filterer'));
?>
</div>
</div>

</div>
<?php
}
Expand Down Expand Up @@ -687,7 +687,7 @@ public function form_of_an_item($item, $c, $format = 'standard', $metadata = arr

</div>
</div>
<h3 id="modal-<?php echo $item['item_id']; ?>-label" class="modal_item_title source_title"><?php echo $item['item_title']; ?></h3>
<h3 id="modal-<?php echo $item['item_id']; ?>-label" class="modal_item_title"><?php echo $item['item_title']; ?></h3>
</div>
<div class="row-fluid modal-body-row">
<div class="modal-body span9" id="modal-body-<?php echo $item['item_id']; ?>">
Expand Down Expand Up @@ -774,6 +774,9 @@ public function display_reader_builder() {
$pageNumForPrint = sprintf( __('Page %1$d', 'pf'), $page);
echo '<span> - ' . $pageNumForPrint . '</span>';
}
if (!empty($_POST['search-terms'])){
echo ' | <span class="search-term-title">' . __('Search for:', 'pf') . ' ' . $_POST['search-terms'] . '</span>';
}
?>
<span id="h-after"> &#8226; </span>
<button type="submit" class="refreshfeed btn btn-small" id="refreshfeed" value="<?php _e('Refresh', 'pf') ?>"><?php _e('Refresh', 'pf'); ?></button>
Expand All @@ -799,10 +802,30 @@ public function display_reader_builder() {

<?php echo '<button type="submit" class="btn btn-small feedsort" id="sortbyitemdate" value="' . __('Sort by item date', 'pf') . '" >' . __('Sort by item date', 'pf') . '</button>';
echo '<button type="submit" class="btn btn-small feedsort" id="sortbyfeedindate" value="' . __('Sort by date entered feed', 'pf') . '">' . __('Sort by date entered feed', 'pf') . '</button>'; ?>
<button type="submit" class="btn btn-info pull-right btn-small" id="showMyNominations" value="<?php _e('Show my nominations', 'pf'); ?>" ><?php _e('Show my nominations', 'pf'); ?></button>
<button type="submit" class="btn btn-info pull-right btn-small" id="showMyStarred" value="<?php _e('Show my starred', 'pf'); ?>" ><?php _e('Show my starred', 'pf'); ?></button>
<?php
if (isset($_GET['by'])){
?><button type="submit" class="btn btn-info btn-small pull-right" id="showNormal" value="<?php _e('Show all', 'pf'); ?>" ><?php _e('Show all', 'pf'); ?></button><?php
}
?>
</div>
<div class="pull-right text-right">
<!-- or http://thenounproject.com/noun/list/#icon-No9479? -->
<a class="btn btn-small" id="gomenu" href="#">Menu <i class="icon-tasks"></i></a>
<?php
add_filter('ab_alert_specimens_post_types', array($this, 'alert_filterer'));
add_filter('ab_alert_safe', array($this, 'alert_safe_filterer'));
$alerts = the_alert_box()->get_specimens();
remove_filter('ab_alert_safe', array($this, 'alert_safe_filterer'));
remove_filter('ab_alert_specimens_post_types', array($this, 'alert_filterer'));

if ((0 != $alerts->post_count) || !empty($alerts)){
echo '<a class="btn btn-small btn-warning" id="gomenu" href="#">' . __('Menu', 'pf') . ' <i class="icon-tasks"></i> (!)</a>';
} else {
echo '<a class="btn btn-small" id="gomenu" href="#">' . __('Menu', 'pf') . ' <i class="icon-tasks"></i></a>';
}
?>

</div>
</div><!-- End btn-group -->

Expand Down Expand Up @@ -927,6 +950,16 @@ function display_options_builder() {
echo '<label class="description" for="pf_link_to_source"> ' .__('Seconds to redirect user to source. (0 means no redirect)', 'pf'). ' </label>';
?></p>

<p>
<?php
$default_pf_use_advanced_user_roles = get_option('pf_use_advanced_user_roles', 'no');
?>
<select id="pf_use_advanced_user_roles" name="pf_use_advanced_user_roles">
<option value="yes" <?php if ($default_pf_use_advanced_user_roles == 'yes'){ echo 'selected="selected"'; }?>>Yes</option>
<option value="no" <?php if ($default_pf_use_advanced_user_roles == 'no'){ echo 'selected="selected"'; }?>>No</option>
</select>
<label class="description" for="pf_use_advanced_user_roles"> <?php _e('Use advanced user role management? (May be needed if you customize user roles or capabilities).', 'pf'); ?> </label>
</p>
<p><?php
$default_pf_present_author_value = get_option('pf_present_author_as_primary', 'yes');
?>
Expand Down Expand Up @@ -1250,8 +1283,15 @@ function pf_options_admin_page_save() {
update_option('pf_present_author_as_primary', $pf_author_opt_check);
} else {
update_option('pf_present_author_as_primary', 'no');
}

}

if (isset( $_POST['pf_use_advanced_user_roles'] )){
$pf_author_opt_check = $_POST['pf_use_advanced_user_roles'];
//print_r($pf_links_opt_check); die();
update_option('pf_use_advanced_user_roles', $pf_author_opt_check);
} else {
update_option('pf_use_advanced_user_roles', 'no');
}

do_action( 'pf_admin_op_page_save' );
}
Expand Down
Loading

0 comments on commit 8582e85

Please sign in to comment.