Explanation of Use', 'More Plugins', 'Elegant Themes' ); $links = array_merge( $links, $new_links ); } return $links; } add_filter( 'plugin_row_meta', 'alobaidi_archive_page_plugin_row_meta', 10, 2 ); // Include shortcodes page include(plugin_dir_path(__FILE__).'/shortcodes-page.php'); // check if blog posts equal 1 or more than 1 function ch_more_than_1_post(){ $count_posts = wp_count_posts(); $get_posts_count = $count_posts->publish; return $get_posts_count >= 1; } // check if blog pages equal 1 or more than 1 function ch_more_than_1_page(){ $count_pages = wp_count_posts('page'); $get_pages_count = $count_pages->publish; return $get_pages_count >= 1; } // get latest posts function obi_get_latest_posts($posts_number = '10'){ $latest_post_args = array( 'numberposts' => $posts_number, 'post_type' => 'post', 'post_status' => 'publish' ); $recent_posts = wp_get_recent_posts( $latest_post_args ); $html = ''; foreach( $recent_posts as $recent ){ $html .= '
  • '.$recent["post_title"].'
  • '; } return $html; } // get tags list function obi_get_tags_list($tags_number = '10'){ $tags = get_tags("orderby=count&hide_empty=1&number=$tags_number"); $html = ''; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); $html .= "
  • {$tag->name}
  • "; } return $html; } // daily archive shortcode function obi_daily_archive( $atts, $content = null ){ extract( shortcode_atts( array( "number" => '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Daily Archive', // default title is Daily Archive. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_get_archives( array( 'type' => 'daily', 'limit' => $number, 'echo' => 0 ) ); $result .= ""; return $result; ?> '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Monthly Archive', // default title is Monthly Archive. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_get_archives( array( 'type' => 'monthly', 'limit' => $number, 'echo' => 0 ) ); $result .= ""; return $result; ?> '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Yearly Archive', // default title is Yearly Archive. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_get_archives( array( 'type' => 'yearly', 'limit' => $number, 'echo' => 0 ) ); $result .= ""; return $result; ?> '10', // default is 10 posts. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Latest Posts', // default title is Latest Posts. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= obi_get_latest_posts($number); $result .= ""; return $result; ?> '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Categories', // default title is Categories. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_list_categories("title_li=0&number=$number&echo=0"); $result .= ""; return $result; ?> '10', // default is 10 tags. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Tags', // default title is Tags. ),$atts ) ); ?> = 1 ) : ?> $title"; $result .= "<$list>"; $result .= obi_get_tags_list($number); $result .= ""; return $result; ?> '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'My Pages', // default title is My Pages. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_list_pages("title_li=0&number=$number&echo=0"); $result .= ""; return $result; ?> '', // default is no limit. "heading" => 'h3', // default is

    . "list" => 'ul', // default is unordered list . "title" => 'Authors', // default title is Authors. ),$atts ) ); ?> $title"; $result .= "<$list>"; $result .= wp_list_authors("hide_empty=1&show_fullname=1&style=list&optioncount=1&orderby=id&html=1&number=$number&echo=0"); $result .= ""; return $result; ?>