This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Ad Zone Manager - Test examples | |
| * Making it easier to manage advertising snippets in Wordpress | |
| */ | |
| /** | |
| * Register your Ad Zones | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $script = 'http://ad.doubleclick.net/adj/%site_name%/%ad_zone%;s1=%ad_zone%;s2=;pid=[unique_page_id];fold=atf;kw=;test=;ltv=ad;pos=top;dcopt=ist;tile=1;sz=300x250;ord=%page_random%?'; | |
| $where = array( | |
| 'is_search' => true, | |
| 'query_include' => 'apple', | |
| ); | |
| $url_vars = array( | |
| 'site_name' => 'ltv.witi.home', | |
| 'ad_zone' => 'homepage', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'acm_output_html', function( $html ) { | |
| return '<img src="%url%" />'; | |
| }); | |
| add_action( 'after_setup_theme', 'db_register_ad_codes' ); | |
| function db_register_ad_codes() { | |
| $ad_codes = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'redirect_canonical', 'grist_disable_redirect_for_full_pall', 10, 2 ); | |
| function grist_disable_redirect_for_full_pall( $redirect_url, $requested_url ) { | |
| $url_endings = array( | |
| 'full', | |
| 'pall', | |
| ); | |
| if ( is_singular() && in_array( trim( strtolower( substr( $requested_url, -5 ) ), '/' ), $url_endings ) ) | |
| return trailingslashit( $requested_url ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * A quick snippet to indicate how you might be able to populate Edit Flow editorial metadata fields when creating a new post | |
| * Please keep in mind: I haven't tested this code, so it may need a bit of fixing before it actually works | |
| * | |
| * @see http://wordpress.org/support/topic/plugin-edit-flow-auto-populate-editorial-metadata-using-wp_insert_post | |
| */ | |
| // ... All of your form processing to prepare the data for wp_insert_post() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* Plugin Name: Grist Authors | |
| * Description: Handles a special 'Author' post type and co-authors for posts. | |
| * Author: Andrew Nacin | |
| * Author URI: http://andrewnacin.com/ | |
| */ | |
| class Grist_Authors { | |
| static function init() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Include posts from authors in the search results where | |
| * either their display name or user login matches the query string | |
| * | |
| * @author danielbachhuber | |
| */ | |
| add_filter( 'posts_search', 'db_filter_authors_search' ); | |
| function db_filter_authors_search( $posts_search ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Output the value for an editorial metadata term | |
| * @see http://wordpress.org/support/topic/plugin-edit-flow-exporting-editorial-metadata | |
| */ | |
| function photo_credit() { | |
| global $edit_flow; | |
| // Don't cause any fatal errors if Edit Flow or editorial metadata are deactivated | |
| if ( !is_object( $edit_flow ) || $edit_flow->helpers->module_enabled( 'editorial-metadata' ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| === Ad Code Manager === | |
| Contributors: danielbachhuber, rinatkhaziev, automattic | |
| Tags: advertising, ad codes | |
| Requires at least: 3.1 | |
| Tested up to: 3.3.1 | |
| Stable tag: 0.1 | |
| Manage your ad codes through the WordPress admin in a safe and easy way. | |
| == Description == |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Don't load caps on install for WP.com. Instead, let's add | |
| * them with the WP.com + core caps approach | |
| */ | |
| add_filter( 'ef_kill_add_caps_to_role', '__return_true' ); | |
| add_filter( 'ef_view_calendar_cap', function() { return 'edit_posts'; } ); | |
| add_filter( 'ef_view_story_budget_cap', function() { return 'edit_posts'; } ); | |
| add_filter( 'edit_post_subscriptions', function() { return 'edit_others_posts'; } ); | |
| add_filter( 'edit_usergroups', function() { return 'manage_options'; } ); |