What has happened???? New version of PPP worthless to me
-
Ever since your last update the admin printout of popular posts activity is completely worthless to me. Why would you spread the graph across the entire page so far that each point is spread an inch? It’s bizarre to read – did you forget that some people actually have desktop screens?
Additionally, making every entry in the posts list take up an inch is worthless. Only 10 entries (out of over 100) show up on the screen and now I must scroll endlessly. Only ONE typewritten line is PLENTY for every post on the list, all the rest of the formatting just makes using the list miserable.
And, lastly, you helped me with the code that allowed me to create a function which allowed me to add a column (showing if custom field was set or not – ACF) to the printout and include a link to be able to edit the page – all of that is gone now. [I know your warnings about styling being changed with upgraded and we should avoid that so I put the code in a functions plugin that doesn’t’ get overwritten; but – it seems the hooks have changed too because none of that works anymore.
Am I just S.O.L. now or is it a bug you are working on or is there a workaround? I’d be happy if I could just revert back to the previous version which was working well – I’m not shure what or why you changed it. thanks DJ
My existing code – WPPP supplied:
/********************************************************************/ /* Alter the WP popular posts plugin's stat page to include */ /* additional fields: views, date published and has_ad custom */ /* field */ /* (Taken from WPPP forum pages - help from Hector Cabrera, author) */ /* */ /********************************************************************/ function custom_wppp_list_fields( $post_html, $p, $instance ){ $stats = ''; // placeholder for the stats tag // Pageviews option checked, display views if ( $instance['stats_tag']['views'] ) { // If sorting posts by average views if ($instance['order_by'] == 'avg') { // display text in singular or plural, according to views count $stats = '<span class="wpp-views">' . sprintf( _n('1 view per day', '%s views per day', intval($p->pageviews), 'wordpress-popular-posts'), number_format_i18n($p->pageviews, 2) ) . '</span>'; } else { // Sorting posts by views // display text in singular or plural, according to views count $stats = '<span class="wpp-views">' . sprintf( _n('1 view', '%s views', intval($p->pageviews), 'wordpress-popular-posts'), number_format_i18n($p->pageviews) ) . '</span>'; } } // builds the output for each line of WPP stat listing $output = '<li>'; // the title and link $output .= '<a>id) . '" class="my-custom-title-class" title="' . esc_attr($p->title) . '">' . $p->title . '</a> '; // wpp's normal stat fields $output .= '<span class="wppp-stats"> <em> ' . $stats . ' </em></span> '; // the post's date published $output .= '<span class="my-custom-date-class"> (' . date( 'Y-m-d', strtotime($p->date) ) . ') </span>'; // the 'has_ad' custom field I've set up already IF checked if(get_field('has_ad', $p->id) ) { //this is the way ACF gets the custom field data $output .= ' <strong class="ad-box"> [Ad]</strong> '; } // a 'link' button to edit the selected post **HARD CODED URL may need changing** $output .= '<a>id . '&action=edit" target="_blank"><sup>Edit</sup></a>'; $output .= '</li>'; return $output; } add_filter( 'wpp_post', 'custom_wppp_list_fields', 10, 3 ); /*********************************************************************/ /* adds styling for worpress popular posts plugin inside admin head */ /*********************************************************************/ function WPP_styling() { echo '<style type="text/css"> .ad-box {color: #800000;}</style>'; } add_action( 'admin_head', 'WPP_styling' ); // $purl = '/* ' . plugins_url( 'wpp.css', __FILE__ ) . '*/'; echo $purl;
- The topic ‘What has happened???? New version of PPP worthless to me’ is closed to new replies.