|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////
' s8 |4 A5 e- a! Z5 C* i/ L// Theme Option$ R% m1 z8 @9 P% }
////////////////////////////////////////////////////////////////////////////////9 k3 i9 Z6 Q, Q- O; Z* z
, o2 J$ g' o# R/ M9 ?
$themename = "Zenx";
1 S9 m. t8 D% m1 q$shortname = str_replace(' ', '_', strtolower($themename));7 Y5 _ W% _3 |: W% l- b
* }( {9 y( F, t3 f1 _
function get_theme_option($option)
( K R6 }# L0 z L* w{2 ?4 h" o' {, a) G8 y
global $shortname;% | m! h, O# d- x' X
return stripslashes(get_option($shortname . '_' . $option));
6 @$ _. r; R; H" @}
0 E0 Z8 i* J7 ]' ?* _# P6 Q+ s, a$ Y& Z0 l) f
function get_theme_settings($option); \: g# R* P# J1 |, V( v0 b- O0 y, G
{4 \) p' k! e! w2 Y" h
return stripslashes(get_option($option));
! i$ k3 F$ H+ ]4 E( B}
1 d2 a5 P7 J" D& W, J, I$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
1 L, B2 d Q* r j% J$wp_getcat = array();$ m& o- d5 }% [) P; a. C
foreach ($wp_dropdown_rd_admin as $category_list) {7 U: o. i9 e' s3 l0 o& X" Q0 o
$wp_getcat[$category_list->term_id] = $category_list->name;
2 a; T* J/ `# i$ b}! U' A( ]% A; l% G; I
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
( M) ^) `3 E& u8 U! r2 U9 ?' X6 `$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");$ g# o$ A% n- E! n
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");4 A- O" a/ z- _- M0 j# B4 B# L
; E7 A- Y2 d" y' J5 S
$options = array (5 W4 O# j' q6 Z. f, ^9 ?
8 O3 R1 x6 f' S: Q5 D/ F
3 O: z3 ~" {& Y; G+ i8 ]" T
array( "name" => "Blog Header Settings", f4 W; B9 C& z
"type" => "heading",% A1 ?5 n) k) h6 ]9 A
),2 D* p0 K% w Q& O# }! U" V/ H
- G; G" _ Y) Z" M# w W! r array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",; s5 h* d, R& q# L" D' a; }
"id" => $shortname."_header_logo_activate",
/ d. r; d: J" Y( v I% U" ` "type" => "select",: b L* Y3 ^, L: M
"std" => "No"," s0 x7 q# Y( k% N: s: p
"options" => array("No", "Yes")),
c( Y2 }( t7 w9 p0 A. c. Q! ]/ ~- V: x7 K8 y; `/ ~2 {
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",% @# ^# I. i% `+ t2 p- r
"id" => $shortname."_logo_url",
8 j6 O3 n I3 d* b4 b p "type" => "text",, d% O7 S8 M1 [2 v; x9 ?% r- w8 G
"box" => "social",& d0 C/ ?- n7 D" s0 F5 A$ i
"std" => "",0 a) t1 R( |. l
)," ?' X- K2 I: |* q, {2 g& M' p
6 ~+ B5 V4 |# x$ K; C, j
array( "name" => "Insert Header Banner HTML Code (Header)- [: E) r# T3 R; l& p$ l
<br /><em>*Recommended Size 468 x 60</em>
5 T$ ~ D! ?* x4 m* l( P <br /><em>*leave blank if not use</em>",9 D: p+ X; P/ q
"id" => $shortname."_header_banner",
& r l9 P. y' I "type" => "textarea",+ h& G4 W7 g1 o( ~
"std" => "",/ ^: ^! f' p$ x+ d* Q, B) A g' q
),
% O7 ~; c! ~- s4 Y' J1 x# F
' q: V$ k9 ]$ Z5 u/ Q$ [- L array( "name" => "</div></div>",
4 L- Q& Z7 n, ?+ `( L8 r "type" => "close",! N+ ~- Z/ ]; A5 W
),: d$ k7 ~# T3 \6 r7 _2 @
+ x' r/ w* |2 Z4 b. u' N+ W5 W7 x! S4 ~4 q# ?, r
array( "name" => "Header Navigation Settings",
1 m g, d$ C8 E$ F! }. g: E "type" => "heading",
% H: H& @' Y! S* ?, ? ),# W$ e! F+ }* \
# w3 Q& b5 a2 j1 }
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
4 T/ w6 i, g) w, D! [# z# c2 h <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />! n( j8 I0 p$ K- w* ^6 W
<em>*Enter the page post ID number only</em><br /> y5 _! b' H3 s, b" O5 d1 x% J! }0 T+ G
<em>*separate by comma</em><br />
& Z0 m4 h/ ^3 A <em>*Exclude pages which you don't want to show on the header navigation</em>",! A& D3 G* k5 ?
"id" => $shortname."_header_page_navigation",5 j8 g. i3 E6 m6 \) F8 o6 }( l) e
"type" => "text",
! H6 {/ J' F E4 O8 R "std" => "",
; F/ E% K) G: f( m% l) q4 w, K ),
- V1 {; ]& w# I* ?0 i
2 ^, w8 A4 k3 V5 p( M8 \ array( "name" => "</div></div>",
. {3 T. h& e, h# W, B* b "type" => "close",6 o! R0 i6 N3 o$ |4 Y j
),1 Y( W0 ~7 _0 y
4 j' }, M0 c8 ~& R8 `
$ ?) e `2 g- `+ f0 M array( "name" => "Post Auto Thumbnails Settings",
6 f! A2 L3 u" A) n6 A( J3 C "type" => "heading",
. x* `4 ?" ?# r/ u% S+ s ),8 D! J. M2 X$ v3 V
4 `1 C9 @' j: O* Q5 H0 s$ C. l) ~ array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",6 {% Y X* ^! s- g6 Y
"id" => $shortname."_timthumb_activate",* n7 w" a6 q+ W; j2 O
"type" => "select",* {. f( o K* a- K# f
"std" => "No",
8 ^: n' ?6 o l* \4 T "options" => array("No", "Yes")),
! h' E+ [$ ~! ]1 A l) s6 F7 }: @9 X
" W( I O0 Y: |8 ^ array( "name" => "If Timthumb is enabled, Please choose its cropping method",! m, U. W% K4 d$ p5 k
"id" => $shortname."_timthumb_cropping",
3 i3 S+ U2 l: H. u3 I1 M7 U) U "type" => "select",( Q2 e( L6 X: D7 t* W
"std" => "",
/ A5 {* L" P- u0 u9 @: p9 B "options" => $crop_position),
1 s) r* @2 S' l; @# {4 q* Z
; }7 ~& `9 _8 h array( "name" => "Insert Width Of Thumbnail Image<br />
c. t! o3 m& Q# _ <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
. E6 @9 T" B" U+ [( s: ]/ w <em>*Leave Blank To Use Default: 250</em><br />",: E! a1 m8 t \ g5 s( O
"id" => $shortname."_thumb_width",
7 k. P) j$ m- ^0 g; |/ T, _ "type" => "text",
/ t8 A) m# \+ |) l3 u p "std" => "",
3 v8 i" M) \2 U ),
0 B7 }2 k+ s# N! u" G1 o6 W3 R- j8 e; G. |* ?) f
array( "name" => "Insert Height Of Thumbnail Image<br />
5 [+ B9 A. U# {2 P4 C# J <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
. }, V4 r$ ~. d# S) }- J <em>*Leave Blank To Use Default: 200</em><br />",
" S$ J+ p" Q2 J "id" => $shortname."_thumb_height",
l7 J( ]4 X# ?1 ` "type" => "text",- |* T1 J9 D6 y2 M
"std" => "",+ |- G6 w+ m4 a
),
* {9 N; j' q) n4 p4 \8 L; c" J% x8 P2 h0 ]% ^* c
array( "name" => "</div></div>",6 m2 E: Y9 ^* v( ~9 `2 Z9 e% Q+ j
"type" => "close",
9 j+ e" y! j' e ),
" p" f5 x& O- _
# a3 H, v6 d9 S! T0 P- j! [ array( "name" => "Featured Content Slider Settings",
# S0 w; f* [) ]' }" `+ @- e "type" => "heading",
8 _0 i7 q" E5 J6 ` ),$ C5 t7 i1 P- k
; [/ w/ H. Y8 B' w& s& @
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",9 G2 U' [4 I) y7 M
"id" => $shortname."_featured_activate",& Y4 X8 O9 n1 I$ X, S
"type" => "select",: @% W0 T) n# `2 T" L
"std" => "No",( m5 L" x! G8 o8 i* U
"options" => array("No", "Yes")),
4 K% d5 t1 M& `* q; g5 `8 G" _" ]% B, T& p# |
; N/ W8 s9 v% C- N1 k X array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
- d" q! }. r7 D0 o" b3 {; V "id" => $shortname."_featured_category",* m+ T- e0 L8 [; q& W, [6 {- u
"type" => "select",5 J6 ]7 T( S# e; g4 L4 U; o
"std" => "Choose a category:",8 t% d1 d4 V$ R% f& i
"options" => $wp_getcat),$ R% ^, y N) A6 T5 p' I$ f D( Q
0 F& f. I3 R" }5 M1 y array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
7 `$ S0 g4 g3 r! B: i, E g, u8 o "id" => $shortname."_featured_number",; ~$ u5 F O1 g
"type" => "select",
B( E! n; L5 l& R |0 x "std" => "Number of post:",! N0 ]9 Q6 Z# o0 _
"options" => $number_entries),# @; z; \9 m2 h3 g! `) l3 R. J* T
3 o! l8 A# a A1 F/ { array( "name" => "</div></div>",* d) E3 [( b) G: z4 i8 g: Q# g# i5 q
"type" => "close",
: n: \" ^4 L5 \( R' C5 | ),
/ ?! V( x( q* P 8 M, A) b2 V( r3 R8 J- ?
array( "name" => "Featured Category Settings",
" s A8 B6 J5 A! b: X "type" => "heading",+ p) w: h+ f4 s0 d& v: t
),
( M$ D, | G" [9 r
8 T) g b3 |: b array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
& i2 G, G) Q H! J, T& {- N "id" => $shortname."_featured_category_activate",8 W! v( g% k8 e' ~$ {, X+ J) I
"type" => "select",
5 q t# z" y' ` "std" => "No",' ]- M E) Q, i4 q% w
"options" => array("No", "Yes")),
3 f a/ {5 K+ x; k 8 U4 g& j* v+ z7 i4 j% \
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
. w; J7 K g2 [6 l( }+ X "id" => $shortname."_featured_category_id1",
9 ^2 @* w2 V; H5 T% L "type" => "select",
% ?- {7 _ ~& A4 \9 x, w "std" => "Choose a category:",6 Z) n5 o8 Q" m( H7 m
"options" => $wp_getcat),, H6 o/ y+ l, A; G1 {" c% T
) q% k# h$ L" }& X' k; d array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",# p% ~: \7 A+ }
"id" => $shortname."_featured_number1", _8 Z; `, }/ U, U2 a# \' N2 ]
"type" => "select",1 Y X6 s* \* O8 e' V* T6 `/ @
"std" => "Number of post:",
( D5 t, e8 X/ g9 K4 U7 ? "options" => $number_entries),8 k/ L4 p7 t [* [* T, V/ Z
& i# {9 R* K- ?4 S d% K( ~
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
/ j& U) g& y9 W# E# r2 i "id" => $shortname."_featured_category_id2",
* V# Y3 h% h0 C0 K( }6 R7 i "type" => "select",
$ k8 D* w5 x: F+ Y1 }" H' H "std" => "Choose a category:",
7 ]. A; |1 {+ L4 a* y' L2 F$ k; x "options" => $wp_getcat),
* V; P( [ B2 \ \0 z( f/ A/ D 4 {% r: |! A7 V% o$ |
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
* N5 ~* L7 Z% K0 w. O- u "id" => $shortname."_featured_number2",
+ F+ Q* o9 t! Q5 W2 F, O "type" => "select",
& s0 P @6 J/ V- z1 x( U "std" => "Number of post:",
* v& c7 f, s0 l; g0 `4 G4 Y "options" => $number_entries),
. B9 w2 A% Z- _+ r ) A+ G) A ~6 \9 [7 z: T9 _7 @
4 b, B5 h4 g7 M% t6 X array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",* a% i- N; {- l; O/ ]7 W% s. l
"id" => $shortname."_featured_category_id3",
- X1 m3 i7 U8 Z) d6 Z$ D "type" => "select",- r8 n4 l" c6 I$ l3 ^5 k( C
"std" => "Choose a category:",) g, U9 V' M4 B( P1 n# {/ W
"options" => $wp_getcat),1 E, n; E$ }3 [2 M5 _5 N& K
+ [+ @. H+ A; ^. d, s3 _) p( k" [4 f! J5 T array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",/ m1 \5 L+ I( u- N9 R. h( r3 S5 S
"id" => $shortname."_featured_number3",0 l, i6 L" G5 d4 g- \* H) v
"type" => "select",
. |+ `. k0 h+ O1 C* m6 |' F "std" => "Number of post:",0 P6 |1 K7 L2 g B5 U) L) Y' c# e$ O/ J3 d
"options" => $number_entries),& y9 r, [2 Y0 M2 {
# R( s# T' u1 a( X% N3 A$ C
) x6 E+ D P* y" [2 S7 k( o
array( "name" => "</div></div>",
* l5 K! _1 P* F% _ "type" => "close",/ S, _+ @3 f; }4 _3 d7 [2 ?
),
2 |1 P- e# N* L
/ ~6 N! V8 Z k1 C/ X, h9 @ {& S0 r+ Q: f3 n. V3 y2 n
array( "name" => "Google Adsense & Analytics Settings",8 K. k: K9 y! P& f8 o7 h2 f# \
"type" => "heading",; n) S( i: T7 P3 N" H" e. g2 E( }
),
! ~" V6 l$ ?; ~( \3 T% `4 C
: b8 C* o5 u$ E array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",, h0 \. K$ s2 m+ Q7 y; h. g
"id" => $shortname."_adsense_loop_activate",
7 _5 l) Q* H5 u) X "type" => "select"," H7 p, w! W1 L a
"std" => "Disable",
, k F5 x6 l+ ^ D) E. E "options" => array("Disable", "Enable")),& d8 k+ D7 n( d; L
( X4 T' D; W4 O, y/ {+ T array( "name" => "Insert Google Adsense Code For Loops Here<br />
, _ ?! Y3 M: s9 m <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
; Z. t$ _7 ~9 o/ S( g& B: @ "id" => $shortname."_adsense_loop",3 F5 v3 F2 y; T
"type" => "textarea",
1 K6 f2 g/ X5 t8 S3 B$ B$ S2 K "std" => "",
1 D. M: W- r4 O C7 f ),
. t/ ?: n0 v, W1 G9 _+ C% x1 i) w; l+ `
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",2 V" r, k' f. _/ c/ w7 _
"id" => $shortname."_adsense_single_activate",7 n( X1 v4 {8 V1 t5 F7 n; t
"type" => "select",$ p$ z4 T5 ]/ y! s0 B
"std" => "Disable",
/ |' C- I: I- B7 ~+ A "options" => array("Disable", "Enable")),
( Y- o6 L! Q5 m# j5 s% ], _; p0 m2 H. d% ~; b5 r0 z3 M1 O3 P3 E
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
6 F0 { u# k I( ^3 z <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>", C. D/ R+ n. I* k/ ~
"id" => $shortname."_adsense_single",3 f; y0 t; f' X
"type" => "textarea",
1 {( H$ o7 m+ j7 i "std" => "",
! {9 |7 B! W) J3 m ),
3 [: {# K' ?/ V) ^! _ a& _6 d
4 p! e% z; U& e' f) `
; l3 }8 E/ q! B array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
: p1 Y9 ^9 t9 _+ G( T "id" => $shortname."_google_analytics",+ D/ p$ k- F8 X1 f5 r
"type" => "textarea",
' o9 s( B* E5 b' t$ ?7 B0 ?- v+ G "std" => "",
) F: x" J5 m* a8 l( P* I ),
8 a2 |/ c# z! D2 J% L8 h& ~' u& C0 h( d% i
array( "name" => "</div></div>",
8 t D4 h# [" W q- T- ]& v" l. R "type" => "close",; ~' A3 l; _6 V0 [
),
9 r: t3 d$ |- Y2 h+ b- F9 H. r
$ |9 Z( O( L3 W! z) L6 y0 ]- s% T # n- H4 e7 M0 Y7 @( E! s
array( "name" => "AddThis Social Bookmarking Settings",
1 {( i$ D; ]0 W' |/ E( ?0 O "type" => "heading",
5 L" u! n C' @6 E9 x ),
) Y7 ], L: v' b* T5 ]9 W: M& O, g" |' d- x" J* ^. R
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
- Q1 }% Z' E" J: m4 S2 d <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
+ F8 w; a$ _9 N1 ^ "id" => $shortname."_addthis",
7 |4 b% s5 [9 \0 i "type" => "text",' P3 z) t" m+ e# @' m, s5 ^0 m$ t" V
"box" => "social"," g& s) }# ~1 X
"std" => "",
; e! i% l" F8 `8 b ),
. @% K l6 r/ a$ `
+ Z g# z+ A4 y4 f5 [ U$ s( H array( "name" => "</div></div>",8 I9 D- j4 c ^) l( V1 ~% e
"type" => "close",
- J+ e* B: g0 Q3 G0 a) W% P1 o9 M ),
8 @) L* l5 G6 V2 ^. z 4 R8 I$ d' w* A/ ~7 u+ V9 O/ N' C
* L3 P8 C8 l- ]' K' D- h' z
$ Y0 \/ O" \" J' ?( u& d# x
array( "name" => "YouTube Video Settings",- t* I+ p" ]" o
"type" => "heading",3 a0 i3 T' T3 L0 B* J
),6 @; ^% O" {4 w$ Y' H+ x
: `0 {- u# z: ]9 x+ g$ A- ~1 U& f
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 D! F) ~4 l9 n: a "id" => $shortname."_emvideo_activate",
+ G+ j8 s9 d! @9 y% J8 Z "type" => "select",
- X6 w' U4 g% X1 l+ C "std" => "No",
3 Z8 Z5 \. q& ?+ `/ q "options" => array("No", "Yes")),
) d" ]7 v6 ?' ?# R2 ]; d: U5 }- S) R& v4 t; H0 U
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",$ U: U) U. ~2 Q2 c; A4 Q% D# ]
"id" => $shortname."_emvideo",
0 [! X7 g+ i( {0 G. L" V( S3 x: }8 N2 F "std" => "",* S" O X5 q0 B% C( m
"type" => "text"),. j: k8 |) s# z1 u& r
4 D6 V4 R3 _( ~' z% D _5 j) C array( "name" => "</div></div>",6 v& g, ?% x7 m# H- m O! v; m/ E
"type" => "close",- S6 ~# b" |$ G5 U: p; @
)," z# @( J% c( N3 ^
$ H% |* o- d$ g# w" g% V U& B v
array( "name" => "Twitter Settings"," b5 {3 ~. M) Y# S4 k
"type" => "heading",
+ j8 Z7 B! ^$ _0 i7 R B ),+ N/ } e1 E- ?8 d: e
% G1 f5 U* d9 N$ K. L @- z array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
( a1 p/ w9 m& Z. O2 I* Y "id" => $shortname."_twitter_activate",
6 Q1 c1 k9 G! T& N# ~& H "type" => "select",
1 A( k% m4 t. B; F7 F7 a; e, Z. k "std" => "No",
7 h/ ]$ S3 _2 e1 D% u j7 d/ v0 t "options" => array("No", "Yes")),% N2 W* U. i0 S2 s2 u, n2 ?' w
* E' `3 D) p9 P/ x9 y
array( "name" => "Insert Your Twitter ID here
1 O' u. g6 X, h. P$ l <br /><em>*leave blank if not necessary</em>
7 t$ |0 [$ T! H6 ^, B9 R <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",6 q4 ]3 ]- ^: T# H6 K/ H
"id" => $shortname."_twitter",
% J- n* W# U" [. @5 |; |+ O$ M "type" => "text",
7 Q, w9 {, ?! G& X; m "box" => "social",
* U8 \- r5 ~9 C& Q "std" => "",1 `, o5 V0 D, }( o& g- \
),6 A; {, d: k) a1 ?
7 a3 ~& Q. b* P" N9 Y& X; F; Z: u1 u array( "name" => "Enter Twitter Feed Count here3 Y- p" k4 Z" U, P! t
<br /><em>*leave blank if not necessary</em>( X1 k% V" g$ {# W
<br /><em>*Enter How Many Twitter Feed To Display</em>",+ Y0 s+ J1 E! ]
"id" => $shortname."_twitter_count",: n: G. U* G& q3 x
"type" => "text",
+ E+ p% q6 z+ B, e/ Y9 ?. m) [4 J0 } "box" => "social",! j7 }9 O0 Q+ C/ o/ P
"std" => "",
0 K; H0 d$ _" a3 V# p ),4 V5 _0 V' r% t
, h5 c" o; f5 e$ [7 O8 i$ w h% M array( "name" => "</div></div>",
/ C9 s6 ^/ b! n r9 {/ D; H "type" => "close",7 { u0 }- [+ s' P
),5 V4 X3 R4 Y5 P+ W5 g1 ^& _8 s
! s/ M; K! P( h$ v W
1 H2 Y% y8 b* W4 o. E# F* Z- g array( "name" => "125 x 125 Banners Advertisement Settings",
* R9 G. V, l# x6 d- H "type" => "heading",
$ I& E8 \ P9 B4 p; H7 t2 ] ),
' y/ i$ c8 `9 H9 s
7 B8 o; S7 ]/ z% D# a array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",# N K6 {- w/ A2 j$ l3 _
"id" => $shortname."_sponsor_activate",6 k [( s0 i* h2 q8 w6 |2 b$ t- \+ @
"type" => "select",
' J7 P9 p L/ K" U "std" => "No",( n# K: Y: H2 O- a( F$ e1 z! i
"options" => array("No", "Yes")),
( ]2 S" n9 q, K6 Z* S# s
. J6 c% Z) v4 v8 H/ n+ Q% L; m* M! ~# P x4 e7 @. w
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",8 O! I% h6 J' F8 ~ r# p
"id" => $shortname."_sponsor_banner_one",3 J, P: R( L+ H! A
"type" => "textarea",) A( V1 E4 [7 w/ e. d0 d% }
"std" => "",( I. O6 _( A4 h/ ]
),
# Z' C+ G' {$ H4 |3 h4 b+ j' `" x6 C0 N) x/ [
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
6 e5 _& H, R+ w "id" => $shortname."_sponsor_banner_two",3 d( a9 n( I4 b
"type" => "textarea",8 D$ }8 [+ I6 I5 p) k! W
"std" => "",
& z; A- d& S; @. K3 |% ^ ),
! r5 s6 d. i' F7 \* J; o: {# f6 l5 p4 u
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",. Y- s! E0 V" R" j* w b( @
"id" => $shortname."_sponsor_banner_three",
. B5 T7 X8 E( M "type" => "textarea",
( k* j' Q/ G( s* J, { "std" => "",
! _5 q# }/ g) O1 h ),
% }+ U; V" @' z
7 a+ O6 @3 d# H array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",& Z: U6 S/ k7 Z7 ]' p
"id" => $shortname."_sponsor_banner_four",. ~. S A5 M- g' m2 h
"type" => "textarea",: b& G' z$ L: x" |1 n- J0 }2 n
"std" => ""," i. G5 r) B5 H' K& J9 ~$ j
),
' Y8 a& |8 S5 P+ e" p' z. {2 {# D, a1 {: m# u
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
; W! E" o6 \8 N2 z- t) N "id" => $shortname."_sponsor_banner_five",
( a- D. Y$ Z7 K$ s+ p$ z "type" => "textarea",* [1 G# H8 o) e: `4 \2 O
"std" => "",
5 U* b! n+ E; n& | ),9 ]# q% }4 n: ]: K# O
; j( N1 g# `1 L+ x
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
) s9 C1 [6 o U! I "id" => $shortname."_sponsor_banner_six",
! p s w& u5 S* r1 L "type" => "textarea",9 Q! z3 t9 Z. i( U* J; `( w9 b6 e
"std" => "",
# |) C' ~) w$ Q8 Q/ O7 X0 ? ),/ R( I- @' I, Y( k
, U B& A+ w. s' Q
array( "name" => "</div></div>",% h+ j8 g1 {: E2 N3 x. B
"type" => "close",
: ]% w3 I, _) V) v! a; ^/ f0 ^ ),
6 j/ H1 Y7 J, ]6 S6 b* G( F" J: w3 }( D. ?
, a( X% W& C, J* `' L
% q. ]2 m. M. P0 E);
r( m7 J, x$ j$ g9 W$ |0 s* e( b6 n1 r
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {/ q1 `( f" d. M) H& e, d( |' i
/ W# z# h) Q% ~
echo "<div id=\"admin-options\"> ";
5 Z) c, H, Q5 l$ {5 Y3 l7 a4 t0 u; b, W0 ] p
global $themename, $shortname, $options;
) P! H- v, `/ M# S Z" Uif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';" {& `% E7 K" Q @4 J+ L
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
% |# }1 C! Y- ?* k) J/ N?>
. q) A* [( u0 @3 U u B* V( ^) k' W# b& y- ^1 `1 T* y
<h4><?php echo "$themename"; ?> Theme Options</h4>
4 e2 C% L9 {. ^+ j( i* q6 q$ C7 q% X) D( w2 ~
<div class="annouce">; O7 w- f; v% A" y
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
) b7 K3 P8 x3 z2 z. c* z<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
- y; k- r M( x4 h6 H' S</div>3 c8 U6 T0 ` h1 l; Z; a2 v
% q' N. B* L- I) ?4 G! p<form action="" method="post">/ g0 e E( L: @/ `
! }6 [ y, [% T( z* X S<?php foreach ($options as $value) { ?>( @# Z" s6 ^5 @6 g
4 n7 d6 I% X) D, Y<?php switch ( $value['type'] ) { case 'heading': ?>- R/ h: t. J2 ^: L6 M; M
4 G; O; A! P% P0 t6 K
<div class="get-option">
3 ^3 ]- U$ k, O9 x( R" Y1 }2 ~# _8 Z; T# w) k5 H
<h2><?php echo $value['name']; ?></h2>
* k r- v: V8 m6 } u3 c9 S0 e0 `6 M U3 i- b, T3 E d }% E# w" f
<div class="option-save">
, C, g( K3 h' \8 U3 p1 e" @: f7 R, j q3 s; ~1 n
<?php% }% E; A2 E$ U" F l1 K3 R
break;* y) U- X, `! M7 ?. `: B5 E) _
case 'text':
' d2 N" R& Z% g0 U# S! O( c?>
% ~7 [6 \9 m2 o) H1 q
, `. w. T; u4 g2 t4 _( P<div class="description"><?php echo $value['name']; ?></div>
% u, V& F. E2 N9 \! \& L1 w<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
; w- P+ c6 \, a) Y/ C5 P8 m7 t
" ?* Z' X4 S. H/ \8 B: o7 m# |2 J4 d; Rget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>2 j3 K: R" D4 Y) I2 {
/ g! [8 P% e1 T6 ]<?php4 L0 x% q0 V& T6 a' \4 K7 Z
break;
2 ^. p) @2 j; R) s- w1 h% Kcase 'select':$ E' ~3 n# c6 F* {+ m' L
?>
: } W* x+ H- x8 f6 L7 V
0 u2 }; |$ T, }# N7 ~<div class="description"><?php echo $value['name']; ?></div>
0 b8 Z+ f e8 X a' G G$ {$ Q' ]) r<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">' d c2 ? y3 z4 G/ p* z) I4 k7 Z7 W9 F
<?php foreach ($value['options'] as $option) { ?>
! k+ }( ~6 b% r- @<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
1 o! P1 `* P1 }) H' ]<?php } ?>
; c% H u; t; A1 \$ r; y5 Q</select>
$ W/ d- H) k' p# j/ u</p>' F/ \, F1 n3 ~
& a6 n' X! X% l6 V% n<?php
7 J; D! P$ i/ J) w( Ubreak;
|' E3 \. p+ S/ ~& ?" i% Ccase 'textarea':
. g5 d& p- c$ q# a) `$valuex = $value['id'];7 ?0 \, x& ~9 y3 j% C5 l
$valuey = stripslashes($valuex);/ J; O3 X& d( d3 S5 C) U6 }" w
$video_code = get_settings($valuey);9 D6 i, ]" Y0 D, D v& G; {
?>0 @7 K! a! Q- F2 h$ Y. A @& O4 e
- T0 n$ d1 O( z J! n
<div class="description"><?php echo $value['name']; ?></div>
% [- L9 f1 }3 r" Y<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
3 ^4 P; i% J: G2 I0 C& ?6 D5 Y/ h$ t' B( W2 w
else { echo $value['std']; } ?></textarea></p>
: b& X$ s4 J8 Y+ Z# f9 Q
; u/ c) L6 {8 x c C8 A" p<?php
+ e# s/ \ u3 Qbreak;1 p. }! o$ R! D; _$ P. y
case 'close':
: R" P2 G1 Z4 ]?>1 Y, O8 n9 u m6 T( _4 a
' K5 T, Z& z! q$ M$ m# a
<div class="clearfix"></div> f% p6 ?$ n' w2 b7 J m- g9 _$ t7 G
</div><!-- OPTION SAVE END -->: Y$ Y. i. z" ?1 b
9 G* E2 s4 u1 m/ x1 J1 V
<div class="clearfix"></div>
% n, c( P+ p( b1 o2 ]3 O6 D8 D; g</div><!-- GET OPTION END -->
. m9 ^# r6 j2 d6 R; B( D% g9 \ H8 _$ A
<?php
4 h: \% W7 W5 Q$ `. ~break;) Z: E1 u. W7 w% X
default;
4 ]# B3 \+ y. M7 d?>+ K' B5 u' `9 P
( N% h% n) R0 F5 e: \2 a; R0 ?
5 b" ^4 r4 @& L/ L! h<?php
! H/ |# Q. M( m. \5 Q5 |3 zbreak; } ?>6 m2 w5 \8 m8 J" S) V
+ ^8 e F; z4 o
<?php } ?>
& S9 o1 T7 p3 U7 t7 I8 @
5 c$ J+ A; p) V1 ]8 w<p class="save-p">% B8 X! k, H/ V7 F# h1 h" j
<input name="save" type="submit" class="sbutton" value="Save Options" />
1 c, V8 C3 y: O5 `9 i<input type="hidden" name="action" value="save" />
* `! x5 m8 \1 y* t# W2 |</p>6 C* N9 {( c, i- J, b
</form>
* @/ f3 B5 ]& K
8 w- R0 e" U6 F) P! V# w: C1 I! ^<form method="post">( O6 G$ b! R# c" j/ I4 d
<p class="save-p">
, S2 u- |0 d; ~5 }; J9 ^<input name="reset" type="submit" class="sbutton" value="Reset Options" />
+ B, S/ T9 M- k( d8 f" }9 `, R<input type="hidden" name="action" value="reset" />
2 G4 z1 o$ y0 `+ P3 m! I' N2 y, N</p>+ Q: `2 n- Z0 l+ D/ ?/ |
</form>
- ~, \% o1 n! I& _* f7 H& U3 M, g
</div><!-- ADMIN OPTIONS END -->( h+ q; B- ` y& O/ s0 M) r5 h+ p
, k K" G: l1 _
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
; ]( Z1 w, q* E' _
: R1 F2 ]7 Q5 S6 y9 p3 m% b! kfunction mytheme_admin_register() {
# s# L5 o' H3 {5 c2 q. ~, qglobal $themename, $shortname, $options;
: y0 ^, u8 ^" t9 V. n+ K- ]0 Gif ( $_GET['page'] == basename(__FILE__) ) {
3 {2 c! G( ]; S/ W; U: {% wif ( 'save' == $_REQUEST['action'] ) {
, K; R0 u2 v+ F$ m+ `/ Xforeach ($options as $value) {1 \0 R! m6 c% m6 ], ]) h: O! S1 Y! z
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
8 A3 u, x( p5 Q$ n5 x7 n3 Oforeach ($options as $value) {* C e) B! ^' u4 v
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }) _; r8 [0 J1 o. H# }$ i
header("Location: themes.php?page=functions.php&saved=true");
3 L9 c8 I0 s* s: M9 W0 Tdie;# `9 t% C6 G1 J. w7 y, X: a, u
} else if( 'reset' == $_REQUEST['action'] ) {' Z' J5 d2 {5 L1 a% k
foreach ($options as $value) {
4 p( u; b' ]8 B9 y9 }& Xdelete_option( $value['id'] ); }
0 |* E& X% P7 n/ m6 mheader("Location: themes.php?page=functions.php&reset=true");+ z: a( S, @; X6 S. f
die;
3 B J3 m$ a& \4 N0 T}
" c8 s+ {; Z7 g8 K( Q$ H# T}
O8 ]# L p% e3 l. t( ~' \add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');8 R& r8 T3 \2 A) w _1 V
}
) w/ J: M/ Z9 P; @4 a7 w* @
4 D, i% U9 ]3 L% L, Rfunction mytheme_admin_head() { ?>% c0 K$ E( E1 z
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
2 b* u& m1 X) ~0 ~: P4 W<?php }
/ d/ |# d, _) Y; R/ ~ |
|