-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow alternate chatper titles allow stories to be author-exclusive allow TOC/next/prev to show or not show on chapter pages
- Loading branch information
1 parent
0e02fd1
commit eb415ef
Showing
8 changed files
with
217 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
// run after cpts have been registered | ||
add_action( 'init', 'mbds_update_versions', 30 ); | ||
function mbds_update_versions() { | ||
|
||
$current_version = get_option(MBDS_PLUGIN_VERSION_KEY); | ||
|
||
if ($current_version == '') { | ||
$current_version = '1.2.3'; | ||
} | ||
|
||
if (version_compare($current_version, '1.3', '<')) { | ||
// upgrade to 1.3 script | ||
// add new retailers | ||
mbds_upgrade_to_1_3(); | ||
} | ||
|
||
update_option(MBDS_PLUGIN_VERSION_KEY, MBDS_PLUGIN_VERSION); | ||
|
||
} | ||
|
||
function mbds_upgrade_to_1_3() { | ||
$stories = mbds_get_story_list( true ); | ||
foreach ( $stories as $story_id => $story ) { | ||
if ( $story_id != 0 ) { | ||
update_post_meta( $story_id, '_mbds_open_story', 'yes' ); | ||
} | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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